Skip to content

Commit

Permalink
rename course
Browse files Browse the repository at this point in the history
  • Loading branch information
spatialthoughts committed Jul 9, 2023
1 parent 3e7ffc7 commit 54977e7
Show file tree
Hide file tree
Showing 18 changed files with 2,112 additions and 1,344 deletions.
2 changes: 1 addition & 1 deletion code/pyqgis/project_toolbar.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os
data_dir = os.path.join(os.path.expanduser('~'), 'Downloads', 'pyqgis_in_a_day')
data_dir = os.path.join(os.path.expanduser('~'), 'Downloads', 'pyqgis_masterclass')

projectToolbar = iface.addToolBar('Project Selector')

Expand Down
2 changes: 1 addition & 1 deletion code/pyqgis/save_attributes_console.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os
data_dir = os.path.join(os.path.expanduser('~'), 'Downloads', 'pyqgis_in_a_day')
data_dir = os.path.join(os.path.expanduser('~'), 'Downloads', 'pyqgis_masterclass')

output_name = 'output.csv'
output_path = os.path.join(data_dir, output_name)
Expand Down
2 changes: 1 addition & 1 deletion code/pyqgis/save_attributes_standalone.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
qgs = QgsApplication([], False)
qgs.initQgis()

data_dir = os.path.join(os.path.expanduser('~'), 'Downloads', 'pyqgis_in_a_day')
data_dir = os.path.join(os.path.expanduser('~'), 'Downloads', 'pyqgis_masterclass')

filename = 'sf.gpkg|layername=zoning'
uri = os.path.join(data_dir, filename)
Expand Down
4 changes: 2 additions & 2 deletions code/pyqgis/solutions/exercise2.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from datetime import datetime

icon = 'question.svg'
data_dir = os.path.join(os.path.expanduser('~'), 'Downloads/pyqgis_in_a_day/')
data_dir = os.path.join(os.path.expanduser('~'), 'Downloads/pyqgis_masterclass/')
icon_path = os.path.join(data_dir, icon)

def show_time():
Expand All @@ -13,4 +13,4 @@ def show_time():
action = QAction('Show Time')
action.triggered.connect(show_time)
action.setIcon(QIcon(icon_path))
iface.addToolBarIcon(action)
iface.addToolBarIcon(action)
4 changes: 2 additions & 2 deletions code/pyqgis/solutions/exercise5.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os
data_dir = os.path.join(os.path.expanduser('~'), 'Downloads', 'pyqgis_in_a_day')
data_dir = os.path.join(os.path.expanduser('~'), 'Downloads', 'pyqgis_masterclass')

filename = 'srtm.tif'
srtm = os.path.join(data_dir, filename)
Expand All @@ -16,4 +16,4 @@

results = processing.run("qgis:rasterlayerstatistics",
{'INPUT': clipped_dem, 'BAND': 1})
print('Highest Elevation in San Francisco :{} m'.format(results['MAX']))
print('Highest Elevation in San Francisco :{} m'.format(results['MAX']))
4 changes: 2 additions & 2 deletions code/pyqgis/unique_values_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from processing.core.Processing import Processing
Processing.initialize()

data_dir = os.path.join(os.path.expanduser('~'), 'Downloads', 'pyqgis_in_a_day')
data_dir = os.path.join(os.path.expanduser('~'), 'Downloads', 'pyqgis_masterclass')

filename = 'sf.gpkg|layername=zoning'
uri = os.path.join(data_dir, filename)
Expand All @@ -30,4 +30,4 @@
# Alternatively, you can add the layer so it is present in the registry
# QgsProject.instance().addMapLayer(layer, False)
del(layer)
qgs.exitQgis()
qgs.exitQgis()
2 changes: 1 addition & 1 deletion code/pyqgis/zonal_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from processing.core.Processing import Processing
Processing.initialize()

data_dir = os.path.join(os.path.expanduser('~'), 'Downloads', 'pyqgis_in_a_day')
data_dir = os.path.join(os.path.expanduser('~'), 'Downloads', 'pyqgis_masterclass')

vector_layer = 'seismic_zones.shp'
vector_layer_path = os.path.join(data_dir, vector_layer)
Expand Down
2 changes: 1 addition & 1 deletion docs/code/pyqgis/project_toolbar.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os
data_dir = os.path.join(os.path.expanduser('~'), 'Downloads', 'pyqgis_in_a_day')
data_dir = os.path.join(os.path.expanduser('~'), 'Downloads', 'pyqgis_masterclass')

projectToolbar = iface.addToolBar('Project Selector')

Expand Down
2 changes: 1 addition & 1 deletion docs/code/pyqgis/save_attributes_console.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os
data_dir = os.path.join(os.path.expanduser('~'), 'Downloads', 'pyqgis_in_a_day')
data_dir = os.path.join(os.path.expanduser('~'), 'Downloads', 'pyqgis_masterclass')

output_name = 'output.csv'
output_path = os.path.join(data_dir, output_name)
Expand Down
2 changes: 1 addition & 1 deletion docs/code/pyqgis/save_attributes_standalone.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
qgs = QgsApplication([], False)
qgs.initQgis()

data_dir = os.path.join(os.path.expanduser('~'), 'Downloads', 'pyqgis_in_a_day')
data_dir = os.path.join(os.path.expanduser('~'), 'Downloads', 'pyqgis_masterclass')

filename = 'sf.gpkg|layername=zoning'
uri = os.path.join(data_dir, filename)
Expand Down
4 changes: 2 additions & 2 deletions docs/code/pyqgis/solutions/exercise2.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from datetime import datetime

icon = 'question.svg'
data_dir = os.path.join(os.path.expanduser('~'), 'Downloads/pyqgis_in_a_day/')
data_dir = os.path.join(os.path.expanduser('~'), 'Downloads/pyqgis_masterclass/')
icon_path = os.path.join(data_dir, icon)

def show_time():
Expand All @@ -13,4 +13,4 @@ def show_time():
action = QAction('Show Time')
action.triggered.connect(show_time)
action.setIcon(QIcon(icon_path))
iface.addToolBarIcon(action)
iface.addToolBarIcon(action)
4 changes: 2 additions & 2 deletions docs/code/pyqgis/solutions/exercise5.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os
data_dir = os.path.join(os.path.expanduser('~'), 'Downloads', 'pyqgis_in_a_day')
data_dir = os.path.join(os.path.expanduser('~'), 'Downloads', 'pyqgis_masterclass')

filename = 'srtm.tif'
srtm = os.path.join(data_dir, filename)
Expand All @@ -16,4 +16,4 @@

results = processing.run("qgis:rasterlayerstatistics",
{'INPUT': clipped_dem, 'BAND': 1})
print('Highest Elevation in San Francisco :{} m'.format(results['MAX']))
print('Highest Elevation in San Francisco :{} m'.format(results['MAX']))
4 changes: 2 additions & 2 deletions docs/code/pyqgis/unique_values_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from processing.core.Processing import Processing
Processing.initialize()

data_dir = os.path.join(os.path.expanduser('~'), 'Downloads', 'pyqgis_in_a_day')
data_dir = os.path.join(os.path.expanduser('~'), 'Downloads', 'pyqgis_masterclass')

filename = 'sf.gpkg|layername=zoning'
uri = os.path.join(data_dir, filename)
Expand All @@ -30,4 +30,4 @@
# Alternatively, you can add the layer so it is present in the registry
# QgsProject.instance().addMapLayer(layer, False)
del(layer)
qgs.exitQgis()
qgs.exitQgis()
2 changes: 1 addition & 1 deletion docs/code/pyqgis/zonal_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from processing.core.Processing import Processing
Processing.initialize()

data_dir = os.path.join(os.path.expanduser('~'), 'Downloads', 'pyqgis_in_a_day')
data_dir = os.path.join(os.path.expanduser('~'), 'Downloads', 'pyqgis_masterclass')

vector_layer = 'seismic_zones.shp'
vector_layer_path = os.path.join(data_dir, vector_layer)
Expand Down
42 changes: 21 additions & 21 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

<title>Spatial Thoughts OpenCourseWare</title>

<script src="site_libs/header-attrs-2.21/header-attrs.js"></script>
<script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<script src="site_libs/header-attrs-2.10/header-attrs.js"></script>
<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/flatly.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
Expand Down Expand Up @@ -69,7 +69,6 @@




<style type = "text/css">
.main-container {
max-width: 940px;
Expand All @@ -91,9 +90,6 @@
summary {
display: list-item;
}
details > summary > p:only-child {
display: inline;
}
pre code {
padding: 0;
}
Expand Down Expand Up @@ -150,15 +146,11 @@
href = "index.html";
var menuAnchor = $('a[href="' + href + '"]');

// mark the anchor link active (and if it's in a dropdown, also mark that active)
var dropdown = menuAnchor.closest('li.dropdown');
if (window.bootstrap) { // Bootstrap 4+
menuAnchor.addClass('active');
dropdown.find('> .dropdown-toggle').addClass('active');
} else { // Bootstrap 3
menuAnchor.parent().addClass('active');
dropdown.addClass('active');
}
// mark it active
menuAnchor.tab('show');

// if it's got a parent navbar menu mark it active as well
menuAnchor.closest('li.dropdown').addClass('active');

// Navbar adjustments
var navHeight = $(".navbar").first().height() + 15;
Expand Down Expand Up @@ -187,20 +179,27 @@
border-radius: 4px;
}

.tabset-dropdown > .nav-tabs > li.active:before, .tabset-dropdown > .nav-tabs.nav-tabs-open:before {
content: "\e259";
.tabset-dropdown > .nav-tabs > li.active:before {
content: "";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}

.tabset-dropdown > .nav-tabs.nav-tabs-open > li.active:before {
content: "\e258";
font-family: 'Glyphicons Halflings';
content: "&#xe258;";
border: none;
}

.tabset-dropdown > .nav-tabs.nav-tabs-open:before {
content: "";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}

.tabset-dropdown > .nav-tabs > li.active {
display: block;
}
Expand Down Expand Up @@ -242,7 +241,7 @@
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-bs-toggle="collapse" data-target="#navbar" data-bs-target="#navbar">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
Expand Down Expand Up @@ -302,7 +301,8 @@ <h3>Python</h3>
Analysis</a></li>
<li><a href="python-dataviz.html">Mapping and Data Visualization with
Python</a></li>
<li><a href="pyqgis-in-a-day.html">Customizing QGIS with Python</a></li>
<li><a href="pyqgis-in-a-day.html">Customizing QGIS with Python - PyQGIS
Masterclass</a></li>
</ul>
</div>
<div id="gdal" class="section level3">
Expand Down
Loading

0 comments on commit 54977e7

Please sign in to comment.