Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .Rhistory
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
install.packages("usethis")
usethis::create_github_token()
install.packages("gitcreds")
gitcreds_set()
library(gitcreds)
gitcreds_set()
gitcreds_get()
gitcreds_set()
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

.ipynb_checkpoints
*/outdata
.Rproj.user
310 changes: 288 additions & 22 deletions 02_Introduction_to_GeoPandas.ipynb

Large diffs are not rendered by default.

15 changes: 8 additions & 7 deletions 03_CRS_Map_Projections.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,16 @@
"\n",
"<br>\n",
"<font color='grey'>\n",
" <b>Instructor Notes</b>\n",
"\n",
"**Instructor Notes**\n",
"\n",
"- Datasets used\n",
" - ‘notebook_data/california_counties/CaliforniaCounties.shp’\n",
" - ‘notebook_data/us_states/us_states.shp’\n",
" - notebook_data/census/Places/cb_2018_06_place_500k.zip\n",
" - California counties shapefile (‘notebook_data/california_counties/CaliforniaCounties.shp’)\n",
" - United States states shapefile (‘notebook_data/us_states/us_states.shp’)\n",
" - California places cartographic [boundaries](https://www2.census.gov/geo/tiger/GENZ2019/shp/cb_2019_06_place_500k.zip) for 2019 from the United States Census Bureau ('notebook_data/census/Places/cb_2019_06_place_500k.zip')\n",
"\n",
"- Expected time to complete\n",
" - Lecture + Questions: 45 minutes\n",
" - Lecture and questions: 45 minutes\n",
" - Exercises: 10 minutes\n",
"</font>"
]
Expand Down Expand Up @@ -766,7 +767,7 @@
"\n",
"Now it's time to take a crack and managing the CRS of a new dataset. In the code cell below, write code to:\n",
"\n",
"1. Bring in the CA places data (`notebook_data/census/Places/cb_2018_06_place_500k.zip`)\n",
"1. Bring in the CA places data (`notebook_data/census/Places/cb_2019_06_place_500k.zip`)\n",
"2. Check if the CRS is EPSG code 26910. If not, transform the CRS\n",
"3. Plot the California counties and places together.\n",
"\n",
Expand Down Expand Up @@ -845,7 +846,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.3"
"version": "3.9.5"
}
},
"nbformat": 4,
Expand Down
15 changes: 8 additions & 7 deletions 04_More_Data_More_Maps.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,17 @@
"\n",
"<br>\n",
"<font color='grey'>\n",
" <b>Instructor Notes</b>\n",
"\n",
"**Instructor Notes**\n",
"\n",
"- Datasets used\n",
" - 'notebook_data/transportation/BerkeleyBikeBlvds.geojson'\n",
" - 'notebook_data/alco_schools.csv'\n",
" - 'notebook_data/parcels/parcel_pts_rand30pct.geojson'\n",
" - notebook_data/berkeley/BerkeleyCityLimits.shp\n",
" - Berkeley bike boulevards ('notebook_data/transportation/BerkeleyBikeBlvds.geojson')\n",
" - Alameda County schools ('notebook_data/alco_schools.csv')\n",
" - Housing parcels ('notebook_data/parcels/parcel_pts_rand30pct.geojson')\n",
" - Berkeley city limits ('notebook_data/berkeley/BerkeleyCityLimits.shp')\n",
"\n",
"- Expected time to complete\n",
" - Lecture + Questions: 30 minutes\n",
" - Lecture and questions: 30 minutes\n",
" - Exercises: 20 minutes\n",
"</font>"
]
Expand Down Expand Up @@ -642,7 +643,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.3"
"version": "3.9.5"
}
},
"nbformat": 4,
Expand Down
18 changes: 9 additions & 9 deletions 05_Data-Driven_Mapping.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@
"\n",
"<br>\n",
"<font color='grey'>\n",
" <b>Instructor Notes</b>\n",
"\n",
"**Instructor Notes**\n",
"\n",
"- Datasets used\n",
" - 'notebook_data/california_counties/CaliforniaCounties.shp'\n",
" - 'notebook_data/alco_schools.csv'\n",
" - 'notebook_data/transportation/BerkeleyBikeBlvds.geojson'\n",
" - California counties shapefile ('notebook_data/california_counties/CaliforniaCounties.shp')\n",
" - Alameda County schools ('notebook_data/alco_schools.csv')\n",
" - Berkeley bike boulevards ('notebook_data/transportation/BerkeleyBikeBlvds.geojson')\n",
"- Expected time to complete\n",
" - Lecture + Questions: 30 minutes\n",
" - Lecture and questions: 30 minutes\n",
" - Exercises: 15 minutes\n",
"</font>\n",
"\n",
Expand Down Expand Up @@ -134,8 +135,7 @@
"metadata": {},
"source": [
"That's really the heart of it. To set the color of the features based on the values in a column, set the `column` argument to the column name in the gdf.\n",
"> **Protip:** \n",
"- You can quickly right-click on the plot and save to a file or open in a new browser window."
"> **Protip:** You can quickly right-click on the plot and save to a file or open in a new browser window."
]
},
{
Expand All @@ -152,7 +152,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"We can also add a legend, and even tweak its display."
"We can also add a legend and even tweak its display."
]
},
{
Expand Down Expand Up @@ -879,7 +879,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.3"
"version": "3.9.5"
}
},
"nbformat": 4,
Expand Down
34 changes: 16 additions & 18 deletions 06_Spatial_Queries.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,27 @@
"- 6.0 Load and prep some data\n",
"- 6.1 Measurement Queries\n",
"- 6.2 Relationship Queries\n",
"- **Exercise**: Spatial Relationship Query\n",
"- **Exercise:** Spatial Relationship Query\n",
"- 6.3 Proximity Analysis\n",
"- **Exercise**: Proximity Analysis\n",
"- **Exercise:** Proximity Analysis\n",
"- 6.4 Recap\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"<br>\n",
"<font color='grey'>\n",
" <b>Instructor Notes</b>\n",
"\n",
"**Instructor Notes**\n",
"\n",
"- Datasets used\n",
" - 'notebook_data/census/Tracts/cb_2013_06_tract_500k.zip'\n",
" - 'notebook_data/protected_areas/CPAD_2020a_Units.shp'\n",
" - 'notebook_data/berkeley/BerkeleyCityLimits.shp'\n",
" - 'notebook_data/alco_schools.csv'\n",
" - 'notebook_data/transportation/BerkeleyBikeBlvds.geojson'\n",
" - 'notebook_data/transportation/bart.csv'\n",
" - California census tract cartographic [boundaries](https://www2.census.gov/geo/tiger/GENZ2019/shp/cb_2019_06_tract_500k.zip) for 2019 from the United States Census Bureau ('notebook_data/census/Tracts/cb_2019_06_tract_500k.zip')\n",
" - California protected areas ('notebook_data/protected_areas/CPAD_2020a_Units.shp')\n",
" - Berkeley city limits ('notebook_data/berkeley/BerkeleyCityLimits.shp')\n",
" - Alameda County schools ('notebook_data/alco_schools.csv')\n",
" - Berkeley bike boulevards ('notebook_data/transportation/BerkeleyBikeBlvds.geojson')\n",
" - Bay Area Rapid Transit (BART) stations ('notebook_data/transportation/bart.csv')\n",
"\n",
"- Expected time to complete\n",
" - Lecture + Questions: 45 minutes\n",
" - Lecture and questions: 45 minutes\n",
" - Exercises: 20 minutes\n",
"</font>"
]
Expand Down Expand Up @@ -110,7 +108,7 @@
"metadata": {},
"outputs": [],
"source": [
"census_tracts = gpd.read_file(\"zip://notebook_data/census/Tracts/cb_2013_06_tract_500k.zip\")\n",
"census_tracts = gpd.read_file(\"zip://notebook_data/census/Tracts/cb_2019_06_tract_500k.zip\")\n",
"census_tracts.plot()"
]
},
Expand Down Expand Up @@ -1006,7 +1004,7 @@
"- Measuring area and length\n",
"\t- `.area`, \n",
"\t- `.length`\n",
"- Relationship Queries\n",
"- Relationship queries\n",
"\t- `.intersects()`\n",
"\t- `.within()`\n",
"- Buffer analysis\n",
Expand Down Expand Up @@ -1036,9 +1034,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "geo_env2",
"display_name": "Python 3",
"language": "python",
"name": "geo_env2"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -1050,7 +1048,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.2"
"version": "3.9.5"
}
},
"nbformat": 4,
Expand Down
Loading