Browse Source

lay pointplot on top of kdeplot

Fabian Peter Hammerle 4 years ago
parent
commit
e313935e6b
1 changed files with 13 additions and 21 deletions
  1. 13 21
      pollution.ipynb

+ 13 - 21
pollution.ipynb

@@ -126,34 +126,26 @@
    "source": [
     "import geoplot\n",
     "\n",
-    "ax = geoplot.polyplot(\n",
-    "    world[(world.continent == 'Europe')],\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 / facilities')\n",
-    "geoplot.pointplot(\n",
-    "    european_facilities_2011,\n",
-    "    s=0.4,\n",
-    "    ax=ax,\n",
-    ");"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
     "ax = geoplot.kdeplot(\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",
+    "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');"
    ]
   }