Skip to content

defgsus/office-schedule-scraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

public offices appointment schedule scraper

Hi there! Similar to the free parking lots scraper, this code collects data of enormous importance!

In the spirit of e-governance a couple of german cities decided to force every citizen to acquaint themselves with this internet thing and require them to make appointments with, e.g., the resident's registration office through a web interface. For these offices, there is no just-go-there-and-wait-till-you're-called anymore. In fact, if you go there without the web-appointment, the service staff usually barks and blusters in the well-known german public office tone.

Anyways! Now we have this internet thing going and it's not so hard to track the development of the office schedules through time. From that data we can infer:

  • the business of the offices over time (e.g. barking at foreigners)
  • the desire of citizens to plan ahead (e.g. not taking the first free slot but one in 4 weeks)
  • the most popular time of day for appointments
  • the most popular time of day for making appointments
  • the cancellation rate

And all of that for a couple of different cities for comparison. As stated earlier: data of enormous importance!

Data scraping started at around 2021-07-09 and is weekly exported to the office-schedule-data repository.

To collect data yourself:

# install
git clone https://github.com/defgsus/office-schedule-scraper
cd office-schedule-scraper
virtualenv -p python3 env
source env/bin/activate
pip install -r requirements.txt

# make a snapshot
python scraper.py snapshot -w <X> -p <Y>
# where <X> is the number of weeks to look ahead (defaults to 4)
# where <Y> is the number of parallel processes to run

Which leads to a lot of JSON files in the snapshot directory.

Using export.py, the data will be exported to compressed bunches of CSV files as described in office-schedule-data.

List of implemented websites

Here's a list of websites that are scraped (compiled via python scraper.py list):

name scraper url
Amt Kluetzer Winkel tevis tevis-online.mvnet.de/kluetzerwinkel/
Bauhaus-Universität Weimar Erdgeschoss Raum 002 etermin www.etermin.net/international-office/
BürgerInnenamt Stadt Graz etermin www.etermin.net/buergerinnenamt/
Corona TESTZENTRUM im Elithera etermin www.etermin.net/testzentrum1/
Corona Test Braunschweig etermin www.etermin.net/coronatestbs/
Corona Testcenter etermin www.etermin.net/ASBTestcenter/
Corona-Schnellteststelle Teublitz etermin www.etermin.net/spitzwegapo/
Corona-Schnelltestzentrum Caspar & Dase für die Wedemark etermin www.etermin.net/Schnelltestungen/
Corona-Testcenter Hersfeld-Rotenburg etermin www.etermin.net/testcenter-hef-rof/
EVO ServicePunkt tempus tempus-termine.com/termine/...
Gemeinde Bönen tempus tempus-termine.com/termine/...
Gemeinde Gottmadingen tevis termine-reservieren.de/termine/gottmadingen/
Gemeinde Ilvesheim tempus tempus-termine.com/termine/...
Gemeinde Nußloch tempus tempus-termine.com/termine/...
Gemeinde Stahnsdorf etermin www.etermin.net/stahnsdorf/
Gesundheitsberuferegister Arbeiterkammer Salzburg etermin www.etermin.net/gbr/
Hansestadt Wismar tevis tevis-online.mvnet.de/wismar/
Hochsauerlandkreis etermin www.etermin.net/hsk-schnelltest/
Ilm-Kreis tevis tvweb.ilm-kreis.de/ilmkreis/
Impftermin Thüringen custom www.impfen-thueringen.de/terminvergabe/
Jobcenter Bonn etermin www.etermin.net/jcbn/
Kammer für Arbeiter und Angestellte für das Burgenland etermin www.etermin.net/GBRBgld/
Kfz Zulassungstelle Grasbrunn tevis termine-reservieren.de/termine/lramuenchen/kfz-zulassungsstelle-grasbrunn/
Kiel Einwohnermeldeamt tevis terminvergabe-ema-zulassung.kiel.de/tevisema/
Kreis Bergstraße netappoint terminreservierungverkehr.kreis-bergstrasse.de/netappoint/...
Kreis Coesfeld etermin www.etermin.net/kreiscoesfeld/
Kreis Germersheim Kfz-Zulassungsbehörde netappoint kfz.kreis-germersheim.de/netappoint/...
Kreis Groß-Gerau tevis tevis.ekom21.de/grg/
Kreis Herford Impfzentrum tempus tempus-termine.com/termine/...
Kreis Herford Straßenverkehrsamt tempus tempus-termine.com/termine/...
Kreis Lauenburg Fachdienst Straßenverkehr tempus tempus-termine.com/termine/...
Kreis Ludwigshfen tevis tevisweb.ludwigshafen.de/
Kreis Olpe tempus tempus-termine.com/termine/...
Kreis Soest tevis termine-buergerdienste.kreis-soest.de/
Kreis Steinfurt etermin www.etermin.net/kreis-steinfurt/
Kreis Unna Kfz tempus tempus-termine.com/termine/...
Kreis Werra-Meißner tempus tempus-termine.com/termine/...
Kreis Wesel tevis tevis.krzn.de/tevisweb080/
Landesamt für Mess- und Eichwesen Berlin-Brandenburg etermin www.etermin.net/lme-be-bb/
Landkreis Bernkastel-Wittlich tevis termine-reservieren.de/termine/bernkastel-wittlich/
Landkreis Breisgau-Hochschwarzwald Kfz-Zulassungsbehörde netappoint termin.lkbh.net/...
Landkreis Breisgau-Hochschwarzwald Landwitschaft netappoint termin.lkbh.net/...
Landkreis Cochem-Zell tevis termine-reservieren.de/termine/cochem-zell/
Landkreis Friesland tevis onlinetermine.friesland.de/
Landkreis Goeppingen tevis termin.landkreis-goeppingen.de/
Landkreis Kronach Zulassungsbehörde tempus tempus-termine.com/termine/...
Landkreis Mayen-Koblenz tevis termine-reservieren.de/termine/kvmayen-koblenz/
Landkreis München Ausländerbehörde tevis termine-reservieren.de/termine/lramuenchen/auslaenderbehoerde/
Landkreis München Jobcenter tevis amtonline.de/tvweb/jc-muenchen/
Landkreis Oldenburg tempus tempus-termine.com/termine/...
Landkreis Ortenau tevis www.termine.lraog.de/
Landkreis Schwäbisch Hall Zulassungsstelle tempus tempus-termine.com/termine/...
Landkreis Stade tevis termine-reservieren.de/termine/stade/
Landkreis Verden tevis lkv.landkreis-verden.de/TEVISWEB/
Landkreis Weilheim-Schongau tevis termine-reservieren.de/termine/weilheimschongau/
Landkreis Zwickau tevis termine-reservieren.de/termine/lra-zwickau/
Landratsamt Dachau tevis termine.landratsamt-dachau.de/tevis/
Landratsamt Deggendorf etermin www.etermin.net/LRA-DEG-Termin/
Landratsamt Fürstenfeldbruck tevis termine-reservieren.de/termine/lra-ffb/
Landratsamt Miesbach tevis termine-reservieren.de/termine/lra-miesbach/
Landratsamt München tevis termine-reservieren.de/termine/lramuenchen/efa/
Magistrat der Stadt Butzbach etermin www.etermin.net/stadtbutzbach/
Märkischer Kreis tevis terminvergabe.maerkischer-kreis.de/
Ostfildern tempus tempus-termine.com/termine/...
Psychologische Studierendenberatung Innsbruck etermin www.etermin.net/PSB-Innsbruck/
Rheingau-Taunus-Kreis tempus tempus-termine.com/termine/...
SARS-CoV-2 Testzentrum der Stadt Fürth etermin www.etermin.net/Testzentrum_agnf/
Salzlandkreis tevis termine.salzlandkreis.de/
Schnelltestzentrum Hammersbach etermin www.etermin.net/Schnelltestzentrum/
Stadt Amberg tevis termine.amberg.de/
Stadt Ansbach tempus tempus-termine.com/termine/...
Stadt Bad Waldsee tempus tempus-termine.com/termine/...
Stadt Bad-Kreuznach tevis termine-reservieren.de/termine/svkh/
Stadt Beckum tempus tempus-termine.com/termine/...
Stadt Beckum Schwimmbäder tempus tempus-termine.com/termine/...
Stadt Bergisch Gladbach tempus tempus-termine.com/termine/...
Stadt Bergkamen tempus tempus-termine.com/termine/...
Stadt Bielefeld Ausländerbehörde tempus tempus-termine.com/termine/...
Stadt Bielefeld Bürgerberatung tempus tempus-termine.com/termine/...
Stadt Bielefeld Fahrerlaubnisbehörde tempus tempus-termine.com/termine/...
Stadt Bielefeld Kfz-Zulassungsbehörde tempus tempus-termine.com/termine/...
Stadt Bielefeld Standesamt tempus tempus-termine.com/termine/...
Stadt Billerbeck Verwaltung etermin www.etermin.net/termininbillerbeck/
Stadt Blankenburg (Harz) etermin www.etermin.net/blankenburg/
Stadt Bochum tempus tempus-termine.com/termine/...
Stadt Bochum Baubürgeramt netappoint terminvergabe.bochum.de/...
Stadt Bochum Büro für Kfz-Angelegenheiten netappoint terminvergabe.bochum.de/...
Stadt Bochum Zulassungsstelle netappoint terminvergabe.bochum.de/...
Stadt Bochum Zulassungsstelle Umtausch netappoint terminvergabe.bochum.de/...
Stadt Bonn netappoint onlinetermine.bonn.de/...
Stadt Bonn Bauamt netappoint onlinetermine.bonn.de/...
Stadt Braunschweig netappoint otr.braunschweig.de/netappoint/...
Stadt Bremen / Bremerhaven tevis termin.bremen.de/termine/
Stadt Burscheid tempus tempus-termine.com/termine/...
Stadt Coesfeld etermin www.etermin.net/coe/
Stadt Dormagen etermin www.etermin.net/stadtdormagen/
Stadt Dresden netappoint termine.dresden.de/netappoint/...
Stadt Dresden Kfz-Zulassungsbehörde netappoint termine.dresden.de/netappoint/...
Stadt Dülmen etermin www.etermin.net/duelmen/
Stadt Egelsbach tevis tevis.ekom21.de/egb/
Stadt Eislingen tevis termine-reservieren.de/termine/eislingen/
Stadt Eschwege tempus tempus-termine.com/termine/...
Stadt Frankenthal tevis termine-reservieren.de/termine/frankenthal/
Stadt Frankfurt tevis tevis.ekom21.de/fra/
Stadt Frankfurt am Main Bürgeramt tempus tempus-termine.com/termine/...
Stadt Freiberg tempus tempus-termine.com/termine/...
Stadt Freising tempus tempus-termine.com/termine/...
Stadt Friedrichsdorf tevis tevis.ekom21.de/frf/
Stadt Fulda tevis termine-reservieren.de/termine/fulda/
Stadt Gelsenkirchen tempus tempus-termine.com/termine/...
Stadt Gießen tempus tempus-termine.com/termine/...
Stadt Graz etermin www.etermin.net/stadtgraz/
Stadt Greifswald tevis tevis-online.mvnet.de/greifswald/
Stadt Gronau tevis termine-reservieren.de/termine/gronau/
Stadt Groß-Umstadt tevis tevis.ekom21.de/gad/
Stadt Göttingen tevis termin.goettingen.de/
Stadt Halberstadt etermin www.etermin.net/halberstadt/
Stadt Halle netappoint ncu.halle.de/...
Stadt Heidelberg tevis tevis-online.heidelberg.de/
Stadt Herborn tempus tempus-termine.com/termine/...
Stadt Hof tevis termine-reservieren.de/termine/hof/
Stadt Hornberg tevis tevis.ekom21.de/hbe/
Stadt Hünstetten tevis tevis.ekom21.de/hsz/
Stadt Hüttenberg tevis tevis.ekom21.de/htb/
Stadt Ingelheim tevis termine-reservieren.de/termine/ingelheim/
Stadt Itzehoe Einwohnermeldeamt etermin www.etermin.net/Stadt_Itzehoe/
Stadt Jena tevis tevis-bs.jena.de/
Stadt Kaiserslautern Ausländerbehörde netappoint www3.kaiserslautern.de/netappoint/...
Stadt Kassel tevis tevis.ekom21.de/kas/
Stadt Kelsterbach tevis tevis.ekom21.de/keb/
Stadt Koeln netappoint termine-online.stadt-koeln.de/...
Stadt Kürten tempus tempus-termine.com/termine/...
Stadt Ladenburg tempus tempus-termine.com/termine/...
Stadt Lehrte etermin www.etermin.net/StadtLehrte/
Stadt Leichlingen tempus tempus-termine.com/termine/...
Stadt Leimen tempus tempus-termine.com/termine/...
Stadt Leipzig custom leipzig.de/fachanwendungen/termine/...
Stadt Leipzig Standesamt netappoint adressen.leipzig.de/netappoint/...
Stadt Leun tevis tevis.ekom21.de/lnx/
Stadt Linsengericht tevis tevis.ekom21.de/lsg/
Stadt Lippstadt Fachdienst Einwohnerwesen tempus tempus-termine.com/termine/...
Stadt Ludwigsburg tempus tempus-termine.com/termine/...
Stadt Ludwigshafen Ausländerbehörde tempus tempus-termine.com/termine/...
Stadt Löhne tevis termine-reservieren.de/termine/loehne/
Stadt Lüdenscheid tempus tempus-termine.com/termine/...
Stadt Lünen tempus tempus-termine.com/termine/...
Stadt Magdeburg netappoint service.magdeburg.de/netappoint/...
Stadt Mainz tevis otv.mainz.de/
Stadt Mannheim Bürgerservice tempus tempus-termine.com/termine/...
Stadt Mannheim Fachbereich Sicherheit und Ordnung tempus tempus-termine.com/termine/...
Stadt Mechernich tevis amtonline.de/tvweb/mechernich/
Stadt Minden tevis termine-reservieren.de/termine/minden/
Stadt Mittenwalde etermin www.etermin.net/StadtMittenwalde/
Stadt Muenster tevis termine.stadt-muenster.de/
Stadt Mörlenbach tevis tevis.ekom21.de/mah/
Stadt Mülheim an der Ruhr tevis terminvergabe.muelheim-ruhr.de/
Stadt Neu-Isenburg tevis tevis.ekom21.de/nis/
Stadt Neu-Ulm tempus tempus-termine.com/termine/...
Stadt Niedenstein tevis tevis.ekom21.de/nsn/
Stadt Nordhausen tevis tevis.svndh.de/
Stadt Nürnberg tevis nuernberg.termine-reservieren.de/
Stadt Ober-Ramstadt tevis tevis.ekom21.de/oby/
Stadt Oberasbach etermin www.etermin.net/stadtoberasbach/
Stadt Oberding tempus tempus-termine.com/termine/...
Stadt Offenbach tevis tevis.ekom21.de/off/
Stadt Olfen etermin www.etermin.net/stadtolfen/
Stadt Overath tempus tempus-termine.com/termine/...
Stadt Paderborn tevis termine-reservieren.de/termine/paderborn/
Stadt Pfungstadt tevis tevis.ekom21.de/pft/
Stadt Radolfzell tevis amtonline.de/tvweb/radolfzell/
Stadt Rastatt tevis termine-reservieren.de/termine/rastatt/
Stadt Ravensburg tempus tempus-termine.com/termine/...
Stadt Rheda-Wiedenbrück tempus tempus-termine.com/termine/...
Stadt Rottenburg tempus tempus-termine.com/termine/...
Stadt Rösrath tempus tempus-termine.com/termine/...
Stadt Saarbrücken tevis terminvergabe.saarbruecken.de/
Stadt Salzgitter tevis termine-reservieren.de/termine/salzgitter/
Stadt Schloß Holte-Stukenbrock tempus tempus-termine.com/termine/...
Stadt Schriesheim tempus tempus-termine.com/termine/...
Stadt Schwieberdingen tempus tempus-termine.com/termine/...
Stadt Schwäbisch Hall tempus tempus-termine.com/termine/...
Stadt Schönebeck (Elbe) tevis termine-reservieren.de/termine/schoenebeck-elbe/
Stadt Selm etermin www.etermin.net/stadtselm/
Stadt Speyer tevis termine-reservieren.de/termine/speyer/
Stadt Stadtbergen etermin www.etermin.net/stadtbergen/
Stadt Steinburg tevis termine-reservieren.de/termine/steinburg/
Stadt Söst tevis termine-reservieren.de/termine/stadtsoest/
Stadt Teltow tempus tempus-termine.com/termine/...
Stadt Trier tevis termine-reservieren.de/termine/trier/
Stadt Tübingen tempus tempus-termine.com/termine/...
Stadt Unna tevis termine-reservieren.de/termine/unna/
Stadt Viernheim tevis tevis.ekom21.de/vhx/
Stadt Walldorf etermin www.etermin.net/stadt-walldorf/
Stadt Weimar tevis tevis.weimar.de/
Stadt Weinheim tempus tempus-termine.com/termine/...
Stadt Weiterstadt tevis tevis.ekom21.de/wdt/
Stadt Werne tempus tempus-termine.com/termine/...
Stadt Wiehl etermin www.etermin.net/stadtwiehl/
Stadt Wittmund tevis termine-reservieren.de/termine/wittmund/stva/
Stadt Worms tevis termine-reservieren.de/termine/worms/
Stadt Wuppertal Einwohnermeldeamt tempus tempus-termine.com/termine/...
Stadt Wuppertal Geodatenzentrum netappoint terminvergabe2.wuppertal.de/...
Stadt Wuppertal Gewerbecenter netappoint terminvergabe2.wuppertal.de/...
Stadt Wuppertal Staßenverkehrsamt tempus tempus-termine.com/termine/...
StadtPalais - Museum für Stuttgart etermin www.etermin.net/stadtlaborstuttgart/
Stadtwerke Bochum tempus tempus-termine.com/termine/...
Stadtwerke Ebersfeld tempus tempus-termine.com/termine/...
Stadtwerke Geldern Netz etermin www.etermin.net/Zaehlerwechseltermine/
Stadtwerke Kiel tempus tempus-termine.com/termine/...
Stadtwerke Mannheim tempus tempus-termine.com/termine/...
Straßenverkehrsamt Oberbergischer Kreis tempus tempus-termine.com/termine/...
Städteregion Aachen netappoint terminmanagement.regioit-aachen.de/sr_aachen/...
Testzentrum Goslar etermin www.etermin.net/testzentrumgoslar/
Testzentrum Hahnenklee etermin www.etermin.net/testzentrumhahnenklee/
Universität Graz etermin www.etermin.net/unitestet/
Verbandsgemeindeverwaltung Daun etermin www.etermin.net/vgdaun/
Zulassungsstelle Leverkusen netappoint termine.leverkusen.de/...
Österreichische Gesundheitskasse etermin www.etermin.net/OEGK/

The scraped interfaces which are used by most websites:

Data details

At each snapshot all available dates are recorded for each listed office department. The tevis system shows the available dates for the next N full weeks, where N is set to 6 in my recording job. The etermin and netappoint system is asked for the next N * 7 days.

Here's an example for one day from the website of Bonn:

Führerscheinwesen Kfz-Zulassungswesen Meldewesen
2021-08-10T07:45:00 X
2021-08-10T07:50:00 X
2021-08-10T07:55:00 X X
2021-08-10T08:00:00 X X
2021-08-10T08:05:00 X X
2021-08-10T08:10:00 X X
2021-08-10T08:15:00 X X
2021-08-10T08:20:00 X X
2021-08-10T08:25:00 X X
2021-08-10T08:30:00 X X
2021-08-10T08:35:00 X X
2021-08-10T08:40:00 X X
2021-08-10T08:45:00 X X
2021-08-10T08:50:00 X X
2021-08-10T08:55:00 X X
2021-08-10T09:00:00 X
2021-08-10T09:05:00 X
2021-08-10T09:10:00 X
2021-08-10T09:15:00 X X
2021-08-10T09:20:00 X X
2021-08-10T09:25:00 X X
2021-08-10T09:30:00 X X
2021-08-10T09:35:00 X X
2021-08-10T09:40:00 X X
2021-08-10T09:45:00 X X
2021-08-10T09:50:00 X X
2021-08-10T09:55:00 X X
2021-08-10T10:00:00 X
2021-08-10T10:05:00 X
2021-08-10T10:10:00 X
2021-08-10T10:15:00 X
2021-08-10T10:20:00 X X
2021-08-10T10:25:00 X X
2021-08-10T10:30:00 X
2021-08-10T10:35:00 X
2021-08-10T10:40:00 X
2021-08-10T10:45:00 X
2021-08-10T10:50:00 X X
2021-08-10T10:55:00 X X
2021-08-10T11:00:00 X
2021-08-10T11:05:00 X
2021-08-10T11:10:00 X X
2021-08-10T11:15:00 X X
2021-08-10T11:20:00 X X
2021-08-10T11:25:00 X X
2021-08-10T11:30:00 X X
2021-08-10T11:35:00 X X
2021-08-10T11:40:00 X X
2021-08-10T11:45:00 X X
2021-08-10T11:50:00 X X
2021-08-10T11:55:00 X X
2021-08-10T12:00:00 X
2021-08-10T12:05:00 X
2021-08-10T12:10:00 X
2021-08-10T12:15:00 X X
2021-08-10T12:20:00 X X
2021-08-10T12:25:00 X
2021-08-10T12:30:00 X
2021-08-10T12:35:00 X
2021-08-10T12:40:00 X

Obviously they offer 5 minute slots and, yes, german offices might close quite early. By looking at more data one can see that Meldewesen and Führerscheinwesen exchange availability between weeks.

It's not possible for all websites/systems to gather the actual business hours for each day so a single snapshot is not necessarily enough to calculate the correct number of appointments for each day.

However, when comparing two successive snapshots, it's possible to count new appointments or cancellations quite robustly and then attach a timestamp of when the appointments where made, clicked or activated or however this is called.

Still, there seem to be some erratic updates which mess up the calculation and some offices seem to only update the availability every couple of days. In fact, this project turned out to demand a lot of time and work, especially in finding and fixing all my mistakes in the beginning. After the first 10 weeks of data collection, some of the mistakes have been spotted.

Below's a week of extracted data for all netappoint/tevis interfaces resampled to a 1 hour interval. Offices with strange peaks where excluded.

timeline through one week

Blue line is number of appointments and red line is cancellations.

One custom appointment interface of special interest is the Impf-Terminvergabe Thüringen, the website to make covid vaccination appointments in Thuringia. They only offer one timeslot per day for at most 3 different days. And their offered dates change all the time. Out of pure interest, a snapshot is recorded every minute!

In below graphic, whenever a new snapshot offers a timeslot that is after the previously offered timeslot, the previous timeslot is counted as one appointment.

timeline through one week for vaccination

These are probably not real appointments but rather a measure of website activity as the total number of appointments made would be over 190,000 in a period of 10 days. That does not really fit the perceived reality.

TODO-list of websites i found

Started but abandoned

  • https://service.berlin.de/terminvereinbarung/

    Started scraper berlin.py but they protect themselves with throttling and captchas. They really do not want a bot crawling their page.

  • termed.de is fully APIfied and there exists a prototype of a scraper but it yields such an enormous amount of data (more than 3000 calendars per snapshot leading to gigabytes per week) that it is not included in the data export. Also it's a lot of private medical practices which do not really fit the public office category.

    To use it, explicitly include it: python scraper.py snapshot -i termed