This is a Bash script that generates an epidemic curve graph using the gnuplot tool. The script takes in a data file in CSV format and outputs a PNG image of the epidemic curve.
In order to use this script, you will need to have gnuplot installed on your system. If you're using a Debian-based distribution, you can install gnuplot using the following command:
sudo apt-get install gnuplot
Clone or download the repository to your local machine. Place your data file in CSV format in the same directory as the script. Edit the script to set the datafile variable to the name of your data file and the output variable to the desired name of your output image file.
Run the script using the following command:
./epidemic_curve.sh
The output image file will be saved in the same directory as the script.
The data file should be in CSV format with two columns: date and cases. The date should be in YYYY-MM-DD format and the cases should be a numeric value. The first line of the file should be a header and will be ignored by the script.
You can customize the appearance of the graph by modifying the settings in the epidemic_curve.plot file. You can change the title, axis labels, data style, and more. Consult the gnuplot documentation for more information on customizing graphs.
This script is released under the MIT License. Feel free to modify and distribute the script as needed.