schoolofdata-ch / swisscovid-stats

Deployment statistics of the SwissCovid app


SwissCovid-Stats

Collects the total number of daily active SwissCovid app users, originating from the Swiss Federal Office of Information Technology, Systems and Telecommunication (FOITT) and published by the Federal Office of Statistics at experimental.bfs.admin.ch.

With the release of the public app on June 25, 2020, data can be analysed based on the infrastructure of app-based proximity tracing. For this purpose, the FSO will publish the number of active SwissCovid apps per day from 26 June 2020 in a first step. This number will provide information on the extent to which the SwissCovid app is used by the population in everyday life.

This scraper was needed because the website where the data is currently published does not provide a CSV download option.

The legal status of the data publication is unclear, see BFS Legal Terms and do not assume that this can be used for commercial or other purposes.

See a possible visualization of this data at Datawrapper, and find some more background about the app at forum.opendata.ch.

This is a scraper that runs on Morph: https://morph.io/schoolofdata-ch/swisscovid-stats

To write your own, see the documentation.

The code of this scraper is licensed under CC0 Public Domain Dedication https://creativecommons.org/publicdomain/zero/1.0/

Contributors loleg dependabot[bot]

Last run completed successfully .

Console output of last run

Injecting configuration and compiling...  -----> Python app detected  ! The latest version of Python 2 is python-2.7.14 (you are using python-2.7.9, which is unsupported).  ! We recommend upgrading by specifying the latest version (python-2.7.14).  Learn More: https://devcenter.heroku.com/articles/python-runtimes -----> Installing python-2.7.9 -----> Installing pip -----> Installing requirements with pip  DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.  Obtaining scraperwiki from git+http://github.com/openaustralia/scraperwiki-python.git@morph_defaults#egg=scraperwiki (from -r /tmp/build/requirements.txt (line 6))  Cloning http://github.com/openaustralia/scraperwiki-python.git (to revision morph_defaults) to /app/.heroku/src/scraperwiki  Running command git clone -q http://github.com/openaustralia/scraperwiki-python.git /app/.heroku/src/scraperwiki  Running command git checkout -b morph_defaults --track origin/morph_defaults  Switched to a new branch 'morph_defaults'  Branch morph_defaults set up to track remote branch morph_defaults from origin.  Collecting lxml==4.6.3  Downloading lxml-4.6.3-cp27-cp27m-manylinux1_x86_64.whl (5.5 MB)  Collecting cssselect==0.9.1  Downloading cssselect-0.9.1.tar.gz (32 kB)  Collecting dumptruck>=0.1.2  Downloading dumptruck-0.1.6.tar.gz (15 kB)  Collecting requests  Downloading requests-2.26.0-py2.py3-none-any.whl (62 kB)  Collecting idna<3,>=2.5; python_version < "3"  Downloading idna-2.10-py2.py3-none-any.whl (58 kB)  Collecting certifi>=2017.4.17  Downloading certifi-2021.5.30-py2.py3-none-any.whl (145 kB)  Collecting chardet<5,>=3.0.2; python_version < "3"  Downloading chardet-4.0.0-py2.py3-none-any.whl (178 kB)  Collecting urllib3<1.27,>=1.21.1  Downloading urllib3-1.26.6-py2.py3-none-any.whl (138 kB)  Building wheels for collected packages: cssselect, dumptruck  Building wheel for cssselect (setup.py): started  Building wheel for cssselect (setup.py): finished with status 'done'  Created wheel for cssselect: filename=cssselect-0.9.1-py2-none-any.whl size=26993 sha256=616b4989d5b9c1156c3fafbde36575661fe8fb6bcb48fe6a164788c7ea9dcb6a  Stored in directory: /tmp/pip-ephem-wheel-cache-ECsxgL/wheels/85/fe/00/b94036d8583cec9791d8cda24c184f2d2ac1397822f7f0e8d4  Building wheel for dumptruck (setup.py): started  Building wheel for dumptruck (setup.py): finished with status 'done'  Created wheel for dumptruck: filename=dumptruck-0.1.6-py2-none-any.whl size=11844 sha256=89a246c1560875fdd09888a7df02569302ed280be1797d4e1ac8d0f9a8baad72  Stored in directory: /tmp/pip-ephem-wheel-cache-ECsxgL/wheels/dc/75/e9/1e61c4080c73e7bda99614549591f83b53bcc2d682f26fce62  Successfully built cssselect dumptruck  Installing collected packages: dumptruck, idna, certifi, chardet, urllib3, requests, scraperwiki, lxml, cssselect  Running setup.py develop for scraperwiki  Successfully installed certifi-2021.5.30 chardet-4.0.0 cssselect-0.9.1 dumptruck-0.1.6 idna-2.10 lxml-4.6.3 requests-2.26.0 scraperwiki urllib3-1.26.6 DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.    -----> Discovering process types  Procfile declares types -> scraper Injecting scraper and running... ('Updating', u'29/07/2021')

Data

Downloaded 3562 times by schoolofdata-ch loleg

To download data sign in with GitHub

Download table (as CSV) Download SQLite database (27 KB) Use the API

rows 10 / 406

Difference Date Actapps ID
475449
25/6/2020
566894
180048
26/6/2020
746942
59628
27/6/2020
806570
48510
28/6/2020
855080
60885
29/6/2020
915965
12944
30/6/2020
928909
25/06/2020
570000
101
26/06/2020
750000
102
27/06/2020
810000
103
28/06/2020
860000
104

Statistics

Average successful run time: less than a minute

Total run time: about 5 hours

Total cpu time used: 3 minutes

Total disk space used: 58.7 KB

History

  • Auto ran revision 3acc93af and completed successfully .
    49 records added, 49 records removed in the database
  • Auto ran revision 3acc93af and completed successfully .
    49 records added, 48 records removed in the database
  • Auto ran revision 3acc93af and completed successfully .
    49 records added, 48 records removed in the database
  • Auto ran revision 3acc93af and completed successfully .
    49 records added, 48 records removed in the database
  • Auto ran revision 3acc93af and completed successfully .
    49 records added, 48 records removed in the database
  • ...
  • Created on morph.io

Show complete history

Scraper code

Python

swisscovid-stats / scraper.py