kopia lustrzana https://github.com/anitagraser/ogd-at-lab
Porównaj commity
3 Commity
23d9044d32
...
772ac602fe
Autor | SHA1 | Data |
---|---|---|
Anita Graser | 772ac602fe | |
Anita Graser | 5fefdda3d6 | |
Anita Graser | d36a5f567f |
|
@ -82,8 +82,8 @@
|
|||
"outputs": [],
|
||||
"source": [
|
||||
"from utils.dataaccess import get_gdf_from_wfs\n",
|
||||
"citybike_gdf = get_gdf_from_wfs('CITYBIKEOGD')\n",
|
||||
"citybike_gdf = citybike_gdf.to_crs('epsg:3857')"
|
||||
"bike_gdf = get_gdf_from_wfs('RADGRAETZELOGD')\n",
|
||||
"bike_gdf = bike_gdf.to_crs('epsg:3857')"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -102,7 +102,7 @@
|
|||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"citybike_gdf['elevation'] = citybike_gdf.apply(get_elevation_for_row, axis=1)"
|
||||
"bike_gdf['elevation'] = bike_gdf.apply(get_elevation_for_row, axis=1)"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -111,7 +111,7 @@
|
|||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"citybike_gdf = citybike_gdf.to_crs('epsg:4326')"
|
||||
"bike_gdf = bike_gdf.to_crs('epsg:4326')"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -120,7 +120,7 @@
|
|||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"citybike_gdf.hvplot(c='elevation', geo=True, tiles='OSM', title='Citybike station elevation')"
|
||||
"bike_gdf.hvplot(c='elevation', geo=True, tiles='OSM', title='Bike station elevation')"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
"from urllib.request import urlretrieve\n",
|
||||
"import hvplot.pandas\n",
|
||||
"\n",
|
||||
"layer = 'CITYBIKEOGD'\n",
|
||||
"layer = 'RADGRAETZELOGD'\n",
|
||||
"file = f'data/{layer}.json'\n",
|
||||
"url = f\"https://data.wien.gv.at/daten/geo?service=WFS&request=GetFeature&version=1.1.0&typeName=ogdwien:{layer}&srsName=EPSG:4326&outputFormat=json\"\n",
|
||||
"urlretrieve(url, file)\n",
|
||||
|
@ -102,7 +102,7 @@
|
|||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"gdf.hvplot(geo=True, tiles='OSM', hover_cols=['STATION']).opts(active_tools=['wheel_zoom'])"
|
||||
"gdf.hvplot(geo=True, tiles='OSM', hover_cols='all').opts(active_tools=['wheel_zoom'])"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
|
@ -26,14 +26,17 @@
|
|||
"source": [
|
||||
"import hvplot.pandas\n",
|
||||
"from utils.dataaccess import get_gdf_from_wfs\n",
|
||||
"from utils.plotting import hvplot_with_buffer"
|
||||
"from utils.plotting import hvplot_with_buffer\n",
|
||||
"from holoviews import opts\n",
|
||||
"\n",
|
||||
"opts.defaults(opts.Overlay(active_tools=['wheel_zoom'], frame_width=500, frame_height=400))\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"For example, Citybike stations:"
|
||||
"For example, transport bicycle sharing stations:"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -42,7 +45,7 @@
|
|||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"gdf = get_gdf_from_wfs('CITYBIKEOGD')"
|
||||
"gdf = get_gdf_from_wfs('RADGRAETZELOGD')"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -51,7 +54,7 @@
|
|||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"gdf.hvplot(geo=True, tiles='OSM', hover_cols=['STATION']).opts(active_tools=['wheel_zoom'])"
|
||||
"gdf.hvplot(geo=True, tiles='OSM', hover_cols='all')"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -102,7 +105,7 @@
|
|||
"outputs": [],
|
||||
"source": [
|
||||
"election_districts = get_gdf_from_wfs('WAHLSPRGR2020OGD')\n",
|
||||
"election_districts.hvplot(geo=True, tiles='OSM', alpha=0.5).opts(active_tools=['wheel_zoom'])"
|
||||
"election_districts.hvplot(geo=True, tiles='OSM', alpha=0.5)"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
Ładowanie…
Reference in New Issue