Skip to content

Commit 93b8a32

Browse files
Small fixes after course (remove %matplotlib inline, update shapely imports) (#64)
1 parent ee3ec78 commit 93b8a32

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+134
-88
lines changed

notebooks/00-jupyter_introduction.ipynb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -935,6 +935,10 @@
935935
}
936936
],
937937
"metadata": {
938+
"jupytext": {
939+
"cell_metadata_filter": "-run_control,-deletable,-editable,-jupyter,-slideshow",
940+
"notebook_metadata_filter": "-jupytext.cell_metadata_filter,-jupytext.notebook_metadata_filter"
941+
},
938942
"kernelspec": {
939943
"display_name": "Python 3 (ipykernel)",
940944
"language": "python",
@@ -950,7 +954,7 @@
950954
"name": "python",
951955
"nbconvert_exporter": "python",
952956
"pygments_lexer": "ipython3",
953-
"version": "3.12.7"
957+
"version": "3.12.8"
954958
},
955959
"nav_menu": {},
956960
"toc": {

notebooks/00-jupyter_introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jupytext:
44
extension: .md
55
format_name: myst
66
format_version: 0.13
7-
jupytext_version: 1.16.4
7+
jupytext_version: 1.16.5
88
kernelspec:
99
display_name: Python 3 (ipykernel)
1010
language: python

notebooks/01-introduction-tabular-data.ipynb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5473,7 +5473,9 @@
54735473
"metadata": {
54745474
"celltoolbar": "Nbtutor - export exercises",
54755475
"jupytext": {
5476-
"formats": "ipynb,md:myst"
5476+
"cell_metadata_filter": "-run_control,-deletable,-editable,-jupyter,-slideshow",
5477+
"formats": "ipynb,md:myst",
5478+
"notebook_metadata_filter": "-jupytext.cell_metadata_filter,-jupytext.notebook_metadata_filter"
54775479
},
54785480
"kernelspec": {
54795481
"display_name": "Python 3 (ipykernel)",
@@ -5490,7 +5492,7 @@
54905492
"name": "python",
54915493
"nbconvert_exporter": "python",
54925494
"pygments_lexer": "ipython3",
5493-
"version": "3.12.7"
5495+
"version": "3.12.8"
54945496
},
54955497
"widgets": {
54965498
"application/vnd.jupyter.widget-state+json": {

notebooks/01-introduction-tabular-data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jupytext:
55
extension: .md
66
format_name: myst
77
format_version: 0.13
8-
jupytext_version: 1.16.4
8+
jupytext_version: 1.16.5
99
kernelspec:
1010
display_name: Python 3 (ipykernel)
1111
language: python

notebooks/02-introduction-geospatial-data.ipynb

Lines changed: 7 additions & 5 deletions
Large diffs are not rendered by default.

notebooks/02-introduction-geospatial-data.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jupytext:
44
extension: .md
55
format_name: myst
66
format_version: 0.13
7-
jupytext_version: 1.16.4
7+
jupytext_version: 1.16.5
88
kernelspec:
99
display_name: Python 3 (ipykernel)
1010
language: python
@@ -22,8 +22,6 @@ kernelspec:
2222
---
2323

2424
```{code-cell} ipython3
25-
%matplotlib inline
26-
2725
import pandas as pd
2826
import geopandas
2927
```
@@ -34,7 +32,7 @@ import geopandas
3432

3533
Geospatial data is often available from specific GIS file formats or data stores, like ESRI shapefiles, GeoJSON files, geopackage files, PostGIS (PostgreSQL) database, ...
3634

37-
We can use the GeoPandas library to read many of those GIS file formats (relying on the `fiona` library under the hood, which is an interface to GDAL/OGR), using the `geopandas.read_file` function.
35+
We can use the GeoPandas library to read many of those GIS file formats (relying on the `pyogrio` library under the hood, which is an interface to GDAL/OGR), using the `geopandas.read_file` function.
3836

3937
For example, let's start by reading a shapefile with all the countries of the world (adapted from http://www.naturalearthdata.com/downloads/110m-cultural-vectors/110m-admin-0-countries/, zip file is available in the `/data` directory), and inspect the data:
4038

notebooks/03-coordinate-reference-systems.ipynb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
"metadata": {},
2222
"outputs": [],
2323
"source": [
24-
"%matplotlib inline\n",
25-
"\n",
2624
"import pandas as pd\n",
2725
"import geopandas"
2826
]
@@ -992,6 +990,10 @@
992990
],
993991
"metadata": {
994992
"celltoolbar": "Nbtutor - export exercises",
993+
"jupytext": {
994+
"cell_metadata_filter": "-run_control,-deletable,-editable,-jupyter,-slideshow",
995+
"notebook_metadata_filter": "-jupytext.cell_metadata_filter,-jupytext.notebook_metadata_filter"
996+
},
995997
"kernelspec": {
996998
"display_name": "Python 3 (ipykernel)",
997999
"language": "python",
@@ -1007,7 +1009,7 @@
10071009
"name": "python",
10081010
"nbconvert_exporter": "python",
10091011
"pygments_lexer": "ipython3",
1010-
"version": "3.12.7"
1012+
"version": "3.12.8"
10111013
},
10121014
"widgets": {
10131015
"application/vnd.jupyter.widget-state+json": {

notebooks/03-coordinate-reference-systems.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jupytext:
44
extension: .md
55
format_name: myst
66
format_version: 0.13
7-
jupytext_version: 1.16.4
7+
jupytext_version: 1.16.5
88
kernelspec:
99
display_name: Python 3 (ipykernel)
1010
language: python
@@ -22,8 +22,6 @@ kernelspec:
2222
---
2323

2424
```{code-cell} ipython3
25-
%matplotlib inline
26-
2725
import pandas as pd
2826
import geopandas
2927
```

notebooks/04-spatial-relationships-joins.ipynb

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
"metadata": {},
2222
"outputs": [],
2323
"source": [
24-
"%matplotlib inline\n",
25-
"\n",
2624
"import pandas as pd\n",
2725
"import geopandas"
2826
]
@@ -107,7 +105,7 @@
107105
"metadata": {},
108106
"outputs": [],
109107
"source": [
110-
"from shapely.geometry import LineString\n",
108+
"from shapely import LineString\n",
111109
"line = LineString([paris, brussels])"
112110
]
113111
},
@@ -608,7 +606,7 @@
608606
"outputs": [],
609607
"source": [
610608
"# Import the Point geometry\n",
611-
"from shapely.geometry import Point"
609+
"from shapely import Point"
612610
]
613611
},
614612
{
@@ -2816,6 +2814,10 @@
28162814
}
28172815
],
28182816
"metadata": {
2817+
"jupytext": {
2818+
"cell_metadata_filter": "-run_control,-deletable,-editable,-jupyter,-slideshow",
2819+
"notebook_metadata_filter": "-jupytext.cell_metadata_filter,-jupytext.notebook_metadata_filter"
2820+
},
28192821
"kernelspec": {
28202822
"display_name": "Python 3 (ipykernel)",
28212823
"language": "python",
@@ -2831,7 +2833,7 @@
28312833
"name": "python",
28322834
"nbconvert_exporter": "python",
28332835
"pygments_lexer": "ipython3",
2834-
"version": "3.12.7"
2836+
"version": "3.12.8"
28352837
},
28362838
"widgets": {
28372839
"application/vnd.jupyter.widget-state+json": {

notebooks/04-spatial-relationships-joins.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jupytext:
44
extension: .md
55
format_name: myst
66
format_version: 0.13
7-
jupytext_version: 1.16.4
7+
jupytext_version: 1.16.5
88
kernelspec:
99
display_name: Python 3 (ipykernel)
1010
language: python
@@ -22,8 +22,6 @@ kernelspec:
2222
---
2323

2424
```{code-cell} ipython3
25-
%matplotlib inline
26-
2725
import pandas as pd
2826
import geopandas
2927
```
@@ -67,7 +65,7 @@ brussels = cities.loc[cities['name'] == 'Brussels', 'geometry'].item()
6765
And a linestring:
6866

6967
```{code-cell} ipython3
70-
from shapely.geometry import LineString
68+
from shapely import LineString
7169
line = LineString([paris, brussels])
7270
```
7371

@@ -204,7 +202,7 @@ The location of the Eiffel Tower is: x of 648237.3 and y of 6862271.9
204202

205203
```{code-cell} ipython3
206204
# Import the Point geometry
207-
from shapely.geometry import Point
205+
from shapely import Point
208206
```
209207

210208
```{code-cell} ipython3

0 commit comments

Comments
 (0)