AlertaDengue / PySUS

Library to download, clean and analyze openly available datasets from Brazilian Universal health system, SUS.
GNU General Public License v3.0
175 stars 68 forks source link

Infogripe support #107

Closed fccoelho closed 1 year ago

fccoelho commented 1 year ago

Started implementing access. Not all csvs are available at this point

fccoelho commented 1 year ago

@marfcg What other datasets would you think would be nice to make available via PySUS?

esloch commented 1 year ago

It's OK @fccoelho!

In [1]: from pysus.online_data.Infogripe import list_datasets, download

In [2]: list_datasets()
Out[2]: 
['Alerta de situação',
 'Casos por idade, sexo e virus',
 'Casos Totais e estimativas',
 'Valores esperados por localidades']

In [3]: %time df1 = download("Alerta de situação")
CPU times: user 36.8 ms, sys: 0 ns, total: 36.8 ms
Wall time: 465 ms

In [4]: df1.shape
Out[4]: (74, 10)

In [5]: %time df2 = download("Casos por idade, sexo e virus")
CPU times: user 2.75 s, sys: 318 ms, total: 3.07 s
Wall time: 8.28 s

In [6]: df2.shape
Out[6]: (829577, 42)

In [7]: %time df3 = download("Casos Totais e estimativas")
CPU times: user 828 ms, sys: 51.7 ms, total: 880 ms
Wall time: 2.22 s

In [8]: df3.shape
Out[8]: (321900, 21)

In [9]: %time df4 = download("Valores esperados por localidades")
CPU times: user 90.9 ms, sys: 9.29 ms, total: 100 ms
Wall time: 2.04 s

In [10]: df4.shape
Out[10]: (23088, 14)
luabida commented 1 year ago

LGTM! Seems like some files have conflicts on this branch

github-actions[bot] commented 1 year ago

:tada: This PR is included in version 0.8.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: