Plot COVID-19 data on the city of Kassel. Data source is the city's own dedicated website which was scraped from a bot who posted changes in IRC. These changes have then been scraped again using some regexes:
echo 'day,time,county,total,total_rel,recovered,recovered_rel,infected,infected_rel,dead,dead_rel' > covid-ks-$(date -I).csv
grep -E 'Kassel (Stadt|Land):.+tot$' ~/.weechat/logs/irc.freenode.\#flipdot.weechatlog | sed -re 's/(,|\[psa\]|insgesamt|genesen|infiziert|tot|\)|\+|Kassel)//g' -e 's/@flipbot//' -e 's/(: )/ /g' -e 's/Stadt/0/' -e 's/Land/1/g' -e 's/(\s|\t|\(| )+/,/g' -e 's/,$//' >> covid-ks-$(date -I).csv
To see interactive plots, download the necessary libraries first:
pip install --user pandas matplotlib
After successful installation run the downloaded Python script in the same folder that the csv
file resides in:
python3 covid-ks.py