|
989 | 989 | " left_on = 'NEIGHB_NAME', right_on='NEIGHB_NAME').explore(column=\"DIAMETER\")" |
990 | 990 | ] |
991 | 991 | }, |
992 | | - { |
993 | | - "cell_type": "markdown", |
994 | | - "id": "6c2a2109", |
995 | | - "metadata": {}, |
996 | | - "source": [ |
997 | | - "## TEST YOUR SKILLS _OPTIONAL_\n", |
998 | | - "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", |
999 | | - "- start with the `trees_with_hoods` GeoDataFrame\n", |
1000 | | - "- load up and join the data from datapath / 'Madison_Tree_Species_Lookup.xlsx'\n", |
1001 | | - "- hint: check the dtypes before merging - if you are going to join on a column, the column must be the same dtype in both dataframes\n", |
1002 | | - "- Make a multipage PDF with a page for each neighborhood showing a bar chart of the top ten tree species (by name) in each neighborhood\n", |
1003 | | - "- Make a map (use explore, or save to SHP or geojson) showing the neighborhoods with a color-coded field showing the most common tree species for each neighborhood\n", |
1004 | | - "\n", |
1005 | | - "You will need a few pandas operations that we have only touched on a bit: \n", |
1006 | | - "\n", |
1007 | | - "`groupby`, `count`, `merge`, `read_excel`, `sort_values`, `iloc`" |
1008 | | - ] |
1009 | | - }, |
1010 | 992 | { |
1011 | 993 | "cell_type": "markdown", |
1012 | 994 | "id": "e63a1ab3", |
1013 | 995 | "metadata": {}, |
1014 | 996 | "source": [ |
1015 | | - "#### 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." |
| 997 | + "### 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." |
1016 | 998 | ] |
1017 | 999 | }, |
1018 | 1000 | { |
|
1117 | 1099 | "- how can you evaluate the areas of overlap for the intersection case?" |
1118 | 1100 | ] |
1119 | 1101 | }, |
| 1102 | + { |
| 1103 | + "cell_type": "markdown", |
| 1104 | + "id": "12c97da3-b68d-48a3-8888-2c946ae366db", |
| 1105 | + "metadata": {}, |
| 1106 | + "source": [ |
| 1107 | + "## TEST YOUR SKILLS _OPTIONAL_\n", |
| 1108 | + "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", |
| 1109 | + "- start with the `trees_with_hoods` GeoDataFrame\n", |
| 1110 | + "- load up and join the data from datapath / 'Madison_Tree_Species_Lookup.xlsx'\n", |
| 1111 | + "- hint: check the dtypes before merging - if you are going to join on a column, the column must be the same dtype in both dataframes\n", |
| 1112 | + "- Make a multipage PDF with a page for each neighborhood showing a bar chart of the top ten tree species (by name) in each neighborhood\n", |
| 1113 | + "- Make a map (use explore, or save to SHP or geojson) showing the neighborhoods with a color-coded field showing the most common tree species for each neighborhood\n", |
| 1114 | + "\n", |
| 1115 | + "You will need a few pandas operations that we have only touched on a bit: \n", |
| 1116 | + "\n", |
| 1117 | + "`groupby`, `count`, `merge`, `read_excel`, `sort_values`, `iloc`" |
| 1118 | + ] |
| 1119 | + }, |
1120 | 1120 | { |
1121 | 1121 | "cell_type": "code", |
1122 | 1122 | "execution_count": null, |
1123 | | - "id": "109ad057", |
| 1123 | + "id": "a8707ab2-d53a-423c-b5df-1cde26464c98", |
1124 | 1124 | "metadata": {}, |
1125 | 1125 | "outputs": [], |
1126 | 1126 | "source": [] |
|
0 commit comments