### Start Backend Server with Local Python Source: https://github.com/earthobservations/wetterdienst/blob/main/frontend/tests/e2e/README.md Commands to install the Wetterdienst locally and start the backend API server. This is an alternative to using Docker. ```bash # From the project root pip install -e . wetterdienst restapi --listen 0.0.0.0:3000 ``` -------------------------------- ### Clone Repository and Install Prerequisites Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/contribution/development.md Clone the Wetterdienst repository and install necessary prerequisites like git, python, and uv. Installation commands vary for macOS, Linux, and Windows. ```bash git clone https://github.com/earthobservations/wetterdienst cd wetterdienst # Prerequisites ## Mac brew install git python uv ## Linux sudo apt install git python3 python3-venv uv ## Windows # install via chocolatey or manually # Regarding `uv` the following page lists all releases: # - https://github.com/astral-sh/uv/releases ``` -------------------------------- ### Install wetterdienst via PyPI Source: https://github.com/earthobservations/wetterdienst/blob/main/README.md Install the standard version of the wetterdienst library using pip. ```bash pip install wetterdienst ``` -------------------------------- ### Start Backend Server with Docker Compose Source: https://github.com/earthobservations/wetterdienst/blob/main/frontend/tests/e2e/README.md Command to start the Wetterdienst backend server using Docker Compose. This is the recommended method. ```bash # From the project root docker compose --profile backend up -d ``` -------------------------------- ### Check wetterdienst installation Source: https://github.com/earthobservations/wetterdienst/blob/main/README.md Verify the installation of the wetterdienst library by running the command-line interface help command. ```bash wetterdienst --help ``` -------------------------------- ### Install wetterdienst from GitHub Source: https://github.com/earthobservations/wetterdienst/blob/main/README.md Install the most recent version of the wetterdienst library directly from its GitHub repository. ```bash pip install git+https://github.com/earthobservations/wetterdienst ``` -------------------------------- ### Install system dependencies for Raspberry Pi Source: https://github.com/earthobservations/wetterdienst/blob/main/README.md Install necessary system packages like gfortran and lxml on Raspberry Pi/Linux ARM before installing wetterdienst. ```bash # not all installations may be required to get lxml running sudo apt-get install gfortran sudo apt-get install libopenblas-base sudo apt-get install libopenblas-dev sudo apt-get install libatlas-base-dev sudo apt-get install python3-lxml ``` -------------------------------- ### Install Frontend Dependencies Source: https://github.com/earthobservations/wetterdienst/blob/main/AGENTS.md Installs all necessary dependencies for the Nuxt 3 / Vue 3 frontend using pnpm. Run this after cloning the repository or updating dependencies. ```bash cd frontend pnpm install ``` -------------------------------- ### Install wetterdienst with SQL support Source: https://github.com/earthobservations/wetterdienst/blob/main/README.md Install wetterdienst with the 'sql' extra, which includes support for querying data using DuckDB. ```bash pip install wetterdienst[sql] ``` -------------------------------- ### Acquire and Process DWD RADOLAN CDC Data with wradlib Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/usage/python-examples.md Example of acquiring RADOLAN_CDC data with daily resolution from DWD using wetterdienst and processing it with wradlib. Data is rounded to HH:50min for RADOLAN_CDC. Requires wetterdienst and wradlib to be installed. ```python from wetterdienst.provider.dwd.radar import DwdRadarValues, DwdRadarParameter, DwdRadarResolution import wradlib as wrl radar = DwdRadarValues( parameter=DwdRadarParameter.RADOLAN_CDC, resolution=DwdRadarResolution.DAILY, start_date="2020-09-04T12:00:00", end_date="2020-09-04T12:00:00" ) for item in radar.query(): # Decode data using wradlib. data, attributes = wrl.io.read_radolan_composite(item.data) # Do something with the data (numpy.ndarray) here. break attributes ``` -------------------------------- ### Synchronize Dependencies with uv Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/contribution/development.md Install all required dependencies, including extras and all groups, using the `uv sync` command. ```bash uv sync --all-extras --all-groups ``` -------------------------------- ### Install Playwright Browsers Source: https://github.com/earthobservations/wetterdienst/blob/main/frontend/tests/e2e/README.md Commands to install Playwright browsers. You can install the default browser, all browsers, or specific ones. ```bash # Install Firefox (current default) npx playwright install firefox # Or install all browsers npx playwright install # Or install specific browsers npx playwright install chromium webkit ``` -------------------------------- ### Start Wetterdienst REST API Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/usage/restapi.md Invoke the Wetterdienst REST API from the command line. ```bash wetterdienst restapi ``` -------------------------------- ### Start REST API Server Source: https://github.com/earthobservations/wetterdienst/blob/main/AGENTS.md Launches the Wetterdienst REST API server, listening on all interfaces (0.0.0.0) on port 3000. This makes the API accessible locally. ```bash wetterdienst restapi --listen 0.0.0.0:3000 ``` -------------------------------- ### Run Full Stack Docker Compose Source: https://github.com/earthobservations/wetterdienst/blob/main/AGENTS.md Starts both the backend and frontend services using Docker Compose. This provides a complete local development environment. ```bash docker compose --profile app up ``` -------------------------------- ### Use wetterdienst command line in Docker Source: https://github.com/earthobservations/wetterdienst/blob/main/README.md Demonstrates how to create an alias for the wetterdienst Docker command for convenient shell usage and shows example commands. ```bash # Make an alias to use it conveniently from your shell. alias wetterdienst='docker run -ti ghcr.io/earthobservations/wetterdienst wetterdienst' wetterdienst --help wetterdienst --version wetterdienst info ``` -------------------------------- ### Get Station History Snapshots (Python) Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/usage/station_history.md Retrieve historical station metadata snapshots for a given station ID and date range using the Python API. This example shows how to access different aspects of the station's history, such as name changes, device updates, geographical information, parameter changes, and missing data periods. ```python from src.wetterdienst import Settings from src.wetterdienst.provider.dwd.observation import DwdObservationRequest settings = Settings() # Get history snapshots for station 1048 between 2010-01-01 and 2020-01-01 request = DwdObservationRequest( parameters=[("daily", "kl")], settings=settings ).filter_by_station_id(1048) history = next(request.history.query()) # access history for climate summary daily station 1048 (Dresden Klotzsche) # naming for station_name_change in history.history.name.station: print(station_name_change) for operator_name_change in history.history.name.operator: print(operator_name_change) # device changes for device_change in history.history.device: print(device_change) # geography changes print(history.history.geography) # parameter (measurement) changes print(history.history.parameter) # missing data periods print(history.history.missing_data) ``` -------------------------------- ### Run Full Test Suite Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/contribution/development.md Execute the entire test suite using `uv run poe test`. Ensure Firefox and geckodriver are installed. ```bash uv run poe test ``` -------------------------------- ### Sync Dependencies (Python Backend) Source: https://github.com/earthobservations/wetterdienst/blob/main/AGENTS.md Synchronizes project dependencies, ensuring all required packages are installed and up-to-date. ```bash uv run poe sync ``` -------------------------------- ### Run Frontend Only with Docker Compose Source: https://github.com/earthobservations/wetterdienst/blob/main/AGENTS.md Starts only the frontend service using Docker Compose, accessible on port 4000. Useful for focusing on frontend development. ```bash docker compose --profile frontend up ``` -------------------------------- ### Start Frontend Dev Server Source: https://github.com/earthobservations/wetterdienst/blob/main/AGENTS.md Launches the Nuxt 3 / Vue 3 development server, typically on port 4000. Enables live reloading and hot module replacement during development. ```bash pnpm dev ``` -------------------------------- ### Python API Usage Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/usage/station_history.md Example of how to retrieve station history using the Python API. ```APIDOC ## Python API Usage Example usage via the Python API: ```python from src.wetterdienst import Settings from src.wetterdienst.provider.dwd.observation import DwdObservationRequest settings = Settings() # Get history snapshots for station 1048 between 2010-01-01 and 2020-01-01 request = DwdObservationRequest( parameters=[("daily", "kl")], settings=settings ).filter_by_station_id(1048) history = next(request.history.query()) # access history for climate summary daily station 1048 (Dresden Klotzsche) # naming for station_name_change in history.history.name.station: print(station_name_change) for operator_name_change in history.history.name.operator: print(operator_name_change) # device changes for device_change in history.history.device: print(device_change) # geography changes print(history.history.geography) # parameter (measurement) changes print(history.history.parameter) # missing data periods print(history.history.missing_data) ``` ``` -------------------------------- ### Run Backend Only with Docker Compose Source: https://github.com/earthobservations/wetterdienst/blob/main/AGENTS.md Starts only the backend service using Docker Compose, accessible on port 3000. Useful for focusing on backend development. ```bash docker compose --profile backend up ``` -------------------------------- ### Query API Coverage Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/usage/restapi.md Get information about the API's coverage using httpie. ```bash http localhost:7890/api/coverage ``` -------------------------------- ### Wetterdienst CLI: Get All Stations Source: https://github.com/earthobservations/wetterdienst/blob/main/README.md Use this command to retrieve a list of all available stations for daily climate summary data in JSON format. Specify the provider and network for accurate results. ```bash wetterdienst stations --provider=dwd --network=observation --parameters=daily/kl --all ``` -------------------------------- ### List All Wetterdienst Parameters Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/data/parameters.md Get a list of all available parameter names from the core Parameter enumeration. This can be used to understand the scope of data available across different weather services. ```python from wetterdienst.metadata.parameter import Parameter parameters = [parameter.value.lower() for parameter in Parameter] print(f"Number of parameters: {len(parameters)}") print("Parameters:") print("\n".join(parameters)) ``` -------------------------------- ### Get historical climate summary Source: https://github.com/earthobservations/wetterdienst/blob/main/README.md Example of fetching historical climate summary data for specific German stations between 1990 and 2020 using DwdObservationRequest. Settings are configured for tidy data, humanized parameters, and unit conversion. ```python from wetterdienst import Settings from wetterdienst.provider.dwd.observation import DwdObservationRequest settings = Settings( ts_shape="long", # tidy data ts_humanize=True, # humanized parameters ts_convert_units=True # convert values to SI units ) request = DwdObservationRequest( parameters=[ ("daily", "climate_summary", "precipitation_height"), ], start_date="2002-08-11", # if not given timezone defaulted to UTC end_date="2002-08-13", # if not given timezone defaulted to UTC settings=settings ).filter_by_station_id(station_id=(5779,)) stations = request.df stations.head() # ┌────────────┬─────────────────┬────────────┬─────────────────────────┬───┬───────────┬────────┬──────────────────────┬─────────┐ # │ resolution ┆ dataset ┆ station_id ┆ start_date ┆ … ┆ longitude ┆ height ┆ name ┆ state │ # │ --- ┆ --- ┆ --- ┆ --- ┆ ┆ --- ┆ --- ┆ --- ┆ --- │ # │ str ┆ str ┆ str ┆ datetime[μs, UTC] ┆ ┆ f64 ┆ f64 ┆ str ┆ str │ ``` -------------------------------- ### Get All Stations Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/usage/python-api.md Retrieve information about all available stations for a given dataset/parameter and period. ```APIDOC ## Get All Stations Retrieve information about all available stations for a given dataset/parameter and period. ### Code Example ```python import datetime as dt from wetterdienst.provider.dwd.observation import DwdObservationRequest request = DwdObservationRequest( parameters=("daily", "precipitation_more"), start_date=dt.datetime(2020, 1, 1), end_date=dt.datetime(2020, 1, 20) ) stations = request.all() df = stations.df print(df) ``` ### Response The function returns a Polars DataFrame with information about the available stations. ``` -------------------------------- ### Import and Show Default Settings Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/usage/settings.md Import the Settings class and display the default configuration. This is useful for understanding the initial state of the settings. ```python from wetterdienst import Settings settings = Settings() settings ``` -------------------------------- ### Build Wheel Package Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/contribution/development.md Create a recent wheel package from the current working tree using the `uv build` command. ```bash uv build ``` -------------------------------- ### Get All Available Units Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/usage/units.md Instantiate UnitConverter to view all available units for each unit type. ```python from wetterdienst.model.unit import UnitConverter unit_converter = UnitConverter() unit_converter.units ``` -------------------------------- ### Get Default Units Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/usage/units.md Instantiate UnitConverter to view the default units for each unit type. ```python from wetterdienst.model.unit import UnitConverter unit_converter = UnitConverter() unit_converter.targets ``` -------------------------------- ### Get historical period enum Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/usage/python-api.md Demonstrates how to access the Period enumeration for historical data. ```python from wetterdienst.metadata.period import Period Period.HISTORICAL ``` -------------------------------- ### Discover available APIs Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/usage/python-api.md Use Wetterdienst.discover() to find out which APIs are available. ```python from wetterdienst import Wetterdienst coverage = Wetterdienst.discover() coverage ``` -------------------------------- ### Build Frontend for Production Source: https://github.com/earthobservations/wetterdienst/blob/main/AGENTS.md Creates a production-ready build of the Nuxt 3 / Vue 3 frontend. This optimizes assets and code for deployment. ```bash pnpm build ``` -------------------------------- ### Get DWD MOSMIX-LARGE Data Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/usage/python-examples.md Retrieve MOSMIX-LARGE data from DWD. Requires importing DwdMosmixRequest. ```python from wetterdienst.provider.dwd.mosmix import DwdMosmixRequest stations = DwdMosmixRequest( parameters=("hourly", "large"), ) stations = request.all() df = stations.df df ``` -------------------------------- ### Initialize Wetterdienst API Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/usage/python-api.md Instantiate the Wetterdienst API by specifying the provider and network of data. ```python from wetterdienst import Wetterdienst Wetterdienst(provider="dwd", network="observation") ``` -------------------------------- ### Display Wetterdienst CLI Help Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/usage/cli.md Prints the help message for the wetterdienst CLI. Use this to understand available commands and options. ```python from wetterdienst.ui.cli import wetterdienst_help print(wetterdienst_help) ``` -------------------------------- ### Get DWD MOSMIX-SMALL Stations Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/usage/python-examples.md Retrieve stations for MOSMIX-SMALL data from DWD. Requires importing DwdMosmixRequest. ```python from wetterdienst.provider.dwd.mosmix import DwdMosmixRequest request = DwdMosmixRequest( parameters=("hourly", "small"), ) stations = request.all() df = stations.df df ``` -------------------------------- ### Get Cache Path Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/known_issues.md Run this code to find the path to your caching folder. This can be useful when troubleshooting cache-related issues. ```python import wetterdienst wetterdienst.info() ``` -------------------------------- ### Discover DWD Observation Metadata Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/usage/python-examples.md Get available parameters for daily historical data from DWD. Requires importing DwdObservationRequest. ```python from wetterdienst.provider.dwd.observation import DwdObservationRequest metadata = DwdObservationRequest.discover( resolutions="daily", ) metadata ``` -------------------------------- ### Initialize Wetterdienst API Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/usage/python-api.md Initialize the Wetterdienst API by specifying the provider and network of data. ```APIDOC ## Initialize Wetterdienst API Initialize the Wetterdienst API by specifying the provider and network of data. ### Code Example ```python from wetterdienst import Wetterdienst Wetterdienst(provider="dwd", network="observation") ``` ``` -------------------------------- ### Get DWD Field Metadata (Precipitation, Hourly, Historical) Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/data/provider/dwd/observation/index.md Retrieves metadata for historical hourly precipitation observations in English. ```bash # Historical hourly station observations of precipitation for Germany. # English language. wetterdienst dwd about fields --parameter=precipitation --resolution=hourly --period=historical ``` -------------------------------- ### Fetch Weather Data with Skip Empty Settings Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/usage/python-api.md Configure settings to skip empty stations based on a minimum skip criterion and threshold. This is useful when filtering by rank to avoid stations with insufficient data. ```python from wetterdienst import Settings from wetterdienst.provider.dwd.observation import DwdObservationRequest settings = Settings(ts_skip_empty=True, ts_skip_criteria="min", ts_skip_threshold=0.2) karlsruhe = (49.19780976647141, 8.135207205143768) request = DwdObservationRequest( parameters=[("daily", "kl")], start_date="2021-01-01", end_date="2021-12-31", settings=settings, ) stations = request.filter_by_rank(latlon=karlsruhe, rank=2) values = stations.values.all() print(values.df.head()) # df_stations has only stations that appear in the values values.df_stations ``` -------------------------------- ### Get DWD Daily Precipitation Stations Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/usage/python-examples.md Retrieve all stations for daily historical precipitation data from DWD. Requires importing DwdObservationRequest. ```python from wetterdienst.provider.dwd.observation import DwdObservationRequest request = DwdObservationRequest( parameters=("daily", "precipitation_more"), periods="historical", ) stations = request.all() df = stations.df df ``` -------------------------------- ### Build OCI Images for Docker Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/contribution/development.md Build OCI images suitable for Docker, Podman, and Kubernetes. Set necessary environment variables and use `docker build` with the specified tag and Dockerfile. ```bash export DOCKER_BUILDKIT=1 export COMPOSE_DOCKER_CLI_BUILD=1 export BUILDKIT_PROGRESS=plain docker build \ --tag=local/wetterdienst \ --file=.github/release/Dockerfile \ . ``` -------------------------------- ### Get Cache Directory Location Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/usage/python-api.md Retrieve the current cache directory location used by wetterdienst settings. This is useful for managing cache files. ```python from wetterdienst import Settings settings = Settings() settings.cache_dir ``` -------------------------------- ### Get all stations for a given parameter and period Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/usage/python-api.md Retrieve all available stations for a specific dataset/parameter and time period. The result is returned as a Polars DataFrame. ```python import datetime as dt from wetterdienst.provider.dwd.observation import DwdObservationRequest request = DwdObservationRequest( parameters=("daily", "precipitation_more"), start_date=dt.datetime(2020, 1, 1), end_date=dt.datetime(2020, 1, 20) ) stations = request.all() df = stations.df df ``` -------------------------------- ### Run CLI Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/usage/docker.md Invoke the wetterdienst command line interface within a Docker container to check its version. ```bash docker run -it --rm ghcr.io/earthobservations/wetterdienst wetterdienst --version ``` -------------------------------- ### Run Specific Tests by Tags Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/contribution/development.md Execute tests filtered by tags using the `-m` flag, for example, to exclude remote or slow tests. ```bash # Run tests by tags. uv run poe test -m "not (remote or slow)" ``` -------------------------------- ### Configure swap file on Raspberry Pi Source: https://github.com/earthobservations/wetterdienst/blob/main/README.md Instructions to increase the swap file size to 2048 MB on Raspberry Pi, which may be required for running wetterdienst. ```bash sudo nano /etc/dphys-swapfile ``` -------------------------------- ### Run Single Test File (Python Backend) Source: https://github.com/earthobservations/wetterdienst/blob/main/AGENTS.md Executes tests from a specific file. Useful for focusing on a particular module or feature. ```bash uv run pytest tests/provider/dwd/observation/test_api.py -vvv ``` -------------------------------- ### Define parameters using a list of metadata objects Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/usage/python-api.md Create a DwdObservationRequest by providing a list of metadata objects, allowing for multiple dataset selections. ```python from wetterdienst.provider.dwd.observation import DwdObservationRequest, DwdObservationMetadata DwdObservationRequest( parameters=[DwdObservationMetadata.daily.kl, DwdObservationMetadata.daily.more_precip] ) ``` -------------------------------- ### Acquire ICON Data Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/usage/restapi.md Acquire ICON weather data for a specific station and date. ```bash http localhost:7890/api/values provider==dwd network==dmo parameters==hourly/icon/temperature_air_mean_2m station==01001 date==2024-05-27 ``` -------------------------------- ### Query First Daily Precipitation Values from DWD Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/usage/python-examples.md Get the first set of daily historical precipitation values from DWD. Requires importing DwdObservationRequest. ```python from wetterdienst.provider.dwd.observation import DwdObservationRequest request = DwdObservationRequest( parameters=("daily", "precipitation_more"), periods="historical", ) first_values = next(request.all().values.query()) df = first_values.df df ``` -------------------------------- ### CI/CD Workflow for E2E Tests Source: https://github.com/earthobservations/wetterdienst/blob/main/frontend/tests/e2e/README.md Commands for integrating E2E tests into a CI/CD pipeline. Ensures backend is running before tests and cleans up afterwards. ```bash # Start backend docker compose --profile backend up -d # Run E2E tests npm run test:e2e # Cleanup docker compose --profile backend down ``` -------------------------------- ### Run All E2E Tests (Headless) Source: https://github.com/earthobservations/wetterdienst/blob/main/frontend/tests/e2e/README.md Execute all end-to-end tests in headless mode. This is typically used for automated runs. ```bash npm run test:e2e ``` -------------------------------- ### Get DWD Field Metadata (Air Temperature, 10 Minutes, Historical) Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/data/provider/dwd/observation/index.md Retrieves metadata for historical 10-minute air temperature observations in German. ```bash # Historical 10-minute station observations of pressure, air temperature (at 5cm and 2m height), humidity and dew point for Germany. # German language. wetterdienst dwd about fields --parameter=air_temperature --resolution=10_minutes --period=historical --language=de ``` -------------------------------- ### Query Weather Data using SQL Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/usage/python-api.md Filters weather data using SQL queries on a virtual 'data' table. Requires DwdObservationRequest, settings, and filtering by station ID. ```python from wetterdienst import Settings from wetterdienst.provider.dwd.observation import DwdObservationRequest settings = Settings(ts_shape="long", ts_humanize=True, ts_convert_units=True) # defaults request = DwdObservationRequest( parameters=("hourly", "temperature_air", "temperature_air_mean_2m"), start_date="2019-01-01", end_date="2020-01-01", settings=settings ) stations = request.filter_by_station_id(station_id=[1048]) values = stations.values.all() df = values.filter_by_sql("parameter='temperature_air_mean_2m' AND value < -7.0;") df ``` -------------------------------- ### Query Data for Specific Stations Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/usage/python-api.md Query observed data for selected stations. This example shows how to iterate through results and process individual station dataframes. ```python from wetterdienst.provider.dwd.observation import DwdObservationRequest from wetterdienst import Settings # if no settings are provided, default settings are used which are # Settings(ts_shape="long", ts_humanize=True, ts_si_units=True) request = DwdObservationRequest( parameters=[("daily", "kl"), ("daily", "solar")], start_date="1990-01-01", end_date="2020-01-01", ) stations = request.filter_by_station_id(station_id=("00003", "01048")) # From here you can query data by station for result in stations.values.query(): # analyse the station here break df = result.df.drop_nulls() df ``` -------------------------------- ### Run Explorer UI Service Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/usage/docker.md Run the wetterdienst Explorer UI service in a Docker container, exposing it on port 7891. ```bash docker run -it --rm --publish=7891:7891 ghcr.io/earthobservations/wetterdienst wetterdienst explorer --listen 0.0.0.0:7891 ``` -------------------------------- ### Run All Tests (Python Backend) Source: https://github.com/earthobservations/wetterdienst/blob/main/AGENTS.md Executes all tests, including parallel and cflake tests, for the Python backend. Use this for a comprehensive test suite run. ```bash uv run poe test ``` -------------------------------- ### Query DWD Historical Precipitation Height Data Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/usage/python-examples.md Get historical precipitation height data from DWD using a list of parameters. Requires importing DwdObservationRequest. ```python from wetterdienst.provider.dwd.observation import DwdObservationRequest request = DwdObservationRequest( parameters=[("daily", "precipitation_more", "precipitation_height")], periods="historical", ) first_values = next(request.all().values.query()) df = first_values.df df ``` -------------------------------- ### Query Stations with SQL Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/usage/restapi.md Query a list of stations using SQL for filtering. ```bash http localhost:7890/api/stations provider==dwd network==observation parameters==daily/kl periods==recent sql=="lower(name) LIKE lower('%dresden%');" ``` -------------------------------- ### Query DWD Climate Summary Precipitation Height Source: https://github.com/earthobservations/wetterdienst/blob/main/docs/usage/python-examples.md Get daily historical climate summary precipitation height data from DWD. Requires importing DwdObservationRequest. ```python from wetterdienst.provider.dwd.observation import DwdObservationRequest request = DwdObservationRequest( parameters=("daily", "climate_summary", "precipitation_height"), periods="historical", ) first_values = next(request.all().values.query()) df = first_values.df df ```