Load raw data of entomology study
load_raw_data.Rd
Load_raw_data from a .txt file of the entomology study conducted on the platform "Vigilancia Entomológica y Control Integral del Vector." Choose the variables that will be used to calculate entomological risk indices. Fix variable labels and eliminate spaces in the column names, replacing them with underscores (_).If one of the columns labeled as Locality, Municipality, or Jurisdiction is selected, two columns will be created from the original one. the names of the new columns will be the key number of the variable and the other with the name of the variable.
Usage
load_raw_data(
path,
col_name = c("Tipo de Estudio", "Jurisdiccion", "Localidad", "Sector",
"Fecha de Inicio", "Semana Epidemiologica", "Casas Revisadas", "Casas Positivas",
"Total de Recipientes con Agua", "Total de Recipientes Positivos")
)
Arguments
- path
A string with raw data path of .txt file, of activity "Estudios entomológicos en fase larval y pupal " of platform "Vigilancia Entomológica y Control Integral del Vector".
- col_name
Select variable names, as deemed necessary to analyze. If the variable names are not specified, the variable names that are going to be select by default: "Tipo de Estudio", "Jurisdiccion", "Localidad", "Sector", "Fecha de Inicio", "Semana Epidemiologica", "Casas Revisadas", "Casas Positivas", "Total de Recipientes con Agua", "Total de Recipientes Positivos"
Value
A dataframe with selected variable of .txt file from platform "Vigilancia Entomológica y Control Integral del Vector" of activity "Estudio Entomologico de fase larval y pupal".
Examples
path_raw_data <- system.file("extdata",
"estudio_entomologico1.txt",
package = "rStegomyia"
)
df_load_raw <- load_raw_data(path_raw_data)
#> Rows: 42 Columns: 121
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: "\t"
#> chr (12): Tipo de Estudio, Entidad, Jurisdiccion, Municipio, Localidad, Man...
#> dbl (109): clave, Sector, Altitud (msnm), No. de Habitantes, Semana Epidemio...
#>
#> ℹ 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.
#> Rows: 42 Columns: 10
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: "\t"
#> chr (4): Tipo de Estudio, Jurisdiccion, Localidad, Fecha de Inicio
#> dbl (6): Sector, Semana Epidemiologica, Casas Revisadas, Casas Positivas, To...
#>
#> ℹ 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.
head(df_load_raw)
#> Tipo_de_Estudio Clave_Jurisdiccion Jurisdiccion Clave_Localidad Localidad
#> 1 Verificacion 2601 Hermosillo 0001 HERMOSILLO
#> 2 Encuesta 2601 Hermosillo 0001 HERMOSILLO
#> 3 Encuesta 2601 Hermosillo 0001 HERMOSILLO
#> 4 Verificacion 2601 Hermosillo 0001 HERMOSILLO
#> 5 Encuesta 2601 Hermosillo 0001 HERMOSILLO
#> 6 Encuesta 2601 Hermosillo 0001 HERMOSILLO
#> Sector Fecha_de_Inicio Semana_Epidemiologica Casas_Revisadas Casas_Positivas
#> 1 569 07/01/2021 1 123 0
#> 2 569 04/01/2021 1 123 24
#> 3 401 07/01/2021 1 69 6
#> 4 401 07/01/2021 1 66 3
#> 5 400 07/01/2021 1 126 9
#> 6 403 07/01/2021 1 153 9
#> Total_de_Recipientes_con_Agua Total_de_Recipientes_Positivos
#> 1 375 0
#> 2 1176 45
#> 3 141 6
#> 4 156 3
#> 5 399 9
#> 6 414 9