Skip to content

Python API to get information about COVID-19 in México.

License

Notifications You must be signed in to change notification settings

AzulGarza/covidmx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Released License: MIT

covidmx

Python API to get information about COVID-19 in México.

Requirements

more-itertools>=6.0.0
pandas>=0.25.2
Unidecode>=1.1.1

How to install

pip install covidmx

How to use

Serendipia

Serendipia publishes daily information of the mexican Secretaría de Salud about covid in open format (.csv). This api downloads this data easily, making it useful for task automation.

from covidmx import CovidMX

latest_published_data = CovidMX().get_data()

By default CovidMX instances a Serendipia class, searches the latest published data for both confirmed and suspects individuals and finally clean the data. Nevertheless, a more specific search can be conducted (see docs for details).

raw_data = CovidMX(clean=False).get_data()
confirmed = CovidMX(kind="confirmed").get_data()
suspects = CovidMX(kind="suspects").get_data()
particular_published_date = CovidMX(date='2020-04-10', date_format='%Y-%m-%d').get_data()