Skip to content

Commit

Permalink
Feat: added and removed logic for dpto and mpio param (#76)
Browse files Browse the repository at this point in the history
* adding conditional for single color in plot by variable (#20)

* dengue-example

* adding single color for fill

---------

Co-authored-by: zmcucunuba <zulma.cucunuba@javeriana.edu.co>

* modify conditional of var_fill (#21)

* dengue-example

* adding single color for fill

* modify conditional for var_fill

---------

Co-authored-by: zmcucunuba <zulma.cucunuba@javeriana.edu.co>

* modify dengue example and plot by variables (#23)

* dengue-example

* adding single color for fill

* modify conditional for var_fill

* modify conditional for var_fill

* modify conditional for var_fill

* modify dengue-example

---------

Co-authored-by: zmcucunuba <zulma.cucunuba@javeriana.edu.co>

* modify text size and color of plot by variable (#24)

* dengue-example

* adding single color for fill

* modify conditional for var_fill

* modify conditional for var_fill

* modify conditional for var_fill

* modify dengue-example

* modify text size and color of plot by variable

---------

Co-authored-by: zmcucunuba <zulma.cucunuba@javeriana.edu.co>

* updating text size plot

* automation porcentage of ages and total cases, correction of graphs (#25)

* dengue-example

* adding single color for fill

* adecuación de la función plt by variable

* modificaciones del ejemplo

* últimos cambios a la función plot by variable

* Texto del reporte automatizado

* automating cases total and modify graphs

* commit para hacer pull

* Automatización, corrección de gráficas y numeraciónb

* automation porcentage age cases and correction graphs

* automation porcentage age cases and correction graphs

* Automatización del porcentaje

* add porcentage symbol

---------

Co-authored-by: zmcucunuba <zulma.cucunuba@javeriana.edu.co>
Co-authored-by: megamezl <megamezl@unal.edu.co>

* automation of total cases and correction of graphs (#26)

* dengue-example

* adding single color for fill

* adecuación de la función plt by variable

* modificaciones del ejemplo

* últimos cambios a la función plot by variable

* Texto del reporte automatizado

* automating cases total and modify graphs

* commit para hacer pull

* Automatización, corrección de gráficas y numeraciónb

* automation porcentage age cases and correction graphs

* automation porcentage age cases and correction graphs

* Automatización del porcentaje

* add porcentage symbol

---------

Co-authored-by: zmcucunuba <zulma.cucunuba@javeriana.edu.co>
Co-authored-by: megamezl <megamezl@unal.edu.co>

* updating var_fill

* restoring parameters function

* updating single color plot by variable

* update lifecycle RECON in README file

* update lifecycle to maturing in README file

* update and add functions of subnational report and package documentation (#32)

* modify dengue-example (#22)

* adding conditional for single color in plot by variable (#20)

* dengue-example

* adding single color for fill

---------

Co-authored-by: zmcucunuba <zulma.cucunuba@javeriana.edu.co>

* modify conditional of var_fill (#21)

* dengue-example

* adding single color for fill

* modify conditional for var_fill

---------

Co-authored-by: zmcucunuba <zulma.cucunuba@javeriana.edu.co>

---------

Co-authored-by: zmcucunuba <zulma.cucunuba@javeriana.edu.co>

* creating the package website

* create initial sections of the basic report, cleaning and util functions, updating dengue example

* creating function documentation on report_sections, clean_data and utils

* fix param functions of get cases distributions by age and gender

* adding plot titles and new gender and epiweek section

* updatind documentation functions

* fix plot function section by gender and epiweek

* adding documentation new function of special population

* adding new function of special population to basic report

* adding spacial distribution section and utils

* update documentation functions of spacial distribution section and utils

* updating spacial distribution function

* updating documentation functions of distribution spatial

* updating spatial distribution function

* standarization variables and creating clean general function

* modify clean sivigila data function and create general functionto clean depto codes

* create documentation of new clean functions

* refactoring functions of onset and notification date sections

* creating documentation function of notification data and onsent symp

* modify general clean data function

* modify clean sivigila data

* creating components of gender and epiweek section

* creating components of age and gender, special population section

* creating components of age and gender, special population section

* creating components of spacial distribution section

* fixing variables components of special population and gender

* fixing caption text sixe and breaks

* removing message plot map

* fixing caption text sixe and breaks

* fixing caption text size

* fixing caption text size and map

* fixing title distribution age and week, and percentage cases by age

* fixing percentage cases by age

* creating skeleton template of basic report

* updating template package

* adding params to report basic skeleton

* updating the documentation functions of the clean data module

* fix: documentation of functions

* clean: data, functions and files

* clean: list disease and ReadMe file

* remve: title map

* remove day of label

* renaming functions and variables

* updating documentation functions

* renaming function names and refactoring the vignettes content

* renaming function names, refactoring the vignettes content and updating documentation

* updating documentation and titles plots

* updating documentation list_available_diseases_years

* fix: documentation functions, vignettes, ReadMe and Dengue Example

* fixing general documentation

* fix images ReadMe file

* fix: ReadMe file and vignettess

* remove some dependencies and functions deprecated

* Adding tips to ReadMe and Vignettes

* updating size images

* updating size images ReadMe

* adding space ReadMe file

* updating align left images

* Adding  style images ReadMe and Vignettes

* Adding  style images ReadMe and Vignettes

* Adding  style images ReadMe and Vignettes

* fix: style images ReadMe and Vignettes

* fix: style images Vignettes

* fix: echo ReadMe

* fix: some variables and typo in ReadMe

* fixing ReadMe and Vignettes, updating website

* adding dependencie map and scale y for plot variable function

* fix> scale y for plot variable function

* improving group functions

* updationg plot map function and dependencies

* updationg plot map function and dependencies

* updationg examples and documentation

* updating examples and documentation

* fix: function examples

* remove files

* fix examples and lintr of modules

* fix message plot

* divide map plot

* adding new functions to municipalities and departments

* adding new functions to municipalities and departments

* adding new functions to municipalities and departments

* adding new functions to municipalities and departments

* modify plot and group municipalities and examples

* modify plot and group municipalities and examples

* modify plot and group municipalities and examples

* export functions to departments and municipalities and examples

* fix general syntax and rename functions of municipalities

* fix called of function geo ocurrence

* update template Reporte Basico

* preview basic report

* add function clean cols by exceptions

* adding diseases like input choice on skeleton

* modify forma exceptios cols disease in config file

* adding analysis of notification department and municipality

* update: functions on ReadMe file

* update: version and README files

---------

Co-authored-by: zmcucunuba <zulma.cucunuba@javeriana.edu.co>

* fix: code style and indentation (#33)

* creating the package website

* create initial sections of the basic report, cleaning and util functions, updating dengue example

* creating function documentation on report_sections, clean_data and utils

* fix param functions of get cases distributions by age and gender

* adding plot titles and new gender and epiweek section

* updatind documentation functions

* fix plot function section by gender and epiweek

* adding documentation new function of special population

* adding new function of special population to basic report

* adding spacial distribution section and utils

* update documentation functions of spacial distribution section and utils

* updating spacial distribution function

* updating documentation functions of distribution spatial

* updating spatial distribution function

* standarization variables and creating clean general function

* modify clean sivigila data function and create general functionto clean depto codes

* create documentation of new clean functions

* refactoring functions of onset and notification date sections

* creating documentation function of notification data and onsent symp

* modify general clean data function

* modify clean sivigila data

* creating components of gender and epiweek section

* creating components of age and gender, special population section

* creating components of age and gender, special population section

* creating components of spacial distribution section

* fixing variables components of special population and gender

* fixing caption text sixe and breaks

* removing message plot map

* fixing caption text sixe and breaks

* fixing caption text size

* fixing caption text size and map

* fixing title distribution age and week, and percentage cases by age

* fixing percentage cases by age

* creating skeleton template of basic report

* updating template package

* adding params to report basic skeleton

* updating the documentation functions of the clean data module

* fix: documentation of functions

* clean: data, functions and files

* clean: list disease and ReadMe file

* remve: title map

* remove day of label

* renaming functions and variables

* updating documentation functions

* renaming function names and refactoring the vignettes content

* renaming function names, refactoring the vignettes content and updating documentation

* updating documentation and titles plots

* updating documentation list_available_diseases_years

* fix: documentation functions, vignettes, ReadMe and Dengue Example

* fixing general documentation

* fix images ReadMe file

* fix: ReadMe file and vignettess

* remove some dependencies and functions deprecated

* Adding tips to ReadMe and Vignettes

* updating size images

* updating size images ReadMe

* adding space ReadMe file

* updating align left images

* Adding  style images ReadMe and Vignettes

* Adding  style images ReadMe and Vignettes

* Adding  style images ReadMe and Vignettes

* fix: style images ReadMe and Vignettes

* fix: style images Vignettes

* fix: echo ReadMe

* fix: some variables and typo in ReadMe

* fixing ReadMe and Vignettes, updating website

* adding dependencie map and scale y for plot variable function

* fix> scale y for plot variable function

* improving group functions

* updationg plot map function and dependencies

* updationg plot map function and dependencies

* updationg examples and documentation

* updating examples and documentation

* fix: function examples

* remove files

* fix examples and lintr of modules

* fix message plot

* divide map plot

* adding new functions to municipalities and departments

* adding new functions to municipalities and departments

* adding new functions to municipalities and departments

* adding new functions to municipalities and departments

* modify plot and group municipalities and examples

* modify plot and group municipalities and examples

* modify plot and group municipalities and examples

* export functions to departments and municipalities and examples

* fix general syntax and rename functions of municipalities

* fix called of function geo ocurrence

* update template Reporte Basico

* preview basic report

* add function clean cols by exceptions

* adding diseases like input choice on skeleton

* modify forma exceptios cols disease in config file

* adding analysis of notification department and municipality

* update: functions on ReadMe file

* update: version and README files

* fix: typo, identation of code

* update functions and documentation of subnational report (#34)

* creating the package website

* create initial sections of the basic report, cleaning and util functions, updating dengue example

* creating function documentation on report_sections, clean_data and utils

* fix param functions of get cases distributions by age and gender

* adding plot titles and new gender and epiweek section

* updatind documentation functions

* fix plot function section by gender and epiweek

* adding documentation new function of special population

* adding new function of special population to basic report

* adding spacial distribution section and utils

* update documentation functions of spacial distribution section and utils

* updating spacial distribution function

* updating documentation functions of distribution spatial

* updating spatial distribution function

* standarization variables and creating clean general function

* modify clean sivigila data function and create general functionto clean depto codes

* create documentation of new clean functions

* refactoring functions of onset and notification date sections

* creating documentation function of notification data and onsent symp

* modify general clean data function

* modify clean sivigila data

* creating components of gender and epiweek section

* creating components of age and gender, special population section

* creating components of age and gender, special population section

* creating components of spacial distribution section

* fixing variables components of special population and gender

* fixing caption text sixe and breaks

* removing message plot map

* fixing caption text sixe and breaks

* fixing caption text size

* fixing caption text size and map

* fixing title distribution age and week, and percentage cases by age

* fixing percentage cases by age

* creating skeleton template of basic report

* updating template package

* adding params to report basic skeleton

* updating the documentation functions of the clean data module

* fix: documentation of functions

* clean: data, functions and files

* clean: list disease and ReadMe file

* remve: title map

* remove day of label

* renaming functions and variables

* updating documentation functions

* renaming function names and refactoring the vignettes content

* renaming function names, refactoring the vignettes content and updating documentation

* updating documentation and titles plots

* updating documentation list_available_diseases_years

* fix: documentation functions, vignettes, ReadMe and Dengue Example

* fixing general documentation

* fix images ReadMe file

* fix: ReadMe file and vignettess

* remove some dependencies and functions deprecated

* Adding tips to ReadMe and Vignettes

* updating size images

* updating size images ReadMe

* adding space ReadMe file

* updating align left images

* Adding  style images ReadMe and Vignettes

* Adding  style images ReadMe and Vignettes

* Adding  style images ReadMe and Vignettes

* fix: style images ReadMe and Vignettes

* fix: style images Vignettes

* fix: echo ReadMe

* fix: some variables and typo in ReadMe

* fixing ReadMe and Vignettes, updating website

* adding dependencie map and scale y for plot variable function

* fix> scale y for plot variable function

* improving group functions

* updationg plot map function and dependencies

* updationg plot map function and dependencies

* updationg examples and documentation

* updating examples and documentation

* fix: function examples

* remove files

* fix examples and lintr of modules

* fix message plot

* divide map plot

* adding new functions to municipalities and departments

* adding new functions to municipalities and departments

* adding new functions to municipalities and departments

* adding new functions to municipalities and departments

* modify plot and group municipalities and examples

* modify plot and group municipalities and examples

* modify plot and group municipalities and examples

* export functions to departments and municipalities and examples

* fix general syntax and rename functions of municipalities

* fix called of function geo ocurrence

* update template Reporte Basico

* preview basic report

* add function clean cols by exceptions

* adding diseases like input choice on skeleton

* modify forma exceptios cols disease in config file

* adding analysis of notification department and municipality

* update: functions on ReadMe file

* update: version and README files

* fix: typo, identation of code

* update: functions and documentation of subnational report

* fix: import and plot functions (#38)

* creating the package website

* create initial sections of the basic report, cleaning and util functions, updating dengue example

* creating function documentation on report_sections, clean_data and utils

* fix param functions of get cases distributions by age and gender

* adding plot titles and new gender and epiweek section

* updatind documentation functions

* fix plot function section by gender and epiweek

* adding documentation new function of special population

* adding new function of special population to basic report

* adding spacial distribution section and utils

* update documentation functions of spacial distribution section and utils

* updating spacial distribution function

* updating documentation functions of distribution spatial

* updating spatial distribution function

* standarization variables and creating clean general function

* modify clean sivigila data function and create general functionto clean depto codes

* create documentation of new clean functions

* refactoring functions of onset and notification date sections

* creating documentation function of notification data and onsent symp

* modify general clean data function

* modify clean sivigila data

* creating components of gender and epiweek section

* creating components of age and gender, special population section

* creating components of age and gender, special population section

* creating components of spacial distribution section

* fixing variables components of special population and gender

* fixing caption text sixe and breaks

* removing message plot map

* fixing caption text sixe and breaks

* fixing caption text size

* fixing caption text size and map

* fixing title distribution age and week, and percentage cases by age

* fixing percentage cases by age

* creating skeleton template of basic report

* updating template package

* adding params to report basic skeleton

* updating the documentation functions of the clean data module

* fix: documentation of functions

* clean: data, functions and files

* clean: list disease and ReadMe file

* remve: title map

* remove day of label

* renaming functions and variables

* updating documentation functions

* renaming function names and refactoring the vignettes content

* renaming function names, refactoring the vignettes content and updating documentation

* updating documentation and titles plots

* updating documentation list_available_diseases_years

* fix: documentation functions, vignettes, ReadMe and Dengue Example

* fixing general documentation

* fix images ReadMe file

* fix: ReadMe file and vignettess

* remove some dependencies and functions deprecated

* Adding tips to ReadMe and Vignettes

* updating size images

* updating size images ReadMe

* adding space ReadMe file

* updating align left images

* Adding  style images ReadMe and Vignettes

* Adding  style images ReadMe and Vignettes

* Adding  style images ReadMe and Vignettes

* fix: style images ReadMe and Vignettes

* fix: style images Vignettes

* fix: echo ReadMe

* fix: some variables and typo in ReadMe

* fixing ReadMe and Vignettes, updating website

* adding dependencie map and scale y for plot variable function

* fix> scale y for plot variable function

* improving group functions

* updationg plot map function and dependencies

* updationg plot map function and dependencies

* updationg examples and documentation

* updating examples and documentation

* fix: function examples

* remove files

* fix examples and lintr of modules

* fix message plot

* divide map plot

* adding new functions to municipalities and departments

* adding new functions to municipalities and departments

* adding new functions to municipalities and departments

* adding new functions to municipalities and departments

* modify plot and group municipalities and examples

* modify plot and group municipalities and examples

* modify plot and group municipalities and examples

* export functions to departments and municipalities and examples

* fix general syntax and rename functions of municipalities

* fix called of function geo ocurrence

* update template Reporte Basico

* preview basic report

* add function clean cols by exceptions

* adding diseases like input choice on skeleton

* modify forma exceptios cols disease in config file

* adding analysis of notification department and municipality

* update: functions on ReadMe file

* update: version and README files

* fix: typo, identation of code

* update: functions and documentation of subnational report

* generate NAMESPACE

* fix: documentation and definition of import functions

* fix: documentation and definition of plot functions

* update: clean functions and vignette

* Set up pkgdown website (#37)

* Copy pkgdown workflow from pkgtemplate

* Remove docs/ folder

* Remove Meta/ folder

* translation to Spanish of functions, documentation and vignettes (#39)

* translation and updated functions and documentation of import data module

* translation and updated functions and documentation of cleaning data module

* translation and updated functions and documentation of group data module

* translation and updated functions and documentation of filter data module

* translation and updated functions and documentation of plotting module

* translation and updated functions and documentation of utils module

* translation and updating of filtering and parsing functions and their documentation

* translation and updating of Reporte Basico template

* translation and updating README files

* translation and updating sections of Reporte Basico template

* updating parameters and exceptions of disease

* translation and updating sections of package vignette

* updating README file with all sections and translated functions

* updating of the import module functions documentation in Spanish

* Updating the documentation of the cleaning module functions in Spanish

* Updating the documentation of the checking module functions in Spanish

* Updating the documentation of the plotting module functions in Spanish

* Updating the documentation of the utils module functions in Spanish

* Updating the documentation of the general functions in Spanish

* Updating get started section and user descriptions of the package in README files and vignette

* deleting some extra files of the Reporte Basico template

* updating users definition and import package README file

* change parameters of skeleton template

* updating documentation with the new package logo (#40)

* fix descriptions of report template sections and adding multiple group diseases (#42)

* fix: disease o event title on skeleton Reporte Basico

* fix: description of temporal distribution, sex and conclusion sections

* adding multiple diseases import, plot and group

* adding multiple diseases to agrupar_cols_casos (#43)

* fix: disease o event title on skeleton Reporte Basico

* fix: description of temporal distribution, sex and conclusion sections

* adding multiple diseases import, plot and group

* adding nombre_evento to agrupar_cols_casos

* adding validation to mortalidad event (#45)

* fix: disease o event title on skeleton Reporte Basico

* fix: description of temporal distribution, sex and conclusion sections

* adding multiple diseases import, plot and group

* adding nombre_evento to agrupar_cols_casos

* fix: temporal section month with most cases and validation of malaria import

* adding validation to mortalidad event

* Fix report template (#46)

* fix: disease o event title on skeleton Reporte Basico

* fix: description of temporal distribution, sex and conclusion sections

* adding multiple diseases import, plot and group

* adding nombre_evento to agrupar_cols_casos

* fix: temporal section month with most cases and validation of malaria import

* adding validation to mortalidad event

* adding condition of validation mortality

* updating plotting for multiples diseases (#48)

* fix: disease o event title on skeleton Reporte Basico

* fix: description of temporal distribution, sex and conclusion sections

* adding multiple diseases import, plot and group

* adding nombre_evento to agrupar_cols_casos

* fix: temporal section month with most cases and validation of malaria import

* adding validation to mortalidad event

* adding condition of validation mortality

* updating plot multiple disease and vignettes

* updating visualisation function for multiple diseases (#49)

* fix: disease o event title on skeleton Reporte Basico

* fix: description of temporal distribution, sex and conclusion sections

* adding multiple diseases import, plot and group

* adding nombre_evento to agrupar_cols_casos

* fix: temporal section month with most cases and validation of malaria import

* adding validation to mortalidad event

* adding condition of validation mortality

* updating plot multiple disease and vignettes

* remove whitespace

* updating generic plotting function for multiple disease visualisation

* fix: whitespace on report basic template (#50)

* fix: disease o event title on skeleton Reporte Basico

* fix: description of temporal distribution, sex and conclusion sections

* adding multiple diseases import, plot and group

* adding nombre_evento to agrupar_cols_casos

* fix: temporal section month with most cases and validation of malaria import

* adding validation to mortalidad event

* adding condition of validation mortality

* updating plot multiple disease and vignettes

* remove whitespace

* updating generic plotting function for multiple disease visualisation

* fixing whitespaces

* fix condition of morbility (#51)

* fix: disease o event title on skeleton Reporte Basico

* fix: description of temporal distribution, sex and conclusion sections

* adding multiple diseases import, plot and group

* adding nombre_evento to agrupar_cols_casos

* fix: temporal section month with most cases and validation of malaria import

* adding validation to mortalidad event

* adding condition of validation mortality

* updating plot multiple disease and vignettes

* remove whitespace

* updating generic plotting function for multiple disease visualisation

* fixing whitespaces

* fix conditional of morbility on skeleton

* updating conditional of morbility on skeleton

* fix process and implicated functions to import event data (#56)

* fix (get_path_data_disease): updating response and building of the path ref

* fix (import_data_event): the event name is convert to a title string

* fix (import_sep_data): adding logic for new files of SIVIGILA

---------

Co-authored-by: GeraldineGomez <gs.gomezm1@uniandes.edu.co>

* fix (import_data): updating functions related to import and clean process (#57)

* fix (get_path_data_disease): updating response and building of the path ref

* fix (import_data_event): the event name is convert to a title string

* fix (import_sep_data): adding logic for new files of SIVIGILA

* fix (convert_edad): updating convertion edad and uni_med fields and format dates

* fix (import_data): addinfg microdata request from bin files

* fix (DESCRIPTION): adding readxl dependencie

---------

Co-authored-by: GeraldineGomez <gs.gomezm1@uniandes.edu.co>

* fix (import_data): updating functions related to sex semana epi component (#58)

* fix (get_path_data_disease): updating response and building of the path ref

* fix (import_data_event): the event name is convert to a title string

* fix (import_sep_data): adding logic for new files of SIVIGILA

* fix (convert_edad): updating convertion edad and uni_med fields and format dates

* fix (import_data): addinfg microdata request from bin files

* fix (DESCRIPTION): adding readxl dependencie

* fix (agrupar_sex_semanaepi): remove columns related to geo components

* fix (plot_sex_semanaepi): remove experimental scale

---------

Co-authored-by: GeraldineGomez <gs.gomezm1@uniandes.edu.co>

* fix (import_data): remove sca problems (#59)

* fix (get_path_data_disease): updating response and building of the path ref

* fix (import_data_event): the event name is convert to a title string

* fix (import_sep_data): adding logic for new files of SIVIGILA

* fix (convert_edad): updating convertion edad and uni_med fields and format dates

* fix (import_data): addinfg microdata request from bin files

* fix (DESCRIPTION): adding readxl dependencie

* fix (agrupar_sex_semanaepi): remove columns related to geo components

* fix (plot_sex_semanaepi): remove experimental scale

* fix (import_data): remove whitespace and reduce a line

---------

Co-authored-by: GeraldineGomez <gs.gomezm1@uniandes.edu.co>

* fix (import_data): remove whitespace (#60)

* fix (get_path_data_disease): updating response and building of the path ref

* fix (import_data_event): the event name is convert to a title string

* fix (import_sep_data): adding logic for new files of SIVIGILA

* fix (convert_edad): updating convertion edad and uni_med fields and format dates

* fix (import_data): addinfg microdata request from bin files

* fix (DESCRIPTION): adding readxl dependencie

* fix (agrupar_sex_semanaepi): remove columns related to geo components

* fix (plot_sex_semanaepi): remove experimental scale

* fix (import_data): remove whitespace and reduce a line

* fix (import_data): remove whispace

---------

Co-authored-by: GeraldineGomez <gs.gomezm1@uniandes.edu.co>

* fix and docs: updating, clean and name chunks of vignettes and README, adding contributors to DESCRIPTION file (#61)

* chore (DESCRIPTION): updating package's contributors

* docs (vignette-sivirep): updating, clean and name chunks

* docs (README): updating, clean and name chunks

* fix (DESCRIPTION): add and remove commas

* fix (DESCRIPTION): author and manteiner

* fix (checking_data): updating examples with the full clean function and refactoring access to column

* fix (format_fecha): adding correct date format in example

* fix (import_sep_data): remove URL of the example

* fix (plot_fecha_inisintomas and plot_edad): adding in examples the full clean function

* fix (obtener_meses_mas_casos): adding to examples the full clean function

* chore: updating examples and functions documentation

* remove: old figures of unamed chunks

---------

Co-authored-by: GeraldineGomez <gs.gomezm1@uniandes.edu.co>

* test and chore: adding example test data and updating the documentation of functions (#63)

* feat (data): creating data example

* chore: remove skeleton folder

* chore (examples): updating examples with dengue2020 data and the full clean function

* fix (dengue2020): adding terminal newline

---------

Co-authored-by: GeraldineGomez <gs.gomezm1@uniandes.edu.co>

* fix: data, examples and nombre_evento parameter of report template (#64)

* fix (examples): adding parameter year to full clean function and updating documentation

* fix (examples): adding parameter year to full clean function and updating documentation

* fix (examples): adding parameter year to full clean function and updating documentation

* fix (examples): adding parameter year to full clean function and updating documentation

* fix (dengue2020): compress data

* fix (params): change value of nombre_evento to Dengue

* remove: whitespace in example

---------

Co-authored-by: GeraldineGomez <gs.gomezm1@uniandes.edu.co>

* fix: data example, import data function and documentation (#65)

* fix (examples): adding parameter year to full clean function and updating documentation

* fix (examples): adding parameter year to full clean function and updating documentation

* fix (examples): adding parameter year to full clean function and updating documentation

* fix (examples): adding parameter year to full clean function and updating documentation

* fix (dengue2020): compress data

* fix (params): change value of nombre_evento to Dengue

* remove: whitespace in example

* fix (DESCRIPTION): adding R dependency

* fix (dengue2022): generate the data with version 2

* fix (import_data): adding cache parameter

* fix (plot_map_dpto): remove unused shp files and example

* remove: unused shape files

* chore: updating documentation of functions

---------

Co-authored-by: GeraldineGomez <gs.gomezm1@uniandes.edu.co>

* fix, chore and feat: plot functions, map visualisation, documentation and theme of report template (#68)

* feat: adding package's logo in report template

* chore (DESCRIPTION): remove data.table dependency and replacing httr to httr2

* feat (agrupar_mun): adding geo ocurrency data

* fix (import_data): remove file logic of previous service

* fix (get_path): replace httr implementation to httr2 and optimize the ref file search

* update (obtener_ocurren_geo): adding code_event parameter

* chore (vignette): updating the call of plot functions for ini_sin and fech_not

* chore (README): updating the calling logic of inisintomas and fecha_notifica functions

* chore (obtener_tip_ocurren_geo): adding nombre_event to documentation

* feat: creation of initial package theme for ggplot visualisations

* refactoring: remove plot_variable function, creating separate functions to each variable and adding fuente_data parameter

- remove plot_variable function
- creating separate functions to each variable
- adding fuente_data parameter
- adding index table to map visualisation

* refactor: list_events and adding parameter validations in impor_event

* chore: updating examples documentation

* fix: remove eval parse invocations across cleaning functions

* fix: removing eval parse invocations and references of geo ocurrence

* chore: updating examples and adding new functions documentation

* chore: updating examples with package's data

* chore: updating examples with package's data

* chore: updating examples with package's data

* chore: updating examples documentation

* chore: removing report template files

* chore: adding color title in report template

* chore: removing unnecessary import of report template

* fix (plot_sex_semanaepi): replacing scales free to free_y

* chore (README): updating file with dpto of Chocó and resizing images

* chore (vignette): updating file with dpto of Chocó and resizing images

* fix (report_skeleton): adding components of HTML visualisation

* feat (plot_map): adding title and subtitle with geo ocurrence

* fix (report_template): resizing images and set default dpto value

* fix (report_template): resizing images, set default dpto value and removing unnecessary imports

* chore: added internal keyword to scraping function

* chore: added keyword internal to auxiliar functions, validations of inputs and updating examples and documentation

* chore: added validations of inputs, rename functions and updating examples and documentation

* chore: added validations of inputs and updating examples and documentation

* chore: added validations of inputs, remove functions and updating examples and documentation

* chore: updating examples and documentation with new definition of functions

* chore[README]: updating documentation with new definition of functions and parameters

* chore[vignette]: updating documentation with new definition of functions and parameters

* chore[vignette]: updating documentation with new definition of functions and parameters

* chore[examples]: updating documentation with new definition of functions and parameters

* fix (limpiar_fecha_event): duplicate sentence

* fix (plot_map): removing duplicate parameter

* fix: duplicate values and examples definitions

* fix: spaces of functions

* fix (skeleton): updated parameters of template

* fix(skeleton): updating parameters in import function

* feat, fix and chore: validations, variable names and linted and cleaned up the code (#72)

* fix (skeleton): modified default output and removed lost reference

* chore(plot_fecha_notifica): added input validations and updated documentation

* fix(plot_map): added input validations, updated documentation and redefined map title

* fix(plot_fecha_inisintomas): added input validations, updated documentation and value year to uni_marca

* chore(plot_sex): added input validations, updated documentation

* chore: create lintr config file from PR 67

* chore(.Rbuildignore): added .lintr config file from PR 67

* chore(DESCRIPTION): updated R depends, RoxygenNote and added Andres Moreno as contributor

This changes from PR 66, PR 70 and .lintr check

* chore(config): updated key additional_diseases to letter case of SIVIGILA

* fix(skeleton): removed if complex from PR 67 and lintr check

* fix and feat (cleaning_module): added validationsa and removing code based in lintr check

This changes include:
Added validations in almost all clean functions
Added stringr::fixed where apply it
Removed unnecessary TRUEs
Removed variable initialization with c()

Based PR 67 and lintr check

* fix and feat (utils): Added validations, renamed variables, and removed code based on linting checks

Changes in this commit:

- Added validations to nearly all utility functions.
- Applied stringr::fixed where necessary.
- Removed unnecessary TRUE values.
- Eliminated variable initialization with c().
- Replaced paste function with paste0.

This addresses PR 67 and aligns with linting checks.

* fix and feat (plotting_module): Added validations, renamed variables, functions and removed code based on linting checks

Changes in this commit:

- Added validations to all plotting functions.
- Updated documentation and examples.
- Renamed functions and variables related to municipalities and departments.
- Removed unnecessary TRUE values.
- Eliminated variable initialization with `c()`.
- Replaced `paste` function with `paste0`.

This commit addresses some items from PR 67 and aligns with linting checks.

* fix and refactoring: validations, renamed variables and removed code based on linting checks

Changes in this commit:

- Refactoring validations of all functions.
- Renamed variables related to municipalities and departments.
- Eliminated variable initialization with `c()`.

This commit addresses some items from PR 67 and aligns with linting checks.

* fix and refactoring: validations and removed code based on linting checks

Changes in this commit:

- Refactoring validations of all functions.
- Eliminated variable initialization with `c()`.
- Replaced `paste` function with `paste0`.

This commit addresses some items from PR 67 and aligns with linting checks.

* fix(scraping): modified code base on linting checks

Changes in this commit:

- Eliminated variable initialization with `c()`.
- Replaced `paste` function with `paste0`.
- Applied stringr::fixed where necessary.

This commit addresses items from PR 67 and aligns with linting checks.

* chore(README): updated with linting changes, validations and functions

* chore(vignette): Added 'nolint' comment for pak installation.

This commit addresses items from PR 67 and aligns with linting checks.

* fix(utils): added character validation and updated documentation

* fix(limpiar_fecha_event): added character validation and updated documentation

* fix(plot_map): remove repited departments and municipalities

* chore(skeleton): include all parameters in function calls

* chore(README): update parameters name and library setup

* chore(README): update map visualisation

* Fix map file size (#74)

* Delete inst/extdata/depto_adm_shp directory

fix: deleted old shapefiles

* Create .delete

fix: created new DANE shapes directory

* fix: added new DANE shape files

* fix: Update config.yml

* fix: Update plotting.R to include new DANE shapes

* fix: delete inst/extdata/depto_adm_shp_simp/.delete

* updated plot map function

---------

Co-authored-by: Andrés Moreno <ad.morenob@javeriana.edu.co>
Co-authored-by: Andrés Moreno <andres.moreno.barbosa@gmail.com>

* Feat: removed and logic relate to dpto and mpio params (#75)

* feat (plot_map): added logic when dpto and mpio values are absent

* feat(geo_filtro/agrupar_dpto): added logic when dpto and mpio values are ausent

* feat(utils): added logic when dpto and mpio values are ausent

* fix(config): removed tilde in Cancer de Mama

* chore(plotting): completed documentation of examples

* feat(plot): added tendency option to plot_fecha_inisintomas and plot_fecha_notifica

This commit includes:
- Added tendency option to plot_fecha_inisintomas and plot_fecha_notifica
- Updated documentation and examples with the new parameter "tipo"

* feat(plot_mpios): updated input nomb_col with the return parameters of agrupar_mpio

This commit includes:
-  Updated input nomb_col with the return parameters of agrupar_mpio
-  Updated function's documentation and examples

* chore(plotting_module): updated documentation and examples

* fix(plot_mpio): moved parameter nom_col validation

* feat(divipola_data): created data set with codes and geo info of DIVIPOLA

This commit includes:

- Creation of RData files and xlsx
- Creation of R file description of dataset

* fix(lintr): lenght of example descriptions

* feat(import_geo_cods): added option to load DIVOPOLA data directly from a file

* fix(plot_mpio): reference correct data frame to define the nomb_col

* feat(plot_map): removed message of st_read and fixed name column of polygon

* fix(agrupar_mpio): column name reference to geo ocurrence when dpto is empty or not filter

* check(geo_filter): validated behavior with mpio

* check(modificar_cod_mun): validated composition of code

* check(utils): validated modify cod mpio

* fix(modficar_cod_mun ): cod_dpto variances

* feat(plot_map): added Colombia map option and logic

* chore: updated documentation and skeleton

* feat(estandarizar_geo_cod): added complete DIVIPOLA standart into mpios

* feat(geo_filtro): removed modificar_cod_mun

* feat(plot_map): removed function called of modificar_cod_mun

* chore(plot_map): passed first dpto validation

* feat(plot_map): updating conditional to  polygon_seleccionado$MPIO_CCDGO == data_dept$codigo_municipio

* feat(estandarizar_texto): creating function and adding in obtener_info_depts

* chore(modificar_cod_mun): removed function of documentation

* chore(plot_map): added correct parameter in geo_filtro

* chore(estandarizar_texto): updated input of example

* chore(config): fix feo column names

* chore(config): added key related diseases

* chore(config): removed accent of departments

* chore(skeleton): removed accent of deparments

* feat(standardize_geo_cods): added validation when format is complete for dept or mun

* lintr(plot_map): fixed items of lintr scanner

* chore(README): removed accent of department

* chore(README): removed accent of example department

* removed estandarizar_texto function

* chore(plot_map): defined font family

* feat(list_events): added zika disease

* fix: removed temp validations

* fix: added lenght validation in pos related to dpto and mpio

* fix: position title

* fix: modify legend position of plots

---------

Co-authored-by: zmcucunuba <zulma.cucunuba@javeriana.edu.co>
Co-authored-by: megamezl <megamezl@unal.edu.co>
Co-authored-by: Hugo Gruson <Bisaloo@users.noreply.github.com>
Co-authored-by: GeraldineGomez <gs.gomezm1@uniandes.edu.co>
Co-authored-by: Andrés Moreno <ad.morenob@javeriana.edu.co>
Co-authored-by: Andrés Moreno <andres.moreno.barbosa@gmail.com>
  • Loading branch information
7 people authored Dec 8, 2023
1 parent e0bf598 commit bbd3e24
Show file tree
Hide file tree
Showing 33 changed files with 479 additions and 252 deletions.
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export(limpiar_encabezado)
export(limpiar_fecha_event)
export(limpiar_val_atipic)
export(list_events)
export(modficar_cod_mun)
export(obtener_casos_pob_especial)
export(obtener_cods_dpto)
export(obtener_dptos)
Expand All @@ -37,6 +36,7 @@ export(obtener_meses_mas_casos)
export(obtener_nombres_dptos)
export(obtener_nombres_mpios)
export(obtener_tip_ocurren_geo)
export(plot_dptos)
export(plot_edad)
export(plot_edad_sex)
export(plot_fecha_inisintomas)
Expand Down
46 changes: 24 additions & 22 deletions R/checking_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ geo_filtro <- function(data_event, dpto = NULL, mpio = NULL) {
if (!is.null(mpio)) {
stopifnot("El parametro mpio debe ser una cadena de caracteres"
= is.character(mpio))
code_mun <- modficar_cod_mun(dept_data$codigo_departamento,
dept_data$codigo_municipio)
data_dept_filt[[cols_ocurren[3]]] <-
as.character(data_dept_filt[[cols_ocurren[3]]])
data_dept_filt <-
dplyr::filter(data_dept_filt,
data_dept_filt[[cols_ocurren[2]]] %in%
as.integer(code_mun))
data_dept_filt[[cols_ocurren[3]]] %in%
as.character(dept_data$codigo_municipio))
}
return(data_dept_filt)
}
Expand Down Expand Up @@ -596,10 +596,9 @@ agrupar_dpto <- function(data_event,
data_event_cods_dpto <- data_event
nomb_col <- obtener_tip_ocurren_geo(data_event_cods_dpto$cod_eve[1])
data_event_cods_dpto <- agrupar_cols_casos(data_event_cods_dpto,
nomb_cols = nomb_col[1])
colnames(data_event_cods_dpto)[colnames(data_event_cods_dpto) ==
nomb_col[1]] <- "id"
data_event_cods_dpto$id <- as.character(data_event_cods_dpto$id)
nomb_cols = nomb_col[1:2])
data_event_cods_dpto[[nomb_col[1]]] <-
as.character(data_event_cods_dpto[[nomb_col[1]]])
return(data_event_cods_dpto)
}

Expand Down Expand Up @@ -649,22 +648,25 @@ agrupar_mpio <- function(data_event,
}
nomb_col <- obtener_tip_ocurren_geo(data_event$cod_eve[1])
data_event_muns <- data_event
data_event_muns <- agrupar_cols_casos(data_event_muns,
nomb_cols = nomb_col[2])
colnames(data_event_muns)[colnames(data_event_muns) ==
nomb_col[2]] <- "id"
data_event_muns$id <- as.character(data_event_muns$id)
dept_data <- NULL
if (!is.null(dpto)) {
aux_dpto <- unique(data_event_muns[[nomb_col[2]]])
if (length(aux_dpto) > 1) {
data_event_muns <- geo_filtro(data_event, dpto)
}
} else {
dpto <- unique(data_event_muns[[nomb_col[2]]])
if (length(dpto) != 1) {
stopifnot("Debe ingresar el nombre o codigo del departamento" =
length(dpto) == 1)
}
}
dept_data <- obtener_info_depts(dpto)
data_event_muns <- agrupar_cols_casos(data_event_muns,
nomb_cols = nomb_col[1:4])
data_event_muns[[nomb_col[1]]] <- as.character(data_event_muns[[nomb_col[1]]])
data_event_muns[[nomb_col[3]]] <- as.character(data_event_muns[[nomb_col[3]]])
dept_data <- dept_data[1, ]
nombres_muns <- NULL
geo_data <- import_geo_cods()
for (id in data_event_muns$id) {
nombres_muns <- append(nombres_muns,
obtener_nombres_mpios(geo_data,
dept_data$codigo_departamento,
id))
}
data_event_muns$nombre <- nombres_muns
data_event_muns <- dplyr::arrange(data_event_muns,
dplyr::desc(.data$casos))
return(data_event_muns)
Expand Down
6 changes: 6 additions & 0 deletions R/cleaning_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ estandarizar_geo_cods <- function(data_event) {
width = 3,
format = "d",
flag = "0")
col_dpto <- stringr::str_replace(column, stringr::fixed("_mun_"),
"_dpto_")
if (max(nchar(data_event[[column]])) == 3) {
data_event[[column]] <- paste0(data_event[[col_dpto]],
data_event[[column]])
}
}
}
return(data_event)
Expand Down
15 changes: 15 additions & 0 deletions R/divipoladata.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#' Códigos e información geografica del DIVIPOLA en sivirep
#'
#' Data from API de Datos Abiertos de Colombia
#'
#' @docType data
#'
#' @usage divipoladata
#'
#' @format An object of class \code{"cross"}; see \code{\link[qtl]{read.cross}}.
#'
#' @keywords datasets
#'
#' @examples
#' divipoladata
"divipoladata"
42 changes: 24 additions & 18 deletions R/import_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,37 @@
#'
#' Función que importa los nombres y códigos de los departamentos
#' y municipios de Colombia a través de una URL
#' @param url_data Un `character` (cadena de caracteres) que contiene
#' la URL de los datos geográficos; su valor por defecto es NULL
#' @param descargar Un `boolean` (TRUE o FALSE) que indica si los datos
#' se deben descargar desde la API de datos abiertos; su valor por
#' defecto es `FALSE`
#' @return Un `data.frame` con los nombres y códigos de los departamentos
#' y municipios de Colombia
#' @examples
#' import_geo_cods(url_data =
#' "https://www.datos.gov.co/api/views/gdxc-w37w/rows.csv?accessType=DOWNLOAD")
#' import_geo_cods(descargar = FALSE)
#' @export
import_geo_cods <- function(url_data = NULL) {
if (is.null(url_data)) {
url_data <- config::get(file =
import_geo_cods <- function(descargar = FALSE) {
data_geo <- NULL
if (descargar) {
path_data <- config::get(file =
system.file("extdata",
"config.yml",
package = "sivirep"),
"geo_data_path")
data_geo <- utils::read.csv(path_data)
names(data_geo) <- epitrix::clean_labels(names(data_geo))
} else {
stopifnot("El parametro url_data debe ser una cadena de caracteres"
= is.character(url_data))
stopifnot("El parametro descargar debe ser un booleano"
= is.logical(descargar))
path_data <- config::get(file =
system.file("extdata",
"config.yml",
package = "sivirep"),
"divipola_data_path")
archivo_geo <- system.file(path_data,
package = "sivirep")
data_geo <- readxl::read_excel(archivo_geo)
}
data <- utils::read.csv(url_data)
names(data) <- epitrix::clean_labels(names(data))
return(data)
return(data_geo)
}

#' Importar las enfermedades y años disponibles disposibles
Expand Down Expand Up @@ -77,7 +86,7 @@ list_events <- function() {
"additional_diseases")
name_diseases <- base::append(stringr::str_to_title(name_diseases),
additional_diseases)
years_diseases <- base::append(years_diseases, c("", ""))
years_diseases <- base::append(years_diseases, c("", "", ""))
list_events <- data.frame(enfermedad = name_diseases,
aa = years_diseases)
list_events <- list_events[order(list_events$enfermedad,
Expand Down Expand Up @@ -122,6 +131,8 @@ import_data_event <- function(nombre_event,
"config.yml",
package = "sivirep"),
"related_diseases")
list_events_relacionados <- lapply(list_events_relacionados,
stringr::str_to_title)
cols_remover <- config::get(file =
system.file("extdata",
"config.yml",
Expand All @@ -132,11 +143,6 @@ import_data_event <- function(nombre_event,
substr(nombre_event,
1,
nchar(nombre_event) - 1))), ]
stopifnot("La enfermedad o evento no esta disponible para su descarga"
= !(is.null(grupo_events) || nrow(grupo_events) == 0),
"El year no esta disponible para su descarga"
= stringr::str_detect(grupo_events$aa,
as.character(year)))
if (length(list_events_relacionados) > 0) {
events_relacionados <- list_events_relacionados[[nombre_event]]
for (event in events_relacionados) {
Expand Down
Loading

0 comments on commit bbd3e24

Please sign in to comment.