import hvplot.pandas
import pandas as pd
import geopandas as gpd
from utils.dataaccess import gdf_from_wfs, get_airquality_df, get_heatvulnerabilityindex_gdf
uhvi = get_heatvulnerabilityindex_gdf()
uhvi.hvplot(geo=True, tiles='OSM', c='AVG_UHVI_A', title='Average Urban Heat Vulnerability Index - All age groups', cmap='Reds').opts(active_tools=['wheel_zoom'])
stations = gdf_from_wfs('LUFTGUETENETZOGD')
stations.set_index('NAME_KURZ', inplace=True)
stations.head()
air_quality = get_airquality_df()
air_quality.head()
col = 'airtemp °C'
stations.join(air_quality).dropna(subset=[col]).hvplot(geo=True, tiles='StamenToner', c=col, size=500, title=col.title())