Code Monkey home page Code Monkey logo

sivirep's Introduction

sivirep: Generación automatizada de reportes a partir de bases de datos de vigilancia epidemiológica

License: MIT R-CMD-check Codecov test coverage lifecycle-maturing Project Status: Active – The project has reached a stable, usable state and is being actively developed. CRAN status

sivirep es desarrollado por la Pontificia Universidad Javeriana como parte de la iniciativa Epiverse.

La versión actual de sivirep 1.0.0 proporciona funciones para la manipulación de datos y la generación de reportes automatizados basados en las bases de datos individualizadas de casos de SIVIGILA, que es el sistema oficial de vigilancia epidemiológica de Colombia.

Exclusión de responsabilidad

El uso de esta librería, así como de los datos, reportes generados y otros productos derivados de la misma, se realiza bajo la responsabilidad exclusiva del usuario. Ni los autores de la librería, ni la Pontificia Universidad Javeriana, ni la fuente de información asumen responsabilidad alguna por los resultados obtenidos o el uso que se haga de dichos productos.

Motivación

América Latina ha progresado en la calidad de sus sistemas de notificación y vigilancia epidemiológica. En particular, Colombia ha mejorado a lo largo de los años la calidad, la accesibilidad y la transparencia de su sistema oficial de vigilancia epidemiológica, SIVIGILA. Este sistema está regulado por el Instituto Nacional de Salud de Colombia y es operado por miles de trabajadores de la salud en las secretarías de salud locales, hospitales y unidades primarias generadoras de datos.

Sin embargo, todavía existen desafíos, especialmente a nivel local, en cuanto a la oportunidad y la calidad del análisis epidemiológico y de los informes epidemiológicos. Estas tareas pueden requerir una gran cantidad de trabajo manual debido a limitaciones en el entrenamiento para el análisis de datos, el tiempo que se requiere invertir, la tecnología y la calidad del acceso a internet en algunas regiones de Colombia.

El objetivo de sivirep es proporcionar un conjunto de herramientas para:

  1. Descargar, preprocesar y preparar los datos de SIVIGILA para su posterior análisis.
  2. Generar informes epidemiológicos automatizados adaptables al contexto.
  3. Proporcionar retroalimentación sobre el sistema de vigilancia al proveedor de la fuente de datos.

Potenciales usuarios

  • Profesionales de salud pública y de epidemiología de campo que utilizan la fuente de datos de SIVIGILA a nivel local.
  • Estudiantes del área de la salud y epidemiología.
  • Investigadores y analistas de datos a nivel nacional e internacional.

Versiones futuras

Las versiones futuras de sivirep podrían incluir:

  • Interacción con otras fuentes de datos en Colombia.
  • Otros sistemas de vigilancia epidemiológica en América Latina.

Contribuciones

Las contribuciones son bienvenidas via pull requests.

Los contribuyentes al paquete incluyen:

Autores: Geraldine Gómez-Millán, Zulma M. Cucunubá, Jennifer A. Mendez-Romero y Claudia Huguett-Aragón

Contribuyentes: Hugo Gruson, Juanita Romero-Garcés, Jaime A. Pavlich-Mariscal, Andrés Moreno, Miguel Gámez, Laura Gómez-Bermeo, Johan Calderón, Lady Flórez-Tapiero, Verónica Tangarife-Arredondo y Gerard Alarcon

Código de conducta

Por favor, ten en cuenta que el proyecto sivirep se publica con un Código de Conducta para Contribuyentes. Al contribuir a este proyecto, aceptas cumplir con sus términos.

Instalación

Puedes instalar sivirep desde CRAN utilizando:

install.packages("sivirep")

Si deseas instalar la versión de desarrollo de sivirep desde GitHub puedes hacerlos con el siguiente comando:

install.packages("pak")
pak::pak("epiverse-trace/sivirep")

También, puedes utilizar cualquiera de estas dos opciones:

install.packages("remotes")
remotes::install_github("epiverse-trace/sivirep")
install.packages("sivirep", repos = c("https://epiverse-trace.r-universe.dev", "https://cloud.r-project.org"))

Inicio rápido

Puedes iniciar importando el paquete después de finalizada su instalación con el siguiente comando:

library(sivirep)

Puedes revisar las enfermedades y los años disponibles para su descarga de forma libre utilizando:

lista_eventos <- list_events()
knitr::kable(lista_eventos)
enfermedad aa
1 Accidente Ofídico 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
2 Agresiones Por Animales Potencialmente Transmisores De Rabia 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
3 Anomalías Congénitas 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
4 Bajo Peso Al Nacer 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
5 Cáncer De La Mama Y Cuello Uterino 2016, 2017, 2018, 2019, 2020, 2021
6 Cáncer Infantil 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
7 Chagas 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
8 Chikunguya 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
9 Dengue 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
10 Dengue Grave 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
11 Esi - Irag (Vigilancia Centinela) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
12 Eta Colectivo 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
13 Evento Adverso Grave Posterior A La Vacunación 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
14 Exposición A Flúor 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019
15 Fiebre Amarilla 2007, 2008, 2009, 2013, 2016, 2018
16 Fiebre Tifoidea Y Paratifoidea 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
17 Hepatitis A 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
18 Hepatitis B, C Y Coinfección Hepatitis B Y Delta 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
19 Hepatitis C 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
20 Hipotiroidismo Congénito 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
21 Infección Respiratoria Aguda Grave Irag Inusitada 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
69 Intento De Suicidio
22 Intoxicación Por Gases 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
23 Intoxicación Por Medicamentos 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
24 Intoxicación Por Metales Pesados 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
25 Intoxicación Por Metanol 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
26 Intoxicación Por Otras Sustancias Químicas 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
27 Intoxicación Por Plaguicidas 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
28 Intoxicación Por Solventes 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
29 Intoxicación Por Sustancias Psicoactivas 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
30 Leishmaniasis Cutánea 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
31 Leishmaniasis Mucosa 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
32 Leishmaniasis Visceral 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
33 Lepra 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
34 Lesiones Por Artefactos Explosivos (Pólvora Y Minas Antipersonal) 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
35 Lesiones Por Pólvora Y Explosivos 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014
36 Leucemia Aguda Pediátrica Linfoide 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
37 Leucemia Aguda Pediátrica Mieloide 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
68 Malaria
38 Malaria Asociada (Formas Mixtas) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
39 Malaria Complicada 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
40 Malaria Falciparum 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
41 Malaria Malarie 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014
42 Malaria Vivax 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
43 Meningitis Meningocócica 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
44 Meningitis Por Haemophilus Influenzae 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
45 Meningitis Por Neumococo 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
46 Meningitis Tuberculosa 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
47 Morbilidad Por Eda 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
48 Morbilidad Por Ira 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
49 Mortalidad Materna 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
50 Mortalidad Perinatal Y Neonatal Tardía 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
51 Mortalidad Por Dengue 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
52 Mortalidad Por Desnutrición 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
53 Mortalidad Por Eda 0-4 Años 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
54 Mortalidad Por Ira 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
55 Mortalidad Por Malaria 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
56 Parotiditis 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
57 Rubeola 2007, 2008, 2009, 2011, 2012
58 Sarampión 2011, 2012, 2013, 2015, 2018, 2019, 2020
59 Tétanos Accidental 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
60 Tétanos Neonatal 2007, 2008, 2009, 2010, 2012, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
61 Tos Ferina 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
62 Tracoma 2017, 2018, 2019, 2022
63 Tuberculosis Extra Pulmonar 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
64 Tuberculosis Farmacorresistente 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
65 Tuberculosis Pulmonar 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
66 Varicela Individual 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
67 Vigilancia En Salud Pública De La Violencia De Género E Intrafamiliar 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022
70 Zika

Reporte automatizado

Actualmente, sivirep provee una plantilla de reporte llamada Reporte Básico {sivirep}, la cual recibe los siguientes parámetros de entrada: el nombre de la enfermedad, el año, el nombre de departamento (opcional) y nombre del municipio (opcional) para descargar los datos de la fuente de SIVIGILA.

Para hacer uso de la plantilla del reporte puedes seguir los siguientes pasos:

El reporte que obtendrás al utilizar la plantilla de sivirep es este:

Si deseas generar el reporte en formato PDF debes instalar LateX. Puedes instalarlo siguiendo las instrucciones que se encuentran en R Markdown Cookbook.

sivirep's People

Contributors

andresmore avatar bisaloo avatar chartgerink avatar geraldinegm avatar geraldinegomez avatar gsgomezm avatar jpavlich avatar tracelac avatar zmcucunuba avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

sivirep's Issues

Investigate performance and alternatives to clean one-off issues in upstream data

Relevant function is here:

sivirep/R/cleaning_data.R

Lines 413 to 438 in e91eea2

limpiar_val_atipic <- function(data_event) {
stopifnot("El parametro data_event es obligatorio" = !missing(data_event),
"El parametro data_event debe ser un data.frame" =
is.data.frame(data_event),
"El parametro data_event no debe estar vacio" =
nrow(data_event) > 0)
cols_events <- config::get(file =
system.file("extdata",
"config.yml",
package = "sivirep"),
"diseases_exceptions")
cod_event <- data_event$cod_eve[1]
if (cod_event > 0) {
for (event in cols_events) {
code <- names(event)
if (cod_event %in% code) {
cols <- event[as.character(cod_event)]
for (nom_cols in cols) {
for (col in nom_cols) {
data_event[eval(parse(text = col))] <- NA
}
}
}
}
}
}

Can we avoid the eval(parse()) and use a design that would allow users to plug in their own data file of issues (excel or other)?

Error when rendering PDF

Comportamiento Esperado

Render PDF de la información de una enfermedad, año y departamento especificados.

Comportamiento Actual

Error

Pasos a Reproducir

secuencia de pasos que se requieren para poder reproducir el defecto. Si en la ejecución del escenario usted hizo uso de algún dato, debe detallar en los pasos, que dato uso y en donde lo uso.

  1. Verificar que en el archivo PruebasPDF.Rmd (o cualquier nombre que se le haya dado al archivo) del template del reporte la línea 15 sea
    • \usepackage[spanish]{babel}
  2. Crear el reporte al ejecutar:
    library(tinytex)
    rmarkdown::render("PruebasPDF/PruebasPDF.Rmd", params = list(
    nombre_evento = "Malaria",
    year = 2017,
    departmento = "Choco"
    ))
  3. Esperar hasta el final de la ejecución, pues el error se obtiene al final.

Evidencias

! Package babel Error: Unknown option 'spanish'. Either you misspelled it
(babel) or the language definition file spanish.ldf
(babel) was not found.
(babel) There is a locale ini file for this language.
(babel) If it’s the main language, try adding `provide=*'
(babel) to the babel package options.

Error: LaTeX failed to compile PruebasPDF.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See PruebasPDF.log for more info.
Además: There were 50 or more warnings (use warnings() to see the first 50)

Contexto (Ambiente de Ejecución)

En esta sección se debe detallar el contexto en el que fue ejecutado el escenario de prueba.

  • Se probó en Windows 11 23H2
  • R versión 4.3.2
  • RStudio version 2023.12.1 Build 402

Información Adicional

Solución:
En la línea 15 del archivo PruebasPDF.Rmd donde inicialmente se tenía:

  • \usepackage[spanish]{babel}
    reemplazar por:
  • \usepackage[spanish, provide=*]{babel}

A pesar de no obtener error, se obtienen más de 50 warnings

image

Esto fue reportado por: @juanitaromerog

Código de departamento Error (Grupo 4) Sivirep

En la creación del mapa de malaria, el codigo de departamento no se ve reflejado en el mapa.

En este, aparece el número de orden en la que aparecen los departamento de la tabla de descripción.

Add .data prefix to calls with tidy evaluation

Most tidyverse functions use tidy evaluation, also called non-standard evaluation. This means that you don't use quotes to refer to something, even though this something is not an object in your R environment. For example:

# standard evaluation
library("ggplot2")

# non-standard evaluation. This should normally fail because we didn't define any object called "ggplot2". But it works due to some programming tricks inside the library() function
library(ggplot2)

In the case of dplyr, this takes the following form:

cars %>%
  # Note the absence of quotes around speed even though it's not a real object
  dplyr::filter(speed > 10)

The problem is that this will generate notes in R CMD check:

no visible binding for global variable ...

The proper solution, as documented in the vignette 'Programming with dplyr', and as documented by Maëlle Salmon in the RStudio community forum, is to use the .data prefix:

cars %>%
  dplyr::filter(.data$speed > 10)

Avoid simulatenous dependency on dplyr and data.table

dplyr/tidyverse and data.table has mostly the same overall set of features and it's generally not necessary to depend on both.

To improve code maintainability and sustainability by avoiding unnecessary dependencies, it would be good to decide about using just one of them.

I suspect the dependency on data.table (only used twice: https://github.com/search?q=repo%3Aepiverse-trace%2Fsivirep+data.table%3A%3A&type=code) is currently weaker than the dependency on dplyr so it's probably easier to remove it.

Friendly connection error messages

As part of #149 CRAN Policies indicate that:

Packages which use Internet resources should fail gracefully with an informative message if the resource is not available or has changed (and not give a check warning nor error).

All connections to SIVIGILA servers should address the above

Creación de función para obtención de tiempo entre las fechas

Si es posible incluir una función en donde se puedan obtener tiempos entre las fechas, por ejemplo, tiempo promedio entre fecha de inicio de síntomas y fecha de notificación, fecha de inicio de síntomas y fecha de defunción y fecha de inicio de síntomas y fecha de consulta.

Aporte Grupo 4 Sivirep.

Add preview of rendered report on documentation website

sivirep currently provides a very nice looking report and it would be good to already display it to potential users when they discover the package.

A good way to do this could be to add a copy of the pdf on the pkgdown website or/and a screenshot in the README.

I can try to submit a pull request if you agree with this idea but you're not sure how to implement it.

Hardcoded path to malaria files

Not 100% sure but it looks like you have hardcoded a path, which means that malaria data will be fetched in import_data_endemic_channel(), no matter what the user passes as disease_name:

file_path <- "../data/malaria/complicada/datos_"

Add names od departments/municipalities into spatial_dept_dist functions

spatial_dept_dist <- group_dept(disease_data = clean_disease_data)
is giving as output just id and casos

spatial_dept_dist
# A tibble: 16 × 2
   id    casos
   <chr> <int>
 1 1         1
 2 5         5
 3 8         4
 4 15       19

can you please add name of department, to the output?
With this feature, the output becomes helpful for making tables. A similar feature for municipalities is needed. Thanks!

geo_filter may have a problem filtering municipaloties

Hola Geral

  • [x ] I have the most recent version of sivirep and R
  • [x ] I have found a bug

Creo que he encontrado un bug pero no estoy segura cómo funciona porque el problema sólo ocurre con Cali en esta serie de ejemplos. Cuando uso el geofiltro para municipio Cali, me sale un total de 17 casos cuando deberían ser 13376. Pero lo probé para otros municipios del Valle y de Amazonas y no sale ese problema. No sé si sea algo con el nombre CALI. y tal vez pueda ocurrir con otros.

Dejo el código reproducible

library(sivirep)
dat <- import_data_event(year = 2020, nombre_event = "Dengue")
dat_clean <- limpiar_data_sivigila(data_event= dat)
dat_valle <- geo_filtro(data_event = dat_clean, dpto = "VALLE")
dat_cali  <- geo_filtro(data_event= dat_clean, dpto = "VALLE", mpio = "CALI")
dist_esp_mun <- agrupar_mpio(data_event = dat_valle, dpto = "VALLE")

NROW(dat_cali) # 17 casos 
dist_esp_mun %>% filter(municipio_ocurrencia == "CALI") # 13376 


dat_buga  <- geo_filtro(data_event= dat_clean, dpto = "VALLE", mpio = "BUGA")
NROW(dat_buga) # 1312 casos
dist_esp_mun %>% filter(municipio_ocurrencia == "BUGA") # 1312 casos

dat_amazonas <- geo_filtro(data_event = dat_clean, dpto = "AMAZONAS")
dat_leticia  <- geo_filtro(data_event= dat_clean, dpto = "AMAZONAS", mpio = "LETICIA")
dist_esp_amazonas_mun <- agrupar_mpio(data_event = dat_amazonas, dpto = "AMAZONAS")
NROW(dat_leticia) # 176 casos
dist_esp_amazonas_mun %>% filter(municipio_ocurrencia == "LETICIA") # 176 casos

¡Mil gracias!

Reduce the size of dengue2020

The example dataset dengue2020 is currently too large. It's essential to reduce its size for both performance optimization and to meet CRAN's submission requirements.

Add pkgdown reference index sections

sivirep currently provides many utility function to manipulate data provided by the SIVIGILA source.

As a result, the pkgdown reference index can be a bit overwhelming. It would be good to group the functions into logical sections, as ggplot2 for example is doing.

Your good design work makes it particularly easy here since you have use consistent function prefixes and names moulds throughout the package so you can just use selectors such as starts_with().

Related pkgdown documentation: https://pkgdown.r-lib.org/reference/build_reference.html#reference-index

Prepare for CRAN release

I have not reviewed the package code or design but upon a cursory look, here are the points that almost surely will cause issues with CRAN:

  • the package is too large (>= 5MB):
    • some data is duplicated across data and inst/extdata, can this be fixed?
    • can a subset of the dengue2020 dataset be used in examples? Examples are just here to demonstrate the function usage, it's not so important if the result is not necessarily meaningful from a scientific point of view. Vignettes are here to fill this gap.
    • the getting_started.Rmd and sivirep.Rmd vignettes seem mostly duplicated (both leading to an almost 50MB HTML file)
    • I would convert the gif to webm, which is widely supported by all web browsers now (source): I achieved a 20x file size reduction doing this (with ffmpeg). Please let me know if you'd like me to submit a PR with this change
  • examples take too long
    • this should be improved automatically if you follow the smaller example dataset recommendation above
    • longer examples should be wrapped in \donttest{}
  • the package is in Spanish. This is not a problem in itself but it's uncommon enough that CRAN is likely to raise an eyebrow over this. I would pre-empt any comments by explaining in cran-comments.md to scope of the package, why it has to be in Spanish, and how you have tried to follow recommendation from the official 'Writing R Extensions' guide: https://cran.r-project.org/doc/manuals/R-exts.html#The-DESCRIPTION-file-1

Reporte grafico final

Respecto a la generación grafica, cuando se seleccione solo un municipio se podria visualizar todo el departamento y sombrear especificamente el municipio, para no ser redundante en graficas de este tipo:
Captura de pantalla 2024-04-25 111844

Por otra parte seria interesante ver análisis comparativos entre departamentos al permitir seleccionar mas de una opción en esta variable.

epidemic channel

Hi Gerald! Just before I forget, this is the typical visualisation for the endemic channel from Sivigila. Perhaps we need to work on this visualisation as a new feature for multi-year reports for both national and subnational. For the national, it would be ideal to have the plot for 32 departments at once.

image

Comentarios SIVIREP

Es una buena aproximación al análisis exploratorio de las bases publicas de Sivigila, algunas mejoras de "forma" incluyen:

Los ejes de edad son "grupos de edad" no edades simples.
Nombrar las gráficas en la parte superior.
La gráfica de fecha de notificación esta repetida con la gráfica de fecha por inicio de síntomas.

Un cambio importante es que Dengue y Malaria se debe calcular sobre la población a riesgo que provee Ministerio de Salud y no sobre población total de las proyecciones DANE.

Muchas gracias por el trabajo porque permite automatizar el proceso de análisis descriptivo de históricos.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.