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
endpointsstation
file containing all the waste collection stations, this is the basis of the/api/stations
endpoint
The calendar must be available as CSV with the following structure to ensure the seamless import in the database:
region
, region/municipality of the waste collectionzurich
stgallen
basel
thalwil
adliswil
horgen
kilchberg
langnau
oberrieden
richterswil
rueschlikon
thalwil
waedenswil
uster
wangen-bruttisellen
duebendorf
bassersdorf
embrach
zip
, sometimes a zip code is given8038
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
station
, if the collection only happens at a specific station- This is for special cases like the CargoTran
- Leave empty if unsure
waste_type
, the type of waste collectionbulky_goods
cardboard
cargotram
chipping_service
etram
incombustibles
metal
organic
paper
special
textile
waste
col_date
, date of the collection- ISO 8601 date, YYYY-MM-DD
The collection stations must be available as CSV with the following structure:
region
zurich
stgallen
basel
thalwil
adliswil
horgen
kilchberg
langnau
oberrieden
richterswil
rueschlikon
thalwil
waedenswil
uster
wangen-bruttisellen
duebendorf
bassersdorf
embrach
zip
, zip code where the station is located8815
name
- name of the station + address if necessary
oil
true
false
metal
true
false
glass
true
false
textile
true
false
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.
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.
The source file of St. Gallen ist publihsed on their Open Data Portal.
Use stgallen.py
to download the latest version
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 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 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 publishes it's calendar as iCal/ICS file on their website (one for each area). The stations are published as well.
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 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