Skip to content

Latest commit

 

History

History
166 lines (128 loc) · 4.86 KB

README.md

File metadata and controls

166 lines (128 loc) · 4.86 KB

Data Sources

The data is either downloaded and converted (typically using a Python script) or generated from a config file.

There are two entities needed for each municipality:

  • calendar file containing the dates of the different kinds of waste collection, basis of the /api/calendar endpoints
  • station file containing all the waste collection stations, this is the basis of the /api/stations endpoint

Format

Calendar

The calendar must be available as CSV with the following structure to ensure the seamless import in the database:

  1. region, region/municipality of the waste collection
    • zurich
    • stgallen
    • basel
    • thalwil
    • adliswil
    • horgen
    • kilchberg
    • langnau
    • oberrieden
    • richterswil
    • rueschlikon
    • thalwil
    • waedenswil
    • uster
    • wangen-bruttisellen
    • duebendorf
    • bassersdorf
    • embrach
  2. zip, sometimes a zip code is given
    • 8038
  3. area, an area within a region that has the same schedule, this could be a street, a part of town etc.
    • A, B, C
    • leave empty ("") if this is not applicable
  4. station, if the collection only happens at a specific station
    • This is for special cases like the CargoTran
    • Leave empty if unsure
  5. waste_type, the type of waste collection
    • bulky_goods
    • cardboard
    • cargotram
    • chipping_service
    • etram
    • incombustibles
    • metal
    • organic
    • paper
    • special
    • textile
    • waste
  6. col_date, date of the collection
    • ISO 8601 date, YYYY-MM-DD

Station

The collection stations must be available as CSV with the following structure:

  1. region
    • zurich
    • stgallen
    • basel
    • thalwil
    • adliswil
    • horgen
    • kilchberg
    • langnau
    • oberrieden
    • richterswil
    • rueschlikon
    • thalwil
    • waedenswil
    • uster
    • wangen-bruttisellen
    • duebendorf
    • bassersdorf
    • embrach
  2. zip, zip code where the station is located
    • 8815
  3. name
    • name of the station + address if necessary
  4. oil
    • true
    • false
  5. metal
    • true
    • false
  6. glass
    • true
    • false
  7. textile
    • true
    • false

Municipalities

Zurich

The source files of the City of Zurich are published on their Open Data Portal. The files from the City of Zurich are appended to the corresponding CSV.

Use zurich.py to download the data.

Basel

The source file of Basel are published in their Open Data Portal. The file from Basel is append to the corresponding CSV.

You can use basel.py to download the latest version.

St. Gallen

The source file of St. Gallen ist publihsed on their Open Data Portal.

Use stgallen.py to download the latest version

District Horgen

All municipalities in the district of Horgen are using the same web application to publish the waste collection calendar. Therefore a single script called zimmerberg.py can be used to download the files of the following municipalities:

  • Adliswil
  • Horgen
  • Kilchberg
  • Langnau
  • Oberrieden
  • Richterswil
  • Rüschlikon
  • Thalwil
  • Wädenswil

Uster

Uster publishes part of their waste calendar as ICS file, but normal waste and organic have a simple rule (weekly on weekday X in area Z). Therefore all dates must be checked for holidays.

This requires some manual work. The script to generate the CSV is uster.py%

Wangen-Brüttisellen

Wangen-Brüttisellen doesnt expose any machine readable format. The CSV is generated from the config file wangen-bruttisellen.yml.

The information is taken from the municipality website

Dübendorf

Dübendorf publishes it's calendar as iCal/ICS file on their website (one for each area). The stations are published as well.

Bassersdorf

Bassersdorf doesnt expose any machine readable format. The CSV is generated from the config file bassersdorf.yml.

The information is taken from the municipality website

Embrach

Embrach doesn't expose any machine readable format, the CSV in genereted from the config file embrach.yml.

The information is taken from the municipality website