Skip to content

🦠 Charts generator for Portugal's Covid-19 Wikipedia page

Notifications You must be signed in to change notification settings

w3slley/covid19-portugal-wikipedia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Charts generator for Portugal's Covid-19 Wikipedia page

This project has the goal of automating the process of updating data charts for the Portugal's Covid-19 pandemic wikipedia page.

Requirements

  • Python 3
  • pandas
  • Beautiful Soup
  • pdfminer
  • requests
  • pytest

Usage

  • Clone this repository and cd into it.
  • Install the required packages with pip3 install -r requirements.txt.
  • Run tests.py to check whether the script works with the format from the latest DGS report.
  • If all tests pass, run the command python3 get_data.py.
  • After the script ends, go to the folder output/ and:
  • To contribute to the portuguese page, go to the folder output/portuguese and copy the content of the files GraphsCasesByAgeAndGender.txt and TimelineGraphs.txt into the sections Casos por idade e sexo and Gráfico da evolução dos casos, respectively.

Example of charts

Contributions

Thanks to hagnat for the inspiration (he did something similar here but for the Brazilian wikipedia page).

Change in report format (August 16th 2020)

Due to changes in the DGS report format (from August 16th onwards), a new method for parsing the PDF files and retrieving data had to be implemented. That was effectively done on August 22nd. To be able to gather data from reports before this date, a branch called old-format-16-08-20 was created.

Another change in report format (December 20th 2020)

Since the format was again changed, the script which dealt with that format was preserved on format-before-20-12-20

Links

Blog post explaining the project a little bit further.

To do:

  • Keep track of more information over time in the .csv file - things like the evolution of cases and deaths by gender and age and by location, just to name a few.

About

🦠 Charts generator for Portugal's Covid-19 Wikipedia page

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages