ogd-at-lab/notebooks/wien-ogd.ipynb

142 wiersze
3.5 KiB
Plaintext

{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Accessing Geodata from Data.wien.gv.at Services\n",
"\n",
"[![Binder](http://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/anitagraser/ogd-at-lab/main?urlpath=lab/tree/notebooks/wien-ogd.ipynb)\n",
"\n",
"<a href=\"https://www.data.gv.at/auftritte/?organisation=stadt-wien\"><img align=\"right\" src=\"./img/stadt-wien.png\"></a>\n",
"\n",
"This notebook demonstrates the use of vector data provided via WFS. For instructions on using WMS, see the [webmapping notebook](webmapping.ipynb).\n",
"\n",
"For more information on open government data in Vienna visit [digitales.wien.gv.at](https://digitales.wien.gv.at/site/open-data/)\n",
"\n",
"For a full list of available datasets go to [data.gv.at](https://www.data.gv.at/auftritte/?organisation=stadt-wien&searchterm=&formatFilter%5B%5D=WFS)\n",
"\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import hvplot.pandas\n",
"from utils.dataaccess import get_gdf_from_wfs\n",
"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, transport bicycle sharing stations:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"gdf = get_gdf_from_wfs('RADGRAETZELOGD')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"gdf.hvplot(geo=True, tiles='OSM', hover_cols='all')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"300 meters is often cited as the maximum walking distance to a bicycle sharing station."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"hvplot_with_buffer(gdf, 300)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"gdf2 = get_gdf_from_wfs('ELADESTELLEOGD')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"By comparision, the network of EV charging stations is much more comprehensive:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"hvplot_with_buffer(gdf, 100, title='Bike Sharing Stations') + hvplot_with_buffer(gdf2, 100, title='EV Charging Stations')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"election_districts = get_gdf_from_wfs('WAHLSPRGR2020OGD')\n",
"election_districts.hvplot(geo=True, tiles='OSM', alpha=0.5)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.15"
}
},
"nbformat": 4,
"nbformat_minor": 4
}