Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 20 additions & 2 deletions notebooks/part0_python_intro/09_a_Geopandas.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,8 @@
"id": "50525a00",
"metadata": {},
"source": [
"### How about some spatial joins?"
"## How about some spatial joins?\n",
"***"
]
},
{
Expand Down Expand Up @@ -824,6 +825,7 @@
"metadata": {},
"source": [
"## TEST YOUR SKILLS #1\n",
"***\n",
"Using the `bounds` geodataframe you just made, write a function to visualize predicate behaviors.\n",
"- your function should accept a left geodataframe, a right geodataframe, and a string for the predicate\n",
"- your function should plot:\n",
Expand Down Expand Up @@ -994,7 +996,11 @@
"id": "e63a1ab3",
"metadata": {},
"source": [
"### As we've seen, spatial joins are powerful, but they really only gather data from multiple collections. What if we want to actually calculate the amount of overlap among shapes? Or create new shapes based on intersection or not intersection of shapes? [`overlay`](https://geopandas.org/en/stable/docs/user_guide/set_operations.html?highlight=overlay) does these things."
"## Overlays\n",
"***\n",
"### As we've seen, spatial joins are powerful, but they really only gather data from multiple collections. What if we want to actually calculate the amount of overlap among shapes? Or create new shapes based on intersection or not intersection of shapes?\n",
"\n",
"### [overlay](https://geopandas.org/en/stable/docs/user_guide/set_operations.html?highlight=overlay) does these things."
]
},
{
Expand All @@ -1016,6 +1022,17 @@
"inters.plot()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "3b39f0f7-2e68-4840-b8fc-d53e3a3d1b3f",
"metadata": {},
"outputs": [],
"source": [
"inters = bounds.overlay(isthmus, how='intersection')\n",
"inters.plot()"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -1105,6 +1122,7 @@
"metadata": {},
"source": [
"## TEST YOUR SKILLS _OPTIONAL_\n",
"***\n",
"We have an Excel file that contains a crosswalk between SPECIES number as provided and species name. Can we bring that into our dataset and evaluate some conclusions about tree species by neighborhood?\n",
"- start with the `trees_with_hoods` GeoDataFrame\n",
"- load up and join the data from datapath / 'Madison_Tree_Species_Lookup.xlsx'\n",
Expand Down
12 changes: 0 additions & 12 deletions notebooks/part0_python_intro/10a_Rasterio_intro.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -815,18 +815,6 @@
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.2"
}
},
"nbformat": 4,
Expand Down
Loading