Scripts to download and parse data from various red lists into standardized database and serve it via REST, e.g. https://iredlist.haagfank.de/v1/redlist/status?name=Vanellus vanellus
  • Python 99.2%
  • Dockerfile 0.8%
Find a file
2026-11-24 15:33:07 +01:00
redlists Did some renaming 2026-11-24 15:33:07 +01:00
.gitignore Use all-in-one dataset provided by RLZ 2026-11-11 16:06:06 +01:00
build.py Use all-in-one dataset provided by RLZ 2026-11-11 16:06:06 +01:00
build_requirements.txt Parse names using GNparser (new dependency) 2026-11-08 16:18:04 +01:00
database.py Did some renaming 2026-11-24 15:33:07 +01:00
fetch.py Use all-in-one dataset provided by RLZ 2026-11-11 16:06:06 +01:00
fetch_requirements.txt Parse names using GNparser (new dependency) 2026-11-08 16:18:04 +01:00
LICENSE Initial commit 2026-10-29 15:11:38 +01:00
README.md Parse names using GNparser (new dependency) 2026-11-08 16:18:04 +01:00
serve.Dockerfile Fixed Dockerfile 2026-11-08 16:21:44 +01:00
serve.py Parse names using GNparser (new dependency) 2026-11-08 16:18:04 +01:00
serve_requirements.txt Parse names using GNparser (new dependency) 2026-11-08 16:18:04 +01:00
utils.py Use all-in-one dataset provided by RLZ 2026-11-11 16:06:06 +01:00

The project consists of three scripts:

  1. fetch.py to download redlist data
  2. build.py to import the downloaded data into a single redlist.sqlite database
  3. serve.py to serve the database as a REST api

The scripts are largely independent and only require installation of the corresponding *_requirements.txt via pip install -r *_requirements.txt. The only additional dependency is the gnparser binary, which must be in the root directory or in $PATH.

How certain redlists are downloaded and parsed is defined in the data directory under root. Every redlist.py filed contained recursively in it, defines one redlist. Three functions must be implemented:

  1. fetch() downloading (and overwriting) the original ZIP/XLSX/CSV/PDF/... red list data.
  2. info() returning basic information about the redlist as a dict: TBC
  3. datasets(gn=None) a generator yielding a tuple (info, df) where info is a dict and df a pandas dataframe, where each df contains the normalized data from one file and info basic associated information: The optional argument gn will be a GNParser instance. TBC