vitawasalreadytaken's picture
Update README.md
c84f32b verified
metadata
language:
  - de
  - fr
  - it

🚀 Demokratis.ch makes it easier to participate in Swiss consultation procedures in order to better influence the legislative process at the federal and cantonal level.

What data we use

We obtain information about federal and cantonal consultations through APIs and website scraping. For each consultation (Vernehmlassung) we typically collect a number of documents of various types:

  • The proposed law change (draft, "Vorlage", "Entwurf", ...)
  • A report explaining the proposed change ("Erläuternder Bericht")
  • Accompanying letters, questionnaires, synoptic tables etc...

The documents are almost always just PDFs. We also get some metadata for the consultation itself, e.g. its title, starting and ending dates, and perhaps a short description.

Data acquisition and preprocessing

We use data from two main sources:

Document and consultation data is ingested from these sources into the Demokratis web platform running at Demokratis.ch. The web platform is our main source of truth. In addition to making the data available to end users, it also runs an admin interface that we use for manual review and correction of our database of consultations and their documents.

To transform the web platform data into a dataset for training models, we run a Prefect pipeline: demokratis_ml/pipelines/preprocess_consultation_documents.py. The result of this pipeline is a Parquet file conforming to the above-mentioned dataframe schema.

We then run several additional pipelines to extract more features from the documents (e.g. some visual PDF features) and embed the texts.

This dataset contains all our preprocessed data

Every week, all the outputs of our preprocessing pipelines are automatically published in this HuggingFace dataset:

See the Pandera schemata in demokratis_ml/data/schemata.py for a complete specification of the data we have on consultations and their documents.

Don't hesitate to talk to us on Slack #ml if you have any questions about the data!