{"id":20131643,"url":"https://github.com/avallecam/cdcper","last_synced_at":"2025-11-29T05:07:52.606Z","repository":{"id":138785862,"uuid":"289364010","full_name":"avallecam/cdcper","owner":"avallecam","description":"Miscelanea de funciones customizadas a tareas de análisis en CDC Perú","archived":false,"fork":false,"pushed_at":"2021-10-11T17:11:07.000Z","size":343,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-13T08:47:05.662Z","etag":null,"topics":["data-manipulation","data-mining","data-visualization","data-wrangling","r","tidyverse"],"latest_commit_sha":null,"homepage":"https://github.com/avallecam/cdcper","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/avallecam.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-21T21:01:19.000Z","updated_at":"2022-07-27T13:18:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"53039773-72e0-4dd4-a7ec-0be93fa08777","html_url":"https://github.com/avallecam/cdcper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avallecam%2Fcdcper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avallecam%2Fcdcper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avallecam%2Fcdcper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avallecam%2Fcdcper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avallecam","download_url":"https://codeload.github.com/avallecam/cdcper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241577072,"owners_count":19984940,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-manipulation","data-mining","data-visualization","data-wrangling","r","tidyverse"],"created_at":"2024-11-13T20:49:42.077Z","updated_at":"2025-11-29T05:07:47.576Z","avatar_url":"https://github.com/avallecam.png","language":"R","readme":"---\noutput: github_document\neditor_options: \n  chunk_output_type: console\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\noptions(tidyverse.quiet = TRUE,warn = -1)\n```\n# cdcper\n\n\u003c!-- badges: start --\u003e\n\u003c!-- badges: end --\u003e\n\nEl objetivo de `cdcper` es agilizar la creación de variables, gráficos \ne importación bases de datos de relevancia para el Centro Nacional de Epidemiología, \nPrevención y Control \nde Enfermedades [(CDC Perú)](https://www.dge.gob.pe/portalnuevo/).\n\n## Installation\n\n\u003c!-- You can install the released version of cdcper from [CRAN](https://CRAN.R-project.org) with: install.packages(\"cdcper\") --\u003e\n\n``` r\nif(!require(\"remotes\")) install.packages(\"remotes\")\nremotes::install_github(\"avallecam/cdcper\")\n```\n\n## Main functionalities\n\n### General usefull functions\n\n- `cdc_edades_peru`: crea categorias de edades comunmente usadas.\n- `read_reunis_total`: brinda la poblacion del año en curso \ncon la base de datos de REUNIS.\n- `read_reunis_edad`: brinda la población estratificada por sexo y etapas de vida \ncon la base de datos de REUNIS.\n- `read_inei_poblacion`: lee archivos de población del INEI.\n\n### Prioritization functions for Data Mining\n\n- `cdc_pareto_lista`: calcula porcentaje de aporte individual y aporte acumulado de elementos en una lista a priorizar.\n- `cdc_carga_coalesce`: permite unir (logical connector OR) los listas priorizadas y generar una lista concenso.\n\n\n### Visualization functions\n\n- `cdc_dotwhiskers_plot`: genera un grafico punto-bigotes con la estimación puntual del promedio e intervalo de confianza de una variable continua por niveles de una variable categórica.\n\n### Data sets availability\n\n- `denominadores_departamento_2000_2020_peru` department level population estimates 2000-2020\n- `edad_estandarizada_who` estandardize factors to estandardize raw rates by age\n\n\n## Example\n\nThis is a basic example which shows you how to solve a common problem:\n\n```{r example}\nlibrary(cdcper)\n## basic example code\n```\n\n```{r}\nexample(cdc_dotwhiskers_plot)\n```\n\n```{r,eval=FALSE}\nexample(cdc_pareto_lista)\n```\n\n```{r}\nlibrary(tidyverse)\nlibrary(charlatan)\n\nn_obs \u003c- 11\nset.seed(n_obs)\n\nch_data_wide \u003c- tibble(\n  #names\n  name = ch_currency(n = n_obs),\n  #values\n  category = ch_integer(n = n_obs,min = 0,max = 1) %\u003e% as.logical(),\n  # category_02 = ch_integer(n = n_obs,min = 0,max = 1) %\u003e% as.logical(),\n  value_01 = ch_beta(n = n_obs,shape1 = 2,shape2 = 8),\n  value_02 = ch_integer(n = n_obs,min = 0.7,max = 10)) %\u003e%\n  pivot_longer(cols = value_01:value_02,\n               names_to = \"variable\",\n               values_to = \"numeric\") %\u003e%\n  mutate(beta = ch_beta(n = n_obs*2,shape1 = 1,shape2 = 8))\n\ncdcper::cdc_pareto_lista(data = ch_data_wide,\n                         variable = numeric,\n                         pareto_cut = 80) %\u003e%\n  avallecam::print_inf()\n\ncdcper::cdc_pareto_lista(data = ch_data_wide,\n                         variable = numeric,\n                         pareto_cut = 80) %\u003e%\n  cdcper::cdc_pareto_plot(pct_ = pct_numeric,\n                          cum_ = cum_numeric,\n                          variable_value = numeric,\n                          variable_label = name) #%\u003e%\n  # plotly::ggplotly()\n```\n\n```{r}\nexample(cdc_yearweek_to_date)\n```\n\n```{r}\nexample(cdc_edades_peru)\n```\n\n```{r}\nexample(mutate_ewcdf)\n```\n\n```{r}\nexample(gg_forecast)\n```\n\n```{r}\nexample(cdc_datatable_html)\n```\n\n\n## To-Do\n\n( ) issue: _no visible global function definition_ estas usando muchas nombres de columna no declarados\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favallecam%2Fcdcper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favallecam%2Fcdcper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favallecam%2Fcdcper/lists"}