We welcome contributions to our testing dataset!
Automated countries can be found under automations folder. Some countries have a batch process while others an incremental one.
- batch: Complete timeseries is updated in every execution. This process is prefered, as it means the source can correct past data.
- incremental: Only last data point is added.
The code consists of a mixture of python and R scripts. While contributions in both languages are more than welcome, we prefer python.
To automate the data import for a country, make sure that:
- The source is reliable.
- The source provides data in a format that can be easily read:
- As a file (e.g. csv, json, xls, etc.)
- As plain text in source HTML, which can be easily scraped.
- Decide if the import is batch (i.e. all the timeseries) or incremental (last value). See the scripts in
automations/batch
andautomations/incremental
for more details. Note: Batch is prefered over Incremental. - Create a script and place it based on decision in step 1 either in
automations/batch
orautomations/incremental
. Note that each source is different and there is no single pattern that works for all sources, however you can take some inspiration from the scripts below: - Test that it is working and that it is stable.
- Create a pull request with your code!
- Limit your pull request to a single country or a single feature.
- We welcome code improvements / bug fixes. As an example, you can take #465.
You can of course, and we appreciate it very much, create pull requests for other cases.
Note that files in public folder are not to be modified via Pull requests.