-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
11 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,17 @@ | ||
# COVID-19-tools | ||
A python tool for parsing novel coronavirus (COVID-19) data into a more usable CSV format | ||
# COVID-19-Greece | ||
|
||
## API | ||
[](https://trinityyi.github.io/COVID-19-Greece/) | ||
|
||
#### `combine_csvs(csv_filenames, selected_key, selection_key, ignore_keys, common_key, output_keys, csv_out_filename)` | ||
A python-generated [website](https://trinityyi.github.io/COVID-19-Greece/) for visualizing the novel coronavirus (COVID-19) data for Greece. | ||
|
||
Combines the data from multiple CSV files into one, selecting a specific row, filtering out specific keys and transposing columns. | ||
## Data sources | ||
|
||
- `csv_filenames`: A list of CSV files to be combined. | ||
- `selected_key`: The value of the key of the row to be selected. | ||
- `selection_key`: The key use for row selection (). | ||
- `ignore_keys`: Keys to be ignored (filtered out - e.g. 'long', 'lat' etc.). | ||
- `common_key`: Name of the common key (columns transpose - e.g. 'date'). | ||
- `output_keys`: List of output keys (must correspond 1-to-1 to the list of filenames). | ||
- `csv_out_filename`: The name of the output file. | ||
Data provided by [Johns Hopkins CSSE](https://github.com/CSSEGISandData/COVID-19/tree/a4ccce6f44b175d304ad18fb88fe479bc76b2584) and the [National Public Health Organization](https://eody.gov.gr/en/). | ||
|
||
As an example, we use [`main.py`](./src/main.py) to extract data for Greece. | ||
## Website generation | ||
|
||
Data sources provided by [Johns Hopkins CSSE](https://github.com/CSSEGISandData/COVID-19/tree/a4ccce6f44b175d304ad18fb88fe479bc76b2584). | ||
- The website is updated daily at 03:00 UTC, using GitHub actions. | ||
- Data is pulled daily from the relevant data sources and/or updated manually. | ||
- The `src/main.py` script combines the data in the CSV files and generates the [daily CSV report](/time_series_data_grc.csv). | ||
- [Flask](https://flask.palletsprojects.com/en/1.1.x/) then outputs the data and to the template and produces the [website](https://trinityyi.github.io/COVID-19-Greece/). | ||
- [Google Charts](https://developers.google.com/chart/interactive/docs) is used for graph generation. |