Este es el informe semanal del evento 813 Tuberculosis para el Valle del Cauca
library(readxl)
tb <- read_excel("G:/2024/depuracion eventos/Semana 21/tb.xlsx")
dim(tb)
## [1] 1177 138
pacman::p_load(rio,dplyr,lubridate,readxl,stringr)
mi_data_frame <- as.data.frame(tb) # debo convertirlo data frame para duplicados
tbvalle <- mi_data_frame %>% filter(ndep_resi=="VALLE" & nmun_resi != "CALI" & nmun_resi != "BUENAVENTURA" & ajuste_ != "D" & ajuste_ != 6 )
mi_data_frame <- mi_data_frame[!duplicated(mi_data_frame$num_ide_,mi_data_frame$nmun_resi),]
tbvalle <- tbvalle %>% filter(semana != 22 )# quito la semana que no corresponde analizar
casos_iguales <- tbvalle %>% filter(duplicated(num_ide_))
require(table1)
## Cargando paquete requerido: table1
##
## Adjuntando el paquete: 'table1'
## The following objects are masked from 'package:base':
##
## units, units<-
tbvalle$cond_tuber=as.factor(tbvalle$cond_tuber)
table1(~cond_tuber,data=tbvalle)
| Overall (N=335) |
|
|---|---|
| cond_tuber | |
| 1 | 323 (96.4%) |
| 2 | 12 (3.6%) |
require(table1)
tb$estrato_=as.factor(tb$estrato_)
tb$sexo_=factor(tb$sexo_,levels = c("F","M"), labels = c("Femenino", "Masculino"))
tb$area_=as.factor(tb$area_)
tb$area_=factor(tb$area_, levels = c(1,2,3), labels = c("Urbana", "Centro poblado", "Rural"))
tb$per_etn_=as.factor(tb$per_etn_)
tb$per_etn_=factor(tb$per_etn_ ,levels=c(1,2,5,6) ,labels = c("Indigena","Rom","AfroColombiano","Otro"))
tb$tip_ss_=factor(tb$tip_ss_,levels = c("C","I","N","P","S"), labels = c("Contributivo","Indeterminado","No asegurado", "Policia", "Subsidiado"))
tb$con_fin_=as.factor(tb$con_fin_)
table1(~sexo_+area_+per_etn_+tip_ss_+estrato_+con_fin_,data=tb)
| Overall (N=1177) |
|
|---|---|
| sexo_ | |
| Femenino | 361 (30.7%) |
| Masculino | 816 (69.3%) |
| area_ | |
| Urbana | 1084 (92.1%) |
| Centro poblado | 44 (3.7%) |
| Rural | 49 (4.2%) |
| per_etn_ | |
| Indigena | 8 (0.7%) |
| Rom | 4 (0.3%) |
| AfroColombiano | 144 (12.2%) |
| Otro | 1018 (86.5%) |
| Missing | 3 (0.3%) |
| tip_ss_ | |
| Contributivo | 388 (33.0%) |
| Indeterminado | 21 (1.8%) |
| No asegurado | 33 (2.8%) |
| Policia | 128 (10.9%) |
| Subsidiado | 607 (51.6%) |
| estrato_ | |
| 1 | 326 (27.7%) |
| 2 | 534 (45.4%) |
| 3 | 213 (18.1%) |
| 4 | 30 (2.5%) |
| 5 | 9 (0.8%) |
| 6 | 6 (0.5%) |
| Missing | 59 (5.0%) |
| con_fin_ | |
| 1 | 1126 (95.7%) |
| 2 | 51 (4.3%) |
require(ggplot2)
## Cargando paquete requerido: ggplot2
tb$fecha=as.Date(tb$fec_con_,format="%d/%m/%y")
fig1=ggplot(tb, aes(x=fecha))+geom_bar(fill="blue")+theme_bw()
require(plotly)
## Cargando paquete requerido: plotly
##
## Adjuntando el paquete: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:rio':
##
## export
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
ggplotly(fig1)