Skip to content

Commit

Permalink
update first notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisvandenbossche committed Jun 18, 2018
1 parent 663fe1a commit 9147e4e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 30 deletions.
10 changes: 5 additions & 5 deletions 01-introduction-geospatial-data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"\n",
"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.\n",
"\n",
"For example, let's start by reading a shapefile with all the countries of the world (from https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_countries.zip), and inspect the data:"
"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:"
]
},
{
Expand Down Expand Up @@ -251,7 +251,7 @@
"source": [
"Let's import some other datasets with different types of geometry objects.\n",
"\n",
"A dateset about cities in the world (from https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/cultural/ne_110m_populated_places.zip), consisting of Point data:"
"A dateset about cities in the world (adapted from http://www.naturalearthdata.com/downloads/110m-cultural-vectors/110m-populated-places/, zip file is available in the `/data` directory), consisting of Point data:"
]
},
{
Expand All @@ -276,7 +276,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"And a dataset of rivers in the world (from http://www.naturalearthdata.com/downloads/50m-physical-vectors/50m-rivers-lake-centerlines/) where each river is a (multi-)line:"
"And a dataset of rivers in the world (from http://www.naturalearthdata.com/downloads/50m-physical-vectors/50m-rivers-lake-centerlines/, zip file is available in the `/data` directory) where each river is a (multi-)line:"
]
},
{
Expand Down Expand Up @@ -538,12 +538,12 @@
"from shapely.geometry import shape\n",
"\n",
"with fiona.drivers():\n",
" with fiona.open(\"data/ne_110m_admin_0_countries.shp\") as collection:\n",
" with fiona.open(\"data/ne_110m_admin_0_countries/ne_110m_admin_0_countries.shp\") as collection:\n",
" for feature in collection:\n",
" # ... do something with geometry\n",
" geom = shape(feature['geometry'])\n",
" # ... do something with properties\n",
" print(feature['properties']['NAME'])"
" print(feature['properties']['name'])"
]
},
{
Expand Down
9 changes: 0 additions & 9 deletions 03-spatial-joins.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,6 @@
"Joining the `cities` dataframe with `countries` will transfer extra information about the countries (the full name, the continent) to the `cities` dataframe, based on a common key:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"cities2.head()"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down
16 changes: 0 additions & 16 deletions 04-more-on-visualization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,6 @@
"Let's first create a new column with the GDP per capita:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"countries = countries.rename(str.lower, axis='columns')"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -331,13 +322,6 @@
"m"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
Expand Down

0 comments on commit 9147e4e

Please sign in to comment.