knitr::opts_chunk$set(echo = TRUE)
La dirección de vida silvestre del MAATE mensualmente procesa información nacional de vigilancia de mortalidad de especies silvestres recopilada a nivel nacional, la siguiente propuesta de reporte emitido mensualmente apoya el análisis de información y seguimiento. Los técnicos nacionales revisan, depuran y crean este reporte utilizando lenguaje R y RStudio con los paquetes indicadas como ‘libraries’, las bases de datos son obtenidas del formulario de vigilancia de mortalidad en especies silvestres registrado en epicollect https://five.epicollect.net/project/form-silvestres-hpai. Este análisis cuenta con información simulada para validación que no refleja la realidad y es elaborado con fines de investigación y desarollo.
Este es un documento R Markdown. Markdown es una sintaxis de formatación simple para HTML, PDF, y MS Word. Para más detalles en el uso de R Markdown visite http://rmarkdown.rstudio.com.
Este reporte es de uso de los técnicos nacionales y provinciales del MAATE. Es también accesible como fuente de consulta para otros actores en la conservación de especies silvestres así como la socidad civil involucrada y etidades oficiales que coordinan el control de la salud animal como Agrocalidad, la salud humana como el MSP, este formulario hace parte de los esfuerzos para abordar las enfermedades como Una sola Salud. One-Health.
library(readr)
## Warning: package 'readr' was built under R version 4.2.3
library(dplyr)
## Warning: package 'dplyr' was built under R version 4.2.3
library(lubridate)
## Warning: package 'lubridate' was built under R version 4.2.3
library(plotly)
## Warning: package 'plotly' was built under R version 4.2.3
## Warning: package 'ggplot2' was built under R version 4.2.3
library(ggplot2)
library(leaflet)
## Warning: package 'leaflet' was built under R version 4.2.3
library(leaflet.extras)
## Warning: package 'leaflet.extras' was built under R version 4.2.3
s <- read_csv("C:/Users/alfredo.acosta/OneDrive - SVA/Papers/Avian Influenza/data/form-1__hpai_old.csv")
## Rows: 24 Columns: 65
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (44): ec5_uuid, title, 1_001_Nombres_y_apel, 2_002_Telfono_por_fa, UTM_...
## dbl (11): 3_003_Cdula, lat_4_004_Ubicacin_latit, long_4_004_Ubicacin_latit,...
## lgl (8): 22_Foto_5, 23_Foto_4, 24_Foto_3, 25_Foto_2, 26_Foto_1, 38_026_Des...
## dttm (2): created_at, uploaded_at
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
# plot(s$long_4_004_Ubicacin_latit, s$lat_4_004_Ubicacin_latit)
# Add an a to the colnames for facilitating scrip writting
col <- colnames(s)
col <- paste("a", col, sep = "")
colnames(s) <- col
colnames(s)
## [1] "aec5_uuid" "acreated_at"
## [3] "auploaded_at" "atitle"
## [5] "a1_001_Nombres_y_apel" "a2_002_Telfono_por_fa"
## [7] "a3_003_Cdula" "alat_4_004_Ubicacin_latit"
## [9] "along_4_004_Ubicacin_latit" "aaccuracy_4_004_Ubicacin_latit"
## [11] "aUTM_Northing_4_004_Ubicacin_latit" "aUTM_Easting_4_004_Ubicacin_latit"
## [13] "aUTM_Zone_4_004_Ubicacin_latit" "a5_005_Provincia"
## [15] "a6_006_Cantn" "a7_007_Institucin"
## [17] "a8_0071_Si_seleccion_" "a10_A11_Nombre_comn_d"
## [19] "a11_A12_En_caso_de_no" "a12_A13_Causa_sospech"
## [21] "a13_A14_Nmero_de_enfe" "a14_A15_Nmero_de_muer"
## [23] "a15_A16_Destino_final" "a16_A17_Si_seleccion_"
## [25] "a17_008_Causa_sospech" "a18_009_Nombre_de_la_"
## [27] "a19_010Nombre_comn_de" "a20_011_Nombre_cientf"
## [29] "a22_Foto_5" "a23_Foto_4"
## [31] "a24_Foto_3" "a25_Foto_2"
## [33] "a26_Foto_1" "a27_014_Grupo_etario"
## [35] "a28_015_Sexo" "a29_016_Nmero_de_anim"
## [37] "a30_017_Signos_clnico" "a31_019_Nmero_de_anim"
## [39] "a32_020_Condicin_del_" "a33_021_Nmero_de_anim"
## [41] "a34_022_Nmero_de_anim" "a35_023_Descripcin_de"
## [43] "a36_024_Medidas_de_co" "a37_025_Tratamiento_d"
## [45] "a38_026_Descripcin_de" "a39_027_Destino_final"
## [47] "a40_0271_Por_favor_es" "a41_028_Tipo_de_diagn"
## [49] "a42_029_Se_obtuvieron" "a44_Nombre_del_labora"
## [51] "a45_Tipo_de_muestras_" "a46_Nombre_del_respon"
## [53] "a47_Fecha_de_obtencin" "a48_Forma_de_conserva"
## [55] "a49_Prueba_diagnstica" "a50_Si_seleccion_otro"
## [57] "a51_Fecha_de_obtencin" "a52_Identificacin_esp"
## [59] "a53_ResultadoInforme_" "a54_030_Otra_entidad_"
## [61] "a55_0301_Por_favor_es" "a56_031_Evento_termin"
## [63] "a57_032_Fecha_de_fin_" "a58_034_Indique_el_no"
## [65] "a59_033_Comentarios_a"
length(unique(s$aec5_uuid))
## [1] 24
table(s$a56_031_Evento_termin)
##
## No Sí
## 8 7
length(s[s$a58_034_Indique_el_no != "SI",])
## [1] 65
s$year <- year(s$acreated_at)
s$month <- month(s$acreated_at)
s %>%
group_by(mes=floor_date(acreated_at, unit = "month")) %>%
summarise(registros = length(aec5_uuid),
animales.sospechosos=sum(a13_A14_Nmero_de_enfe, na.rm=TRUE),
animales.muertos=sum(a14_A15_Nmero_de_muer, na.rm=TRUE))
## # A tibble: 2 × 4
## mes registros animales.sospechosos animales.muertos
## <dttm> <int> <dbl> <dbl>
## 1 2023-09-01 00:00:00 18 15 6
## 2 2023-10-01 00:00:00 6 3 3
g1 <- s %>%
group_by(registro=floor_date(dmy_hms(acreated_at), unit = "week"),
Nombre.comun=a19_010Nombre_comn_de,
a18_009_Nombre_de_la_) %>%
summarise(notificaciones=n()) %>%
ggplot()+
geom_col(aes(Nombre.comun, notificaciones))+
facet_wrap(~ a18_009_Nombre_de_la_)+
theme_light()+
theme(axis.text.x = element_text(angle=90))
## Warning: There was 1 warning in `group_by()`.
## ℹ In argument: `registro = floor_date(dmy_hms(acreated_at), unit = "week")`.
## Caused by warning:
## ! All formats failed to parse. No formats found.
## `summarise()` has grouped output by 'registro', 'Nombre.comun'. You can
## override using the `.groups` argument.
ggplotly(g1)
s %>%
group_by(registro=floor_date(dmy_hms(acreated_at), unit = "week"),
Nombre.comun=a19_010Nombre_comn_de,
a18_009_Nombre_de_la_) %>%
summarise(mortalidad=sum(a14_A15_Nmero_de_muer, na.rm=TRUE)) %>%
ggplot()+
geom_col(aes(Nombre.comun, mortalidad))+
facet_wrap(~ a18_009_Nombre_de_la_)+
theme_light()+
theme(axis.text.x = element_text(angle=90))
## Warning: There was 1 warning in `group_by()`.
## ℹ In argument: `registro = floor_date(dmy_hms(acreated_at), unit = "week")`.
## Caused by warning:
## ! All formats failed to parse. No formats found.
## `summarise()` has grouped output by 'registro', 'Nombre.comun'. You can
## override using the `.groups` argument.
s %>%
group_by(mes=floor_date(acreated_at, unit = "month")) %>%
summarise(animales.enfermos=sum(a29_016_Nmero_de_anim, na.rm=TRUE),
animales.muertos=sum(a31_019_Nmero_de_anim, na.rm=TRUE),
mortalidad=animales.muertos/animales.enfermos)
## # A tibble: 2 × 4
## mes animales.enfermos animales.muertos mortalidad
## <dttm> <dbl> <dbl> <dbl>
## 1 2023-09-01 00:00:00 52 14 0.269
## 2 2023-10-01 00:00:00 11 5 0.455
s %>%
group_by(mes=floor_date(acreated_at, unit = "month")) %>%
summarise(animales.enfermos=sum(a29_016_Nmero_de_anim, na.rm=TRUE),
animales.muertos=sum(a31_019_Nmero_de_anim, na.rm=TRUE),
mortalidad=animales.muertos/animales.enfermos) %>%
ggplot()+
geom_col(aes(mes,animales.enfermos), fill="#377EB8")+
geom_col(aes(mes,animales.muertos), fill="#984EA3")+
geom_text(aes(mes, animales.enfermos, label=(animales.enfermos)), nudge_y = 3)+
geom_text(aes(mes, animales.muertos, label=(animales.muertos)), nudge_y = 2)+
labs(y="Animales muertos (lila) y enfermos (azul)",
x="mes")+
theme_minimal() +
theme(text = element_text(size = 14))
Este es un mapa dinamico, puede hacer zoom y consultar su parroquia de interes.
De un click al mapa y revise la información por parroquia.
Puede cambiar entre los mapas para mejor visualización
```r
icons_list <- icons(iconUrl = "https://raw.githubusercontent.com/R-CoderDotCom/chinchet/main/inst/red.png",
iconWidth = c(30, 60, 40), iconHeight = c(30, 60, 40))
leaflet() %>%
# addTiles() %>%
addProviderTiles(providers$CartoDB.Positron) %>%
setView(lng = -84, lat = 0, zoom = 6) %>%
addMarkers(data = data.frame(lng=s$along_4_004_Ubicacin_latit, lat=s$alat_4_004_Ubicacin_latit),
icon = icons_list,
popup = paste0("Nombre especie","<hr>",
s$a19_010Nombre_comn_de)) %>%
addDrawToolbar() %>%
addLayersControl(baseGroups = c("StreetMap", "CartoDB.Positron"),
position = "topright")
## Warning in validateCoords(lng, lat, funcName): Data contains 1 rows with either
## missing or invalid lat/lon values and will be ignored
Acosta, Alfredo PhD1; Proano, Micaela DVMc3; Luje, Lucia DVM2; Lato, Gabriela DVM MSc2; Vinueza, Lenin PhD3; Goblig, Ana PhD4, Dietze, Klaas PhD4. Universidade de São Paulo1: FMVZ http://portal.fmvz.usp.br/. Ministerio del Agua, Ambiente y transicion ecologica 2. Universidad San Francisco de Quito3: https://www.usfq.edu.ec/. Friedrich Loeffler Institute4: https://www.fli.de/.
Visitas a este site