|
@@ -41,13 +41,46 @@
|
|
|
"\n",
|
|
|
"# http://geopandas.org/gallery/create_geopandas_from_pandas.html\n",
|
|
|
"pollutant_releases_geo = geopandas.GeoDataFrame(\n",
|
|
|
- " pollutant_releases,\n",
|
|
|
+ " pollutant_releases[[\n",
|
|
|
+ " 'FacilityID', 'Lat', 'Long', 'ReportingYear', 'PollutantName', \n",
|
|
|
+ " 'PollutantGroupName', 'TotalQuantity', 'TotalQuantity',\n",
|
|
|
+ " ]],\n",
|
|
|
" geometry=geopandas.points_from_xy(\n",
|
|
|
" pollutant_releases['Long'],\n",
|
|
|
" pollutant_releases['Lat'],\n",
|
|
|
" ),\n",
|
|
|
")\n",
|
|
|
- "pollutant_releases_geo.geometry.head()"
|
|
|
+ "pollutant_releases_geo.head()"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "code",
|
|
|
+ "execution_count": 5,
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [
|
|
|
+ {
|
|
|
+ "name": "stdout",
|
|
|
+ "output_type": "stream",
|
|
|
+ "text": [
|
|
|
+ "<class 'geopandas.geodataframe.GeoDataFrame'>\n",
|
|
|
+ "RangeIndex: 652351 entries, 0 to 652350\n",
|
|
|
+ "Data columns (total 9 columns):\n",
|
|
|
+ "FacilityID 652351 non-null int64\n",
|
|
|
+ "Lat 652351 non-null float64\n",
|
|
|
+ "Long 652351 non-null float64\n",
|
|
|
+ "ReportingYear 652351 non-null int64\n",
|
|
|
+ "PollutantName 652351 non-null object\n",
|
|
|
+ "PollutantGroupName 652351 non-null object\n",
|
|
|
+ "TotalQuantity 652351 non-null float64\n",
|
|
|
+ "TotalQuantity 652351 non-null float64\n",
|
|
|
+ "geometry 652351 non-null geometry\n",
|
|
|
+ "dtypes: float64(4), geometry(1), int64(2), object(2)\n",
|
|
|
+ "memory usage: 44.8+ MB\n"
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "source": [
|
|
|
+ "pollutant_releases_geo.info()"
|
|
|
]
|
|
|
},
|
|
|
{
|