|author||Adrià Vilanova Martínez <email@example.com>||Sat Jan 29 12:52:42 2022 +0100|
|committer||Adrià Vilanova Martínez <firstname.lastname@example.org>||Sat Jan 29 12:52:42 2022 +0100|
Increase IA14 axis range to 7000 Change-Id: Iac5b9da57164216e72a2e85d8122c7eb0086c54a
This is the code for https://covid-19.sandbox.avm99963.com, which contains graphs which determine the level of risk of each Catalan health area due to the COVID-19, based on the work of the BIOCOMSC group at the Polytechnic University of Catalonia (UPC).
It can also be used to generate risk graphs for custom areas by defining these areas in the
DISCLAIMER: The data shown in the website might be wrong due to a wrong implementation.
Only *NIX machines (essentially a PC with a Linux distro or a Mac) are supported. These programs should be installed in order to be able to generate the graphs:
Optionally, if you want to serve the graphs publicly, you also need Apache2 or another web server.
This software is meant to be used with Apache2 in order to serve a static website including the latest Covid-19 data.
To install it, follow these steps:
git clone "https://gerrit.avm99963.com/covid19".
covid19/cronand runs the
bash generate.bashcommand every day early in the morning.
crontab -eand place the following line at the end of the document:
0 2 * * * (cd /path/to/covid19/cron/ && bash generate.bash)
AllowOverride Alldirective set, or you're using another web server, make sure the
cronfolder and its contents are not accessible from the Internet by denying access to it.
Each day, the
generate.bash script will generate the graphs at the
bash generate.bashcommand anytime from the
covid19/crondirectory in order to manually generate the graphs.
This is what each file does:
index.html: a web accessible document which includes a disclaimer text, a key for the graphs, and the generated graphs themselves.
cronfolder: a non-web accessible folder which contains programs which ultimately generate the graphs.
cron/generate.bash: a Bash script which orchestrates all the other programs in the folder in order to generate the graphs.
cron/generateData.php: a PHP script which extracts the Covid-19 data from the Generalitat de Catalunya's API and analyzes that data to generate the ρ7 and IA14 values needed by
cron/generateGraphs.gnuto generate the graphs for each health area.
cron/generateGraphs.gnu: a gnuplot script which generates the graphs with the data which has been provided by the
cron/generateData.php. It uses the helper script
cron/generateCustomData.php: a PHP script analogous to
cron/generateData.phpwhich generates the data for custom areas defined in
cron/generateCustomGraph.gnu: a PHP script analogous to
cron/generateGraphs.gnuwhich generates the graph of a custom area using the data provided by the previous script.
config/config.php: a file where general settings can be set.
config/customAreas.php: a file where the custom areas can be defined.
outputfolder: a folder created by the
generate.bashscript where the generated graphs are saved.