{ "cells": [ { "cell_type": "markdown", "id": "5694c920-c12c-40b6-bf05-c7a48ea9598e", "metadata": {}, "source": [ "# Simple examples - Extraction\n", "\n", "This notebook is just a small reference on how to request OSM data via the ohsome-API:\n", "\n", "- features for single timestamp\n", "- collections for singe timestamp\n", "- collections members for single timestamp\n", "- contributions for time range" ] }, { "cell_type": "code", "execution_count": 1, "id": "2ecc8374-d973-4ee5-857b-926065328367", "metadata": {}, "outputs": [], "source": [ "import os\n", "from io import BytesIO\n", "\n", "import geopandas as gpd\n", "import httpx" ] }, { "cell_type": "code", "execution_count": 2, "id": "634573b8-f011-4b89-a7e7-725372497e9e", "metadata": {}, "outputs": [], "source": [ "OHSOME_API_URL = os.getenv(\"OHSOME_API_URL\", \"https://api.heigit.org/ohsome-api/v2-rc\")\n", "OHSOME_API_KEY = os.getenv(\n", " \"OHSOME_API_KEY\", \"\"\n", ") # insert your api key as env or default value here" ] }, { "cell_type": "markdown", "id": "e3e87aea-86c7-47f3-8f1a-3da90fceecc0", "metadata": {}, "source": [ "## Features for single timestamp\n", "A simple example to extract all bus stops in Heidelberg." ] }, { "cell_type": "code", "execution_count": 31, "id": "569c29de-26ce-4879-b781-933eb4606690", "metadata": {}, "outputs": [ { "data": { "text/html": [ "