jincio / covidperu Goto Github PK
View Code? Open in Web Editor NEWFunciones para procesar información sobre COVID-19 en Perú
License: Other
Funciones para procesar información sobre COVID-19 en Perú
License: Other
Write a new function to load vaccinated data from datos abiertos Peru.
Hola, encontré un problema al ejecutar los códigos para los dataframes siguientes:
positivos=da_positivos()
fallecidos=da_fallecidos()
Solía funcionar normalmente, considero que hubo un cambio en la Base de datos del Gobierno. El error al ejecutar cualquiera de los códigos para los dataframes indicados, es el siguiente:
Mi sesión info es:
Session info ---------------------------------------------------------------------------------------------------
setting value
version R version 4.0.2 (2020-06-22)
os Windows 8.1 x64
system x86_64, mingw32
ui RStudio
language (EN)
collate Spanish_Peru.1252
ctype Spanish_Peru.1252
tz America/Bogota
date 2020-10-26
Packages -------------------------------------------------------------------------------------------------------
package * version date lib source
assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.0.2)
backports 1.1.10 2020-09-15 [1] CRAN (R 4.0.2)
callr 3.5.0 2020-10-08 [1] CRAN (R 4.0.2)
cellranger 1.1.0 2016-07-27 [1] CRAN (R 4.0.2)
cli 2.0.2 2020-02-28 [1] CRAN (R 4.0.2)
colorspace 1.4-1 2019-03-18 [1] CRAN (R 4.0.2)
covidPeru * 0.0.0.9000 2020-10-10 [1] Github (f954647)
crayon 1.3.4 2017-09-16 [1] CRAN (R 4.0.2)
curl 4.3 2019-12-02 [1] CRAN (R 4.0.2)
data.table 1.13.0 2020-07-24 [1] CRAN (R 4.0.2)
desc 1.2.0 2018-05-01 [1] CRAN (R 4.0.2)
devtools * 2.3.2 2020-09-18 [1] CRAN (R 4.0.2)
digest 0.6.25 2020-02-23 [1] CRAN (R 4.0.2)
dplyr * 1.0.2 2020-08-18 [1] CRAN (R 4.0.2)
DT 0.15 2020-08-05 [1] CRAN (R 4.0.2)
ellipsis 0.3.1 2020-05-15 [1] CRAN (R 4.0.2)
evaluate 0.14 2019-05-28 [1] CRAN (R 4.0.2)
fansi 0.4.1 2020-01-08 [1] CRAN (R 4.0.2)
fastmap 1.0.1 2019-10-08 [1] CRAN (R 4.0.2)
fs 1.5.0 2020-07-31 [1] CRAN (R 4.0.2)
generics 0.0.2 2018-11-29 [1] CRAN (R 4.0.2)
ggplot2 * 3.3.2 2020-06-19 [1] CRAN (R 4.0.2)
glue 1.4.2 2020-08-27 [1] CRAN (R 4.0.2)
gtable 0.3.0 2019-03-25 [1] CRAN (R 4.0.2)
hms 0.5.3 2020-01-08 [1] CRAN (R 4.0.2)
htmltools 0.5.0 2020-06-16 [1] CRAN (R 4.0.2)
htmlwidgets 1.5.2 2020-10-03 [1] CRAN (R 4.0.2)
httpuv 1.5.4 2020-06-06 [1] CRAN (R 4.0.2)
httr 1.4.2 2020-07-20 [1] CRAN (R 4.0.2)
jsonlite 1.7.1 2020-09-07 [1] CRAN (R 4.0.2)
knitr 1.30 2020-09-22 [1] CRAN (R 4.0.2)
later 1.1.0.1 2020-06-05 [1] CRAN (R 4.0.2)
lazyeval 0.2.2 2019-03-15 [1] CRAN (R 4.0.2)
lifecycle 0.2.0 2020-03-06 [1] CRAN (R 4.0.2)
lubridate * 1.7.9 2020-06-08 [1] CRAN (R 4.0.2)
magrittr 1.5 2014-11-22 [1] CRAN (R 4.0.2)
memoise 1.1.0 2017-04-21 [1] CRAN (R 4.0.2)
mime 0.9 2020-02-04 [1] CRAN (R 4.0.0)
MMWRweek * 0.1.3 2020-04-22 [1] CRAN (R 4.0.2)
munsell 0.5.0 2018-06-12 [1] CRAN (R 4.0.2)
pillar 1.4.6 2020-07-10 [1] CRAN (R 4.0.2)
pkgbuild 1.1.0 2020-07-13 [1] CRAN (R 4.0.2)
pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.0.2)
pkgload 1.1.0 2020-05-29 [1] CRAN (R 4.0.2)
plotly 4.9.2.1 2020-04-04 [1] CRAN (R 4.0.2)
prettyunits 1.1.1 2020-01-24 [1] CRAN (R 4.0.2)
processx 3.4.4 2020-09-03 [1] CRAN (R 4.0.2)
promises 1.1.1 2020-06-09 [1] CRAN (R 4.0.2)
ps 1.4.0 2020-10-07 [1] CRAN (R 4.0.2)
purrr * 0.3.4 2020-04-17 [1] CRAN (R 4.0.2)
R6 2.4.1 2019-11-12 [1] CRAN (R 4.0.2)
Rcpp 1.0.5 2020-07-06 [1] CRAN (R 4.0.2)
readr * 1.4.0 2020-10-05 [1] CRAN (R 4.0.2)
readxl 1.3.1 2019-03-13 [1] CRAN (R 4.0.2)
remotes 2.2.0 2020-07-21 [1] CRAN (R 4.0.2)
rlang 0.4.7 2020-07-09 [1] CRAN (R 4.0.2)
rmarkdown 2.4 2020-09-30 [1] CRAN (R 4.0.2)
rprojroot 1.3-2 2018-01-03 [1] CRAN (R 4.0.2)
rstudioapi 0.11 2020-02-07 [1] CRAN (R 4.0.2)
scales 1.1.1 2020-05-11 [1] CRAN (R 4.0.2)
sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 4.0.2)
shiny * 1.5.0 2020-06-23 [1] CRAN (R 4.0.2)
shinythemes 1.1.2 2018-11-06 [1] CRAN (R 4.0.2)
testthat 2.3.2 2020-03-02 [1] CRAN (R 4.0.2)
tibble 3.0.3 2020-07-10 [1] CRAN (R 4.0.2)
tidyr 1.1.2 2020-08-27 [1] CRAN (R 4.0.2)
tidyselect 1.1.0 2020-05-11 [1] CRAN (R 4.0.2)
tinytex 0.26 2020-09-22 [1] CRAN (R 4.0.2)
usethis * 1.6.3 2020-09-17 [1] CRAN (R 4.0.2)
vctrs 0.3.4 2020-08-29 [1] CRAN (R 4.0.2)
viridisLite 0.3.0 2018-02-01 [1] CRAN (R 4.0.2)
withr 2.3.0 2020-09-22 [1] CRAN (R 4.0.2)
xfun 0.18 2020-09-29 [1] CRAN (R 4.0.2)
xtable 1.8-4 2019-04-21 [1] CRAN (R 4.0.2)
yaml 2.2.1 2020-02-01 [1] CRAN (R 4.0.2)
Holas!
Reporto error al usar la función da_sinadef()
covidPeru::da_sinadef()
[-805306368%] Downloaded 0 bytes....
|--------------------------------------------------|
|==================================================|
si lees esto es que el archivo bajo bien :)
...limpiando el archivo
...Eliminamos informacion vacia
Error in inicio:nrow(data) : Argumento NA/NaN
Parece que ya no es necesario retirar espacios en blanco de la base. Ver aquí:
library(tidyverse)
file <- "https://cloud.minsa.gob.pe/s/nqF2irNbFomCLaa/download"
data <- data.table::fread(file, encoding = "Latin-1")
data %>% janitor::clean_names() %>% glimpse()
Rows: 704,375
Columns: 31
$ na <int> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18~
$ tipo_seguro <chr> "SIS", "SIS", "IGNORADO", "SIS", "IGNORADO", "SIS", "ESSALUD"~
$ sexo <chr> "FEMENINO", "MASCULINO", "MASCULINO", "FEMENINO", "MASCULINO"~
$ edad <chr> "15", "4", "59", "86", "38", "51", "85", "64", "8", "20", "2"~
$ tiempo_edad <chr> "MINUTOS", "AÑOS", "AÑOS", "AÑOS", "AÑOS", "AÑOS", "AÑO~
$ estado_civil <chr> "SOLTERO", "SOLTERO", "SOLTERO", "SOLTERO", "IGNORADO", "SOLT~
$ na_2 <chr> "SUPERIOR NO UNIV. COMP.", "IGNORADO", "IGNORADO", "PRIMARIA ~
$ cod_number_ubigeo_domicilio <chr> "92-33-12-08-06-000", "92-33-21-04-01-000", "92-33-24-01-01-0~
$ pais_domicilio <chr> "PERU", "PERU", "PERU", "PERU", "FILIPINAS ~
$ departamento_domicilio <chr> "LA LIBERTAD", "SAN MARTIN", "CALLAO", "SAN MARTIN", "EXTRANJ~
$ provincia_domicilio <chr> "ASCOPE", "MARISCAL CACERES", "CALLAO", "LAMAS", "EXTRANJERO"~
$ distrito_domicilio <chr> "PAIJAN", "JUANJUI", "CALLAO", "TABALOSOS", "EXTRANJERO", "OY~
$ fecha <date> 2021-01-19, 2020-01-17, 2021-01-30, 2020-01-03, 2020-01-19, ~
$ year <int> 2021, 2020, 2021, 2020, 2020, 2021, 2021, 2020, 2021, 2020, 2~
$ mes <int> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1~
$ tipo_lugar <chr> "EESS", "EESS", "VIA PUBLICA", "DOMICILIO", "OTRO", "VIA PUBL~
$ institucion <chr> "ESSALUD", "GOBIERNO REGIONAL", "SIN REGISTRO", "SIN REGISTRO~
$ muerte_violenta <chr> "SIN REGISTRO", "SIN REGISTRO", "NO SE CONOCE", "SIN REGISTRO~
$ necropsia <chr> "NO SE REALIZÓ NECROPSIA", "NO SE REALIZÓ NECROPSIA", "SI S~
$ debido_a_causa_a <chr> "ASFIXIA DE NACIMIENTO SEVERA", "INSUFICIENCIA RESPIRATORIA A~
$ causa_a_cie_x <chr> "P210", "J960", "SIN REGISTRO", "I219", "SIN REGISTRO", "I219~
$ debido_a_causa_b <chr> "DIFICULTAD RESPIRATORIA DEL RECIEN NACIDO", "NEUMONIA SEVERA~
$ causa_b_cie_x <chr> "P229", "J159", "SIN REGISTRO", "E785", "SIN REGISTRO", "SIN ~
$ debido_a_causa_c <chr> "INMATURIDAD EXTREMA", "SIN REGISTRO", "SUCESO DE TRANSITO", ~
$ causa_c_cie_x <chr> "P072", "SIN REGISTRO", "SIN REGISTRO", "I709", "SIN REGISTRO~
$ debido_a_causa_d <chr> "SIN REGISTRO", "SIN REGISTRO", "SIN REGISTRO", "HIPERTENSION~
$ causa_d_cie_x <chr> "SIN REGISTRO", "SIN REGISTRO", "SIN REGISTRO", "I10X", "SIN ~
$ debido_a_causa_e <chr> "SIN REGISTRO", "PARALISIS CEREBRAL INFANTIL", "SIN REGISTRO"~
$ causa_e_cie_x <chr> "SIN REGISTRO", "G809", "SIN REGISTRO", "SIN REGISTRO", "SIN ~
$ debido_a_causa_f <chr> "SIN REGISTRO", "SIN REGISTRO", "SIN REGISTRO", "SIN REGISTRO~
$ causa_f_cie_x <chr> "SIN REGISTRO", "SIN REGISTRO", "SIN REGISTRO", "SIN REGISTRO~
Revisar esto:
Error: Insufficient values in manual scale. 3 needed but only 2 provided
Corregir los labels de las gráficas que resultan de la función casos_diarios. El label de la variable y es fallecidos diarios. Se debe cambiar por Casos diarios.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.