kopia lustrzana https://github.com/anitagraser/ogd-at-lab
Fix air quality reading
rodzic
889387f34f
commit
c755e4313c
|
@ -25,7 +25,7 @@
|
||||||
"import hvplot.pandas\n",
|
"import hvplot.pandas\n",
|
||||||
"import pandas as pd\n",
|
"import pandas as pd\n",
|
||||||
"import geopandas as gpd\n",
|
"import geopandas as gpd\n",
|
||||||
"from utils.dataaccess import gdf_from_wfs, get_weather_df, get_heatvulnerabilityindex_gdf"
|
"from utils.dataaccess import gdf_from_wfs, get_airquality_df, get_heatvulnerabilityindex_gdf"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"heatvulidx = get_heatvulnerabilityindex_gdf()"
|
"uhvi = get_heatvulnerabilityindex_gdf()"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -52,14 +52,16 @@
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"heatvulidx.hvplot(geo=True, tiles='OSM', c='AVG_UHVI_A', title='Average Urban Heat Vulnerability Index - All age groups').opts(active_tools=['wheel_zoom'])"
|
"uhvi.hvplot(geo=True, tiles='OSM', c='AVG_UHVI_A', title='Average Urban Heat Vulnerability Index - All age groups').opts(active_tools=['wheel_zoom'])"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"## Air Quality"
|
"## Air Quality\n",
|
||||||
|
"\n",
|
||||||
|
"Dataset: [Luftmessnetz: aktuelle Messdaten Wien](https://www.data.gv.at/katalog/dataset/luftmessnetz-aktuelle-messdaten-wien/)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -78,8 +80,8 @@
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"weather = get_weather_df()\n",
|
"air_quality = get_airquality_df()\n",
|
||||||
"weather"
|
"air_quality"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
"## Lab notebooks\n",
|
"## Lab notebooks\n",
|
||||||
"\n",
|
"\n",
|
||||||
"1. [Accessing geodata from data.wien.gv.at services](wien-ogd.ipynb)\n",
|
"1. [Accessing geodata from data.wien.gv.at services](wien-ogd.ipynb)\n",
|
||||||
"1. [Environmental conditions in Vienna](environment.ipynb)\n",
|
"1. [Monitoring environmental conditions in Vienna](environment.ipynb)\n",
|
||||||
"1. [Geocoding addresses](geocoding.ipynb)\n",
|
"1. [Geocoding addresses](geocoding.ipynb)\n",
|
||||||
"1. [Getting elevation information](elevation.ipynb)"
|
"1. [Getting elevation information](elevation.ipynb)"
|
||||||
]
|
]
|
||||||
|
|
|
@ -49,14 +49,14 @@ def get_elevation(point):
|
||||||
elevationall = line.split(' ', 1 )[1]
|
elevationall = line.split(' ', 1 )[1]
|
||||||
return int(elevationall)
|
return int(elevationall)
|
||||||
|
|
||||||
def get_weather_df():
|
def get_airquality_df():
|
||||||
"""
|
"""
|
||||||
Get data from https://go.gv.at/l9lumesakt
|
Get data from https://go.gv.at/l9lumesakt
|
||||||
"""
|
"""
|
||||||
file = 'lumesakt.csv'
|
file = 'lumesakt.csv'
|
||||||
url = 'https://go.gv.at/l9lumesakt'
|
url = 'https://go.gv.at/l9lumesakt'
|
||||||
urlretrieve(url, file)
|
urlretrieve(url, file)
|
||||||
df = pd.read_csv(file)
|
df = pd.read_csv(file, sep=';', encoding='latin1')
|
||||||
return df
|
return df
|
||||||
|
|
||||||
def get_heatvulnerabilityindex_df():
|
def get_heatvulnerabilityindex_df():
|
||||||
|
|
Ładowanie…
Reference in New Issue