<jupyter_start><jupyter_text>Downloade da base de dados<jupyter_code># rodar com hight ram
!pip install basedosdados

import pandas as pd
import basedosdados as bd

df = bd.read_table(dataset_id='br_ms_vacinacao_covid19', 
            table_id='microdados_vacinacao', billing_project_id='covid19-315118', limit = 34000000)<jupyter_output>Requirement already satisfied: basedosdados in /usr/local/lib/python3.7/dist-packages (1.5.3)
Requirement already satisfied: Jinja2==2.11.2 in /usr/local/lib/python3.7/dist-packages (from basedosdados) (2.11.2)
Requirement already satisfied: google-cloud-bigquery-storage==1.1.0 in /usr/local/lib/python3.7/dist-packages (from basedosdados) (1.1.0)
Requirement already satisfied: click==7.1.2 in /usr/local/lib/python3.7/dist-packages (from basedosdados) (7.1.2)
Requirement already satisfied: pandas==1.2.4 in /usr/local/lib/python3.7/dist-packages (from basedosdados) (1.2.4)
Requirement already satisfied: pyaml==20.4.0 in /usr/local/lib/python3.7/dist-packages (from basedosdados) (20.4.0)
Requirement already satisfied: ruamel.yaml==0.17.4 in /usr/local/lib/python3.7/dist-packages (from basedosdados) (0.17.4)
Requirement already satisfied: pandas-gbq==0.13.2 in /usr/local/lib/python3.7/dist-packages (from basedosdados) (0.13.2)
Requirement already satisfied: google-cloud-storage==1.31.2 in [...]<jupyter_text>Manipulação da base Total de vacinados por estado<jupyter_code>pacientesUFTotal = df.groupby('sigla_uf',).id_paciente.size()
pacientesUFTotal = pacientesUFTotal.sort_values
print(pacientesUFTotal)<jupyter_output><bound method Series.sort_values of sigla_uf
AC     192600
AL     544174
AM     651481
AP     182917
BA    2137187
CE    1118229
DF     544994
ES     816646
GO     857220
MA     953740
MG    3343026
MS     465560
MT     546029
PA     953659
PB     695020
PE    1539543
PI     409327
PR    2138002
RJ    2870293
RN     663021
RO     381949
RR     140155
RS    2344875
SC    1091002
SE     427843
SP    7605740
TO     385768
Name: id_paciente, dtype: int64><jupyter_text>porcentagem dos pacientes que tomaram a segunda dose<jupyter_code>pacientesUF = (df.groupby('sigla_uf',).mean()-1)*100/2
pacientesUF = pacientesUF.sort_values
print(pacientesUF)<jupyter_output><bound method DataFrame.sort_values of                dose
sigla_uf           
AC        14.258341
AL        13.979812
AM        17.812930
AP        16.010540
BA        13.983624
CE        17.347641
DF        17.048169
ES        14.916731
GO        16.311565
MA        14.694518
MG        16.460887
MS        15.376858
MT        15.220071
PA        15.726376
PB        17.754119
PE        17.431107
PI        16.070809
PR        15.699538
RJ        14.286854
RN        16.239154
RO        16.386524
RR        19.254397
RS        16.822688
SC        15.810495
SE        14.629899
SP        16.400602
TO        16.308896><jupyter_text>vacinas mais usadas para a segunda dose<jupyter_code>vacinas = (df.groupby('nome_fabricante').mean()-1)*100/2
print(vacinas)<jupyter_output>dose
nome_fabricante                                   
ABBOTT BIOLOGICALS B.V. WEESP - HOLANDA   0.000000
ASTRA ZENECA                              5.089669
ASTRA ZENECA /FIOCRUZ                     0.000000
ASTRA ZENECA COVISHIELD                   0.000000
ASTRA ZENECA FIO CRUZ                     0.000000
...                                            ...
sinovac / butantan                        0.000000
sinovac- butantan                        50.000000
sinovac/ butantan                         0.000000
sinovac/butantam                          0.000000
sinovac/butantan                          8.760684

[160 rows x 1 columns]<jupyter_text>aplicacao da segunda dose(porcentagem por data)<jupyter_code>dataAplicacao = (df.groupby('data_aplicacao').mean()-1)*100/2
print(dataAplicacao)<jupyter_output>dose
data_aplicacao           
1939-04-22       0.000000
1956-04-05       0.000000
2018-02-11       0.000000
2019-03-25       0.000000
2020-01-20       0.000000
...                   ...
2021-05-27      12.086680
2021-05-28       8.730229
2021-05-29       7.130563
2021-05-30       3.608622
2021-05-31      10.554659

[162 rows x 1 columns]
{'fraction_non_alphanumeric': 0.09044984363723839, 'fraction_numerical': 0.17488573490497955, 'mean_word_length': 2.3210862619808306, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '324521', 'license': 'MIT', 'n_tokens_mistral': 1941, 'n_tokens_neox': 1506, 'n_words': 326, 'path': 'test_bases_covid.ipynb', 'repo_name': 'FranklinAurelio/Projetos_em_engenharia_da_computacao', 'size': '4157'}