Downloading data from the National Immunization program (PNI)

[5]:
from pysus.online_data import PNI, parquets_to_dataframe

We can start by checking the data available for a given state, for example, Rio de Janeiro:

[6]:
PNI.get_available_years('RJ')
[6]:
['1994',
 '1995',
 '1996',
 '1997',
 '1998',
 '1999',
 '2000',
 '2001',
 '2002',
 '2003',
 '2004',
 '2005',
 '2006',
 '2007',
 '2008',
 '2009',
 '2010',
 '2011',
 '2012',
 '2013',
 '2014',
 '2015',
 '2016',
 '2017',
 '2018',
 '2019']

Then we can fetch data from a particular year:

[8]:
rj19 = PNI.download('RJ', 2019)
[9]:
parquets_to_dataframe(rj19)
[9]:
ANO UF MUNIC IMUNO QT_DOSE POP COBERT
0 2019 33 330010 000 372 2628 14,16
1 2019 33 330010 003 341 2628 12,98
2 2019 33 330010 006 144 2628 5,48
3 2019 33 330010 010 385 2628 14,65
4 2019 33 330010 012 522 2628 19,86
... ... ... ... ... ... ... ...
2185 2019 33 330630 098 578 3363 17,19
2186 2019 33 330630 099 402 3363 11,95
2187 2019 33 330630 102 75 6051 1,24
2188 2019 33 330630 103 1597 0
2189 2019 33 330630 3 3363 ,09

2190 rows × 7 columns