Regionalatlas
API zum Regionalatlas Deutschland der statistischen Ämter des Bundes und der Länder.
Der Regionalatlas Deutschland der Statistischen Ämter des Bundes und der Länder visualisiert aktuell laut statistischem Bundesamt mehr als 160 Indikatoren aus 20 Themenbereichen für Bundesländer, Regierungsbezirke, Kreisfreie Städte und Landkreise. Grundlage des Regionalatlas ist die Regionaldatenbank Deutschland.
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0
- Package version: 0.1.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
Requirements.
Python >= 3.6
Installation & Usage
pip install
pip install deutschland[Regionalatlas]
poetry install
poetry add deutschland -E Regionalatlas
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Usage
Import the package:
from deutschland import Regionalatlas
Getting Started
Please follow the installation procedure and then run the following:
import time
from deutschland import Regionalatlas
from pprint import pprint
from deutschland.Regionalatlas.api import default_api
configuration = Regionalatlas.Configuration(
host = "https://www.gis-idmz.nrw.de/arcgis/rest/services/stba/regionalatlas/MapServer/dynamicLayer"
)
with Regionalatlas.ApiClient(configuration) as api_client:
api_instance = default_api.DefaultApi(api_client)
layer = "%7B%22source%22%3A%7B%22dataSource%22%3A%7B%22geometryType%22%3A%22esriGeometryPolygon%22%2C%22workspaceId%22%3A%22gdb%22%2C%22query%22%3A%22SELECT%20*%20FROM%20verwaltungsgrenzen_gesamt%20LEFT%20OUTER%20JOIN%20ai002_1_5%20ON%20ags%20%3D%20ags2%20and%20jahr%20%3D%20jahr2%20WHERE%20typ%20%3D%201%20AND%20jahr%20%3D%202020%20AND%20(jahr2%20%3D%202020%20OR%20jahr2%20IS%20NULL)%22%2C%22oidFields%22%3A%22id%22%2C%22spatialReference%22%3A%7B%22wkid%22%3A25832%7D%2C%22type%22%3A%22queryTable%22%7D%2C%22type%22%3A%22dataLayer%22%7D%7D"
f = "json"
return_geometry = False
spatial_rel = "esriSpatialRelIntersects"
where = "1%3D1"
out_fields = "*"
try:
api_response = api_instance.query(layer, f, return_geometry, spatial_rel, where, out_fields=out_fields)
pprint(api_response)
except Regionalatlas.ApiException as e:
print("Exception when calling DefaultApi->query: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to https://www.gis-idmz.nrw.de/arcgis/rest/services/stba/regionalatlas/MapServer/dynamicLayer
Class | Method | HTTP request | Description |
---|
DefaultApi | query | GET /query | publicwebpageplus |
Documentation For Models
Documentation For Authorization
All endpoints do not require authorization.
Author
kontakt@bund.dev
Notes for Large OpenAPI documents
If the OpenAPI document is large, imports in Regionalatlas.apis and Regionalatlas.models may fail with a
RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:
Solution 1:
Use specific imports for apis and models like:
from deutschland.Regionalatlas.api.default_api import DefaultApi
from deutschland.Regionalatlas.model.pet import Pet
Solution 2:
Before importing the package, adjust the maximum recursion limit as shown below:
import sys
sys.setrecursionlimit(1500)
from deutschland import Regionalatlas
from deutschland.Regionalatlas.apis import *
from deutschland.Regionalatlas.models import *