|
@@ -100,15 +100,7 @@
|
|
|
"metadata": {},
|
|
|
"outputs": [],
|
|
|
"source": [
|
|
|
- "ax = world[(world.continent == 'Europe')].plot(\n",
|
|
|
- " edgecolor='black',\n",
|
|
|
- " color='white',\n",
|
|
|
- " figsize=(20, 12),\n",
|
|
|
- ")\n",
|
|
|
- "ax.set_xlim(-28, 32)\n",
|
|
|
- "ax.set_ylim(32, 75)\n",
|
|
|
- "ax.set_title('E-PRTR_database_v17_xls.zip / Pollutant releases.xlsx / 2011')\n",
|
|
|
- "pollutant_releases_geo[pollutant_releases_geo.ReportingYear == 2011].plot(ax=ax, markersize=0.1);"
|
|
|
+ "%config InlineBackend.figure_format = 'retina'"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
@@ -117,12 +109,13 @@
|
|
|
"metadata": {},
|
|
|
"outputs": [],
|
|
|
"source": [
|
|
|
- "european_facilities = geopandas.GeoDataFrame(pollutant_releases_geo[\n",
|
|
|
+ "european_facilities_2011 = geopandas.GeoDataFrame(pollutant_releases_geo[\n",
|
|
|
" (pollutant_releases_geo.Long > -28)\n",
|
|
|
" & (pollutant_releases_geo.Long < 32)\n",
|
|
|
" & (pollutant_releases_geo.Lat > 32)\n",
|
|
|
" & (pollutant_releases_geo.Lat < 75)\n",
|
|
|
- "].groupby('FacilityID').first())"
|
|
|
+ " & (pollutant_releases_geo.ReportingYear == 2011)\n",
|
|
|
+ "].set_index('FacilityID').groupby('FacilityID').first())"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
@@ -134,14 +127,26 @@
|
|
|
"import geoplot\n",
|
|
|
"\n",
|
|
|
"ax = geoplot.kdeplot(\n",
|
|
|
- " european_facilities,\n",
|
|
|
+ " european_facilities_2011,\n",
|
|
|
" clip=world.geometry,\n",
|
|
|
" shade=True,\n",
|
|
|
" cmap='Reds',\n",
|
|
|
" projection=geoplot.crs.AlbersEqualArea(),\n",
|
|
|
- " figsize=(24, 16),\n",
|
|
|
+ " figsize=(20, 12),\n",
|
|
|
+ " # extent=(-28, 32, 32, 75),\n",
|
|
|
+ ")\n",
|
|
|
+ "geoplot.polyplot(\n",
|
|
|
+ " world.geometry,\n",
|
|
|
+ " ax=ax,\n",
|
|
|
+ " linewidth=1,\n",
|
|
|
")\n",
|
|
|
- "ax.set_title('E-PRTR_database_v17_xls.zip / Pollutant releases.xlsx / kdeplot')"
|
|
|
+ "geoplot.pointplot(\n",
|
|
|
+ " european_facilities_2011,\n",
|
|
|
+ " color='orange',\n",
|
|
|
+ " s=0.4,\n",
|
|
|
+ " ax=ax,\n",
|
|
|
+ ");\n",
|
|
|
+ "ax.set_title('E-PRTR_database_v17_xls.zip / Pollutant releases.xlsx / 2011 / facilities');"
|
|
|
]
|
|
|
}
|
|
|
],
|