Skip to main content

Library for data mining about covid-19 in brazilian cities

Project description

CovidBr




PyPI - Downloads
CodeFactor Grade

Library for data mining about covid-19 in brazilian cities 📈📊📚


Installation

$ pip install covidbr -U

Examples

Get data from cities

import covidbr as cb
cb.show_console(True)

place = 'Juazeiro BA'
data_pet = cb.city(place)

getting the light data and working with it

dataset = data_city.dados
dados
             casos  mortos  mortes_diarias  casos_diarios  population
23/mar/2020      1       0               0              1      218162
24/mar/2020      2       0               0              1      218162
25/mar/2020      2       0               0              0      218162
26/mar/2020      2       0               0              0      218162
27/mar/2020      2       0               0              0      218162
...            ...     ...             ...            ...         ...
26/dez/2021  18752     417               0              0      218162
27/dez/2021  18752     417               0              0      218162
28/dez/2021  18752     417               0              0      218162
29/dez/2021  18752     417               0              0      218162
30/dez/2021  18752     417               0              0      218162

[648 rows x 5 columns]

getting the data of death's:

mortos = dataset['mortos']
mortos
23/mar/2020      0
24/mar/2020      0
25/mar/2020      0
26/mar/2020      0
27/mar/2020      0
              ... 
26/dez/2021    417
27/dez/2021    417
28/dez/2021    417
29/dez/2021    417
30/dez/2021    417
Name: mortos, Length: 648, dtype: int64

getting the data of case's:

casos = dataset['casos']
23/mar/2020        1
24/mar/2020        2
25/mar/2020        2
26/mar/2020        2
27/mar/2020        2
               ...  
26/dez/2021    18752
27/dez/2021    18752
28/dez/2021    18752
29/dez/2021    18752
30/dez/2021    18752
Name: casos, Length: 648, dtype: int64

getting the mortality percent:

perc_m = (mortos/casos)*100
perc_m
23/mar/2020    0.000000
24/mar/2020    0.000000
25/mar/2020    0.000000
26/mar/2020    0.000000
27/mar/2020    0.000000
                 ...   
26/dez/2021    2.223763
27/dez/2021    2.223763
28/dez/2021    2.223763
29/dez/2021    2.223763
30/dez/2021    2.223763
Length: 648, dtype: float64

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

covidbr-0.2-py3-none-any.whl (21.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page