Pregunta 1. Con la siguiente información calcule el porcentaje de mujeres que se han hecho controles prenatales.
Total mujeres (50)
Total embarazadas (20)
Total embarazadas con controles (10)
Total población (100)
muje<-50
mujer_controle <- 10
porcentaje<- 100
por_contro<-(mujer_controle/muje)*100
# Imprimir el resultado
print(por_contro)
## [1] 20
El 20% de las mujeres se realizaron controles prenatales.
Pregunta 2: En base a la base de datos (Anexo B), formulario de encuesta, calcular los siguientes indicadores.
Antes de calcular los indicadores realizar el proceso de validación de la calidad de dato.
library(readxl)
datos <- read_excel("C:/Users/HP/Desktop/trabajo/Indicadores.xlsx")
#View(datos)
#attach(datos)
poblacion<- datos$`Pregunta 2.1`
a <- sum(poblacion == 1)
b <- sum(poblacion == 2)
c <- 96
# Definir el valor y el total
comprenden <- a
no_compre <- b
total <- c
# Calcular el porcentaje
por_compre <- (comprenden * 100) / total
por_no_com <- (no_compre* 100) / total
# Imprimir el resultado
print(por_compre)
## [1] 100
100% de la población participante del proyecto indica que sí comprende el proceso de canje de cupón.
library(readxl)
datos <- read_excel("C:/Users/HP/Desktop/trabajo/Indicadores.xlsx")
## New names:
## • `` -> `...47`
## • `` -> `...48`
#View(datos)
#attach(datos)
poblacion<- datos$`Pregunta 2.2`
a <- sum(poblacion == 1)
b <- sum(poblacion == 2)
c <- 96
# Definir el valor y el total
comprenden <- a
no_compre <- b
total <- c
# Calcular el porcentaje
por_compre <- (comprenden * 100) / total
por_no_com <- (no_compre* 100) / total
# Imprimir el resultado
print(por_compre)
## [1] 100
100% de la población conoce el valor del cupón por entrega.
library(readxl)
datos <- read_excel("C:/Users/HP/Desktop/trabajo/Indicadores.xlsx")
## New names:
## • `` -> `...47`
## • `` -> `...48`
#View(datos)
#attach(datos)
poblacion_4<- datos$`Pregunta 2.4`
f <- sum(poblacion_4 == 1)
g <- sum(poblacion_4 == 2)
c <- 96
# Definir el valor y el total
norte <- f
sur <- g
total <- c
# Calcular el porcentaje
norte <- (norte * 100) / total
sur <- (sur* 100) / total
# Imprimir el resultado
print(norte)
## [1] 54.16667
print(sur)
## [1] 45.83333
54,17% de la población realizó el canje en el norte y el 45,83 % en el Sur.
library(readxl)
datos <- read_excel("C:/Users/HP/Desktop/trabajo/Indicadores.xlsx")
## New names:
## • `` -> `...47`
## • `` -> `...48`
#View(datos)
#attach(datos)
poblacion_6<- datos$`Pregunta 2.6`
q <- sum(poblacion_6 == 1, na.rm = TRUE)
w <- sum(poblacion_6 == 2, na.rm = TRUE)
c <- 96
# Definir el valor y el total
igual <- q
diferente <- w
total <- c
# Calcular el porcentaje
por_igu <- (igual * 100) / total
por_dife <- (diferente* 100) / total
# Imprimir el resultado
print(igual)
## [1] 82
82% de la población indica que, le trataron igual que a los otros clientes.
library(readxl)
datos <- read_excel("C:/Users/HP/Desktop/trabajo/Indicadores.xlsx")
#View(datos)
#attach(datos)
poblacion_10<- datos$`Pregunta 2.10`
o <- sum(poblacion_10 == 1, na.rm = TRUE)
u <- sum(poblacion_10 == 2, na.rm = TRUE)
d <- sum(poblacion_10 == 3, na.rm = TRUE)
j <- sum(poblacion_10 == 4, na.rm = TRUE)
k <- sum(poblacion_10 == 5, na.rm = TRUE)
c <- 96
# Definir el valor y el total
muy_insatis <- o
insatisfecho <- u
ni_insat_ni_satis<-d
satifecho<- j
muy_satisf <- k
total <- c
# Calcular el porcentaje
v <- (muy_insatis * 100) / total
v_1 <- (insatisfecho * 100) / total
v_2 <- (ni_insat_ni_satis * 100) / total
v_3 <- (satifecho * 100) / total
v_4 <- (muy_satisf* 100) / total
# Imprimir el resultado
print(v_1)
## [1] 3.125
print(v_2)
## [1] 9.375
print(sum(v_3,v_4))
## [1] 85.41667
85,41% de la población indica estar satisfecho y muy satisfecho con el servicio que dio los establecimientos, el 9,39 % ni satisfecho ni insatisfecho y el 3,13 % indica que están muy insatisfecho.
library(readxl)
datos <- read_excel("C:/Users/HP/Desktop/trabajo/Indicadores.xlsx")
## New names:
## • `` -> `...47`
## • `` -> `...48`
#View(datos)
#attach(datos)
poblacion_16<- datos$`Pregunta 2.16`
a_1 <- sum(poblacion_16 == 1)
b_2 <- sum(poblacion_16 == 2)
c <- 96
# Definir el valor y el total
satisfecho <- a_1
no_satisfe<- b_2
total <- c
# Calcular el porcentaje
por_compre <- (satisfecho * 100) / total
por_no_com <- (no_satisfe* 100) / total
# Imprimir el resultado
print(por_compre)
## [1] 98.95833
98,96 % de la población indica estar satisfecho con la selección de las familias atendidas.
library(readxl)
datos <- read_excel("C:/Users/HP/Desktop/trabajo/Indicadores.xlsx")
## New names:
## • `` -> `...47`
## • `` -> `...48`
#View(datos)
#attach(datos)
poblacion_10<- datos$`Pregunta 2.41`
o <- sum(poblacion_10 == 1, na.rm = TRUE)
u <- sum(poblacion_10 == 2, na.rm = TRUE)
d <- sum(poblacion_10 == 3, na.rm = TRUE)
j <- sum(poblacion_10 == 4, na.rm = TRUE)
k <- sum(poblacion_10 == 5, na.rm = TRUE)
c <- 96
# Definir el valor y el total
muy_insatis <- o
insatisfecho <- u
ni_insat_ni_satis<-d
satifecho<- j
muy_satisf <- k
total <- c
# Calcular el porcentaje
t <- (muy_insatis * 100) / total
t_1 <- (insatisfecho * 100) / total
t_2 <- (ni_insat_ni_satis * 100) / total
t_3 <- (satifecho * 100) / total
t_4 <- (muy_satisf* 100) / total
# Imprimir el resultado
print(sum(t_3,t_4))
## [1] 87.5
87,50 % está satisfecho y muy satisfecho con la asistencia humanitaria.
Pregunta 5: En el Anexo C se encuentran dos tablas. La primera tabla corresponde al total de líderes comunitarios que asistieron a una serie de capacitaciones de metodologías de WVE.
Escriba un código en R, Python o SQL que genere información (tablas) y permita responder las siguientes preguntas:
library(readxl)
lideres <- read_excel("C:/Users/HP/Desktop/trabajo/2024-04-16 Prueba Técnica PT-ATMEAL-RS-003.doc.xlsx")
# Crear tabla de frecuencia de género
tabla_lideres <- table(lideres$Sexo)
print(tabla_lideres)
##
## F M
## 10 4
Tenemos un total de 4 lideres de género masculino
library(readxl)
datos <- read_excel("C:/Users/HP/Desktop/trabajo/2024-04-16 Prueba Técnica PT-ATMEAL-RS-003.doc.xlsx")
#attach(datos)
lideres_1<- datos$`Edad`
tabla_edad <- table(datos$Edad < 25)
print(tabla_edad)
##
## FALSE TRUE
## 10 4
Tenemos 4 lideres que fueron menores de los 25 años