Title: | boldenr: a package designed to generate of Dengue Bulletin of Veracruz state |
---|---|
Description: | This package contains functions designed specifically to generate graphs, tables, heatmap, maps and hotspots that allow designing the dengue bulletin of the state of Veracruz. |
Authors: | Felipe Antonio Dzul Manzanilla |
Maintainer: | The package maintainer <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0 |
Built: | 2025-02-14 02:44:19 UTC |
Source: | https://github.com/fdzul/boldenr |
This function generate the action map of vector control.
action_map(data, mun, cve_mpo, loc, week, num_loc, blocks)
action_map(data, mun, cve_mpo, loc, week, num_loc, blocks)
data |
it is the database of vector actions. |
mun |
is the name of municipality. |
cve_mpo |
is the id of municipality according the https://www.inegi.org.mx/default.html. |
loc |
is the name of locality. |
week |
is TRUE or FALSE. TRUE indicate the vector control actions in the week, else FALSE indicate the cumulative vector control. |
num_loc |
is the id of locality according the https://www.inegi.org.mx/default.html. |
blocks |
is the sf object of blocks. |
a tmap object.
Felipe Antonio Dzul Manzanilla [email protected]
1+1
1+1
Animated map areal of dengue cases by municipality
animap_areal( data, year, name, dir, country, breaks = NULL, vel, save, cve_edo = NULL, dot = NULL, pal = NULL )
animap_areal( data, year, name, dir, country, breaks = NULL, vel, save, cve_edo = NULL, dot = NULL, pal = NULL )
data |
is dengue dataset. |
name |
is the name of the gif file. |
dir |
is the directory where the animation will be saved. |
country |
is logical value for indicating if the map is for all country o by state. |
breaks |
is the numeric for defining the breaks of legend. |
vel |
vel is the delay time between images. See also tmap_animation. |
save |
is the logical value for indicating if the gif is saved or not. |
cve_edo |
is the id of state according the https://www.inegi.org.mx/default.html. |
dot |
is the logical value, if dot TRUE the tmap is dot, else is areal. |
pal |
is the palette. |
a gif file of animation.
Felipe Antonio Dzul Manzanilla [email protected]
1+1
1+1
this function created the animated map for larvae control.
animap_vector_cl(path, locality, path_loc, vel, dir, name, x_leg, y_leg)
animap_vector_cl(path, locality, path_loc, vel, dir, name, x_leg, y_leg)
path |
is the directory of the larvae control file. |
locality |
is the locality target. |
path_loc |
is the directory of shepefile dataset for limit locality. |
vel |
is the delay time between images. See also tmap_animation. |
dir |
is the directory where the animation will be saved. |
name |
is the name of the gif file. |
x_leg |
is the x position of legend. |
y_leg |
is the y position of legend. |
a gif file of animation.
Felipe Antonio Dzul Manzanilla [email protected]
1+1
1+1
Generate a larval control table
cl_table(x, jur = NULL, mun)
cl_table(x, jur = NULL, mun)
x |
is the dataset of control larvario. |
jur |
is the Jurisdiccion. |
mun |
is the municipio. |
xxx
a table.
Felipe Antonio Dzul Manzanilla [email protected]
xxxxx
1+1
1+1
den_epichannel generate the dengue epidemiological channel at level state, jurisdiction, municipality and locality.
den_epichannel( x, y, edo, jur, mpo, loc, current_year, last_year, x_epi, y_epi, x_alerta, y_alerta, x_seg, y_seg, x_exito, y_exito )
den_epichannel( x, y, edo, jur, mpo, loc, current_year, last_year, x_epi, y_epi, x_alerta, y_alerta, x_seg, y_seg, x_exito, y_exito )
x |
is de dataset with dengue cases percentil. |
y |
is the dengue dataset the current and last year. |
edo |
is string indicating the state name. |
jur |
is string indicating the jurisdiction name. |
mpo |
is string indicating the municipality name. |
loc |
is string indicating the locality name. |
current_year |
is current year dengue dataset. |
last_year |
is current year dengue dataset. |
x_epi |
is the x position of the epidemic text. |
y_epi |
is the y position of the epidemic text. |
x_alerta |
is the x position of the alert text. |
y_alerta |
is the y position of the alert text. |
x_seg |
is the x position of the security text. |
y_seg |
is the x position of the security text. |
x_exito |
is the x position of the success text. |
y_exito |
is the x position of the success text. |
if both jur and loc is NULL the function generate the dengue epidemiological channel of state, else only loc is NULL and jur provide the name of jurisdiction then generate the epidemiological channel at level jurisdiction.
a ggplot object.
Felipe Antonio Dzul Manzanilla [email protected]
heatmap of dengue cases by state.
den_heatmap(x, year, breaks)
den_heatmap(x, year, breaks)
x |
is the dengue dataset. |
year |
is the year dataset. |
breaks |
is the breaks of legend. |
a ggplot object
Felipe Antonio Dzul Manzanilla [email protected]
is the dataset that contains the 25th, 50th and 75th percentiles of dengue cases by state.
dendata_epichannel
dendata_epichannel
A df object with 1545 rows and 5 variables:
is the name of state.
Epidemiological week.
percentil 25.
percentil 50.
percentil 75.
...
This function has been designed to generate the Entomological Channel of Aedes aegypti eggs.
entomological_channel(x, z, y, mun1, nom_loc, x_title, sep_ticks)
entomological_channel(x, z, y, mun1, nom_loc, x_title, sep_ticks)
x |
is the dataset of historic ovitraps. For more information, see http://kin.insp.mx/aplicaciones/SisMV. |
z |
is the dataset of actual year of ovitraps. |
y |
is the catalogue of localities accord the https://www.inegi.org.mx/default.html. |
mun1 |
is the name municipality. |
nom_loc |
is the name of locality. |
x_title |
is the name of tittle of x. |
sep_ticks |
is the break in the x. |
The Entomological Channel is constructed in a similar way to the epidemiological channel, using the quantile function of the package stats. First we obtain the average number of eggs of the vector per year (a minimum time series of three years), week and location, second, the 25th, 50th and 75th percentiles are calculated, and categorized as success, safety, alert, respectively. As a third step, they are displayed with ggplot2 with the geom_area function. The fourth step includes the average number of eggs of the current year vector and is compared with the areas defined by the percentiles. If the temporary behavior of the eggs (average number per week) is below the success values (that is, under the area defined by success), then the control of egg abundance is in an area of success. This explanation is extrapolated to the security and alert areas. If the behavior of the eggs is above the warning zone, then it is in an epidemic zone, that is to say, the behavior of the eggs of the current year is superior to the behavior of the eggs of the time series.
A Entomological Channel.
Felipe Antonio Dzul Manzanilla [email protected].
xxxxx
1+1
1+1
epi_channel
epi_channel( x, y, edo, jur, mpo, loc, year1, year2, x_epi, y_epi, x_alerta, y_alerta, x_seg, y_seg, x_exito, y_exito )
epi_channel( x, y, edo, jur, mpo, loc, year1, year2, x_epi, y_epi, x_alerta, y_alerta, x_seg, y_seg, x_exito, y_exito )
x |
is the database that contains the 25th, 50th and 75th percentiles of dengue cases by state |
y |
is the current dataset. Load with read_dataset_bol function. |
edo |
is the target state. The epidemiological channel is provided by state. |
jur |
is the target furidiction. |
mpo |
is the target municipality. |
loc |
is the locality target. |
year1 |
is the year one. |
year2 |
is the year two. |
x_epi |
is the x position of the epidemic zone legend. |
y_epi |
is the y position of the epidemic zone legend. |
x_alerta |
is the x position of the alert zone legend. |
y_alerta |
is the y position of the alert zone legend. |
x_seg |
is the x position of the security zone legend. |
y_seg |
is the y position of the security zone legend. |
x_exito |
is the x position of the success zone legend. |
y_exito |
is the y position of the success zone legend. |
Felipe Antonio Dzul Manzanilla [email protected]
This function has been designed to generate the epidemiological channel of dengue cases.
epidemiological_channel( x, edo, mun = NULL, state, scale_case, z, juris, jurisdiccion = NULL, year1, year2 )
epidemiological_channel( x, edo, mun = NULL, state, scale_case, z, juris, jurisdiccion = NULL, year1, year2 )
x |
is the historic epidemiological dataset. |
edo |
is the name state. |
mun |
is the name municipality. is NULL for state level. |
state |
is a logical parameter for graph the state or municipality. If the state is TRUE the graph is the state, else the Jurisdiction, municipality |
scale_case |
is a numeric parameter for the breaks. |
z |
is the current epidemiological dataset. |
juris |
is a logical parameter for graph when the state is FALSE. if juris is FALSE the graph is the municipality |
jurisdiccion |
is the name of jurisdiction. is null in the level municipality |
year1 |
is the previous year of the current year. |
year2 |
is the current year |
The Entomological Channel is constructed in a similar way to the epidemiological channel, using the quantile function of the package stats. First we obtain the average number of eggs of the vector per year (a minimum time series of three years), week and location, second, the 25th, 50th and 75th percentiles are calculated, and categorized as success, safety, alert, respectively. As a third step, they are displayed with ggplot2 with the geom_area function. The fourth step includes the average number of eggs of the current year vector and is compared with the areas defined by the percentiles. If the temporary behavior of the eggs (average number per week) is below the success values (that is, under the area defined by success), then the control of egg abundance is in an area of success. This explanation is extrapolated to the security and alert areas. If the behavior of the eggs is above the warning zone, then it is in an epidemic zone, that is to say, the behavior of the eggs of the current year is superior to the behavior of the eggs of the time series.
a graph of class ggplot.
Felipe Antonio Dzul Manzanilla [email protected]
1+1
1+1
Heatmap of dengue cases.
heatmap_confirmados( dataset, year, size_text, state, EDO = NULL, JS = NULL, MPO = NULL )
heatmap_confirmados( dataset, year, size_text, state, EDO = NULL, JS = NULL, MPO = NULL )
dataset |
is the dengue cases dataset. |
year |
is the target year. |
size_text |
is the font size of the text. |
state |
is the target state. |
EDO |
is a logical value, if EDO TRUE the heatmap is by state else by Jurisdiction or Municipality. |
JS |
is a logical value, if JS TRUE the heatmap is by jurisdiction, else by municipality. |
MPO |
is a logical value, if EDO TRUE the heatmap is by municipality, else the heatmap y by state_municipality. |
Felipe Antonio Dzul Manzanilla [email protected]
Generates a Heatmap of hospitalized cases by health jurisdiction.
heatmap_jur_hosp( x, state, year, rtitlesize, mtextsize, rlabelsize, clabelsize, rlabeltextsize, clabeltextsize, heatmap_color )
heatmap_jur_hosp( x, state, year, rtitlesize, mtextsize, rlabelsize, clabelsize, rlabeltextsize, clabeltextsize, heatmap_color )
x |
is the sinave datasets. For more information, see http://vectores.sinave.gob.mx/. |
state |
is the state. |
year |
is the year. |
rtitlesize |
is the row title size. |
mtextsize |
is the matrix text size. |
rlabelsize |
is the row label size. |
clabelsize |
is the column label size. |
rlabeltextsize |
is the row text label size. |
clabeltextsize |
is the column text label size. |
heatmap_color |
is character specifying the heatmap colour scheme. |
xxx
A heatmap of hospitalized cases by health jurisdiction.
Felipe Antonio Dzul Manzanilla [email protected]
xxxxx
1+1
1+1
Generate a heatmap of confirmed and probable cases by health jurisdiction
heatmap_jur_prob_conf( x, state, years, clus, prob, rtitlesize, mtextsize, rlabelsize, clabelsize, rlabeltextsize, clabeltextsize, heatmap_color )
heatmap_jur_prob_conf( x, state, years, clus, prob, rtitlesize, mtextsize, rlabelsize, clabelsize, rlabeltextsize, clabeltextsize, heatmap_color )
x |
is the dataset of sinave. For more information, see http://vectores.sinave.gob.mx/ |
state |
is the state. |
years |
is the current year. |
clus |
is parameter for define the numbers of clusters. |
prob |
is the status, 1 is probable, 2 positive casesa and 3 is negative cases. |
rtitlesize |
is the row title size. |
mtextsize |
is the matrix text size. |
rlabelsize |
is the row label size. |
clabelsize |
is the column label size. |
rlabeltextsize |
is the row text label size. |
clabeltextsize |
is the column text label size. |
heatmap_color |
is character specifying the heatmap colour scheme. |
xxxxx
a heatmap of confirmed and probables cases by health jurisdiction.
Felipe Antonio Dzul Manzanilla [email protected]
xxxxx
1+1
1+1
Generate of heatmap of confirmed or probables cases by localities.
heatmap_loc_prob_conf( x, probable, year, state, rtitlesize, mtextsize, rlabelsize, clabelsize, rlabeltextsize, clabeltextsize, heatmap_color, n_loc )
heatmap_loc_prob_conf( x, probable, year, state, rtitlesize, mtextsize, rlabelsize, clabelsize, rlabeltextsize, clabeltextsize, heatmap_color, n_loc )
x |
is the dataset of sinave. For more information, see http://vectores.sinave.gob.mx/. |
probable |
is the arguments for define the confirmed or probables cases. If probable is true the heatmap is the probables, else the heatmap is the confirmed cases. |
year |
is the current year. Is a numeric. |
state |
is the state. |
rtitlesize |
is the row title size. |
mtextsize |
is the matrix text size. |
rlabelsize |
is the row label size. |
clabelsize |
is the column label size. |
rlabeltextsize |
is the row text label size. |
clabeltextsize |
is the column text label size. |
heatmap_color |
is character specifying the heatmap colour scheme. |
n_loc |
is the number of localities. |
the heatmap is based in the package superheat and the function superheat
a heatmap confirmed or probables cases by localities.
Felipe Antonio Dzul Manzanilla [email protected]
xxxxx
Heatmap of hospitalized dengue cases
hosp_jur(dataset, state, year, size_text)
hosp_jur(dataset, state, year, size_text)
dataset |
is a dengue dataset. |
state |
is the target state. |
year |
is the year target |
size_text |
is the font size of the text. |
Felipe Antonio Dzul Manzanilla [email protected]
Generate a map of hot blocks by city.
hot_blocks(loc, x, blocks, cve_mpo, sem1, risk)
hot_blocks(loc, x, blocks, cve_mpo, sem1, risk)
loc |
is the locality. |
x |
is the ovitraps dataset. |
blocks |
is the the sf object of blocks the state. |
cve_mpo |
is the id of municipality accord of INEGI. |
sem1 |
is the current week. |
risk |
is the argument for map. If the risk is true the map is elaborate with the percentil and risk, else map the eggs by blocks. |
xxx
a map of risk or eggs map based in the percentil.
Felipe Antonio Dzul Manzanilla [email protected]
xxxxx
1+1
1+1
Generates a map of confirmed cases by municipalities
map_conf_state(x, y, cve_state, state, years, risk)
map_conf_state(x, y, cve_state, state, years, risk)
x |
is the dataset of sinave. |
y |
is sf object of all municipalities of Mexico. |
cve_state |
is the id of state, accord of INEGI. |
state |
is the State. |
years |
is the current year. |
risk |
is the type map. If risk is true, the map is the risk, else the map is the cases. |
xxxx
a map of risk or confirmed cases.
Felipe Antonio Dzul Manzanilla [email protected]
xxxxx
1+1
1+1
Generate a graph of ovitraps indicator,
ovitraps_indicator(x, nom_loc = NULL, all)
ovitraps_indicator(x, nom_loc = NULL, all)
x |
is the dataset of ovitraps of the current year. |
nom_loc |
is the name of locality. |
all |
is the argument for define the plot of all localities or one locality. |
xxxx
a plot of ovitraps indicator.
Felipe Antonio Dzul Manzanilla [email protected]
xxxxx
epidemiological_channel and entomological_channel
1+1
1+1
Plot the probables and confirmed cases of arbovirosis of years 2018 and 2019 in Veracruz State
plot_arbovirosis(x, state, year1, year2)
plot_arbovirosis(x, state, year1, year2)
x |
is the dataset of probable and confirmed cases of arbovirosis. |
state |
is the state target. its length is 1 o more. |
year1 |
is the previous year of the current year. |
year2 |
is the current year |
xxx
a plot the probables and confirmed cases of arbovirosis (DENV, CHIKV, ZIKV) of years 2018 and 2019 in Veracruz State. The lines and areas represent the cases of 2019 and 2018, respectively.
Felipe Antonio Dzul Manzanilla [email protected]
xxxxx
1+1
1+1
Plot the dengue cases by state and serotype
plot_state_serotype(dataset, year, scale_serotype, x_serotype, y_serotype)
plot_state_serotype(dataset, year, scale_serotype, x_serotype, y_serotype)
dataset |
is the dataset of http://vectores.sinave.gob.mx/. |
year |
is the year of dataset. |
scale_serotype |
is the scale of the dengue serotype plot. |
x_serotype |
The x location of the dengue serotype plot. Sea also cowplot::draw_plot?. |
y_serotype |
The y location of the dengue serotype plot. Sea also cowplot::draw_plot?. |
a plot of class ggplot.
Felipe Antonio Dzul Manzanilla [email protected]
1+1
1+1
Generate a pyramid plot by health jurisdiction or state.
pyramid_plot(x, by_juris, state, year, pal)
pyramid_plot(x, by_juris, state, year, pal)
x |
is the epidemiological dataset. |
by_juris |
is the parameter for define the pyramid plot. if by_juris is false the plot is the state, else the plot is by jurisdiction. |
state |
is the parameter for select the state. |
year |
is the current year. |
pal |
is the color of palette. |
xxx
a pyramid plot of class ggplot.
Felipe Antonio Dzul Manzanilla [email protected]
xxxxx
1+1
1+1
This function has been designed for read the dataset of sinave or vector
read_dataset_bol(path, dataset, inf = NULL)
read_dataset_bol(path, dataset, inf = NULL)
path |
is the directory where the files are located. |
dataset |
is the parameter for define the type information. |
inf |
is the parameter for define the type vector information. defaul is null for Sinave |
a dataset of sinave or vectors.
Felipe Antonio Dzul Manzanilla [email protected]
1 + 1
1 + 1
This function read the vector-borne diseases txt file of sinave.
read_vbd(x, vbd, arbovirus)
read_vbd(x, vbd, arbovirus)
x |
is the directory where the files are located. |
vbd |
is the parameter for define the vector-borne diseases. |
arbovirus |
is a logical value for define the group of vector-borne diseases, if is TRUE, the define DENV, CHIKV & ZIKV, else for other etvs. |
a dataframe
Felipe Antonio Dzul Manzanilla [email protected]
1+1
1+1
Calculate the risk based in the percentils
risk_percentil(x, var, en)
risk_percentil(x, var, en)
x |
is the dataset of class data.frame, tibble or data.table. |
var |
is tha variable target for calculate the risk. |
en |
is parameter for risk in english if en is true, else en is false the risk is in spanish. |
xxxx
a object of same class of x.
Felipe Antonio Dzul Manzanilla [email protected]
xxxxx
epidemiological_channel, quantile
1+1
1+1
static map of aggregated dengue cases by municipality
static_map_areal( x, breaks, week_start, week_end, country, cve_edo = NULL, year )
static_map_areal( x, breaks, week_start, week_end, country, cve_edo = NULL, year )
x |
is the dengue dataset. |
breaks |
is the breaks of legend. |
week_start |
is the week start for subset data. |
week_end |
is the week end for subset data. |
country |
is a logical parameter (TRUE or FALSE), if TRUE is all municipalities of Mexico else a state specific. |
cve_edo |
is default NULL, but is id numeric for each state if country FALSE. |
year |
is the year dataset. |
a ggplot object
Felipe Antonio Dzul Manzanilla [email protected]
Generates a table of the cases confirmed by institution or age groups
tb_conf(x, inst, year, state)
tb_conf(x, inst, year, state)
x |
is the dataset. |
inst |
is the parameter for define the type of table. If the inst is TRUE the table is by institution, else by age group. |
year |
is the current year. |
state |
is the state. @author Felipe Antonio Dzul Manzanilla [email protected] |
a formattable object.
1+1
1+1
This function generate of thermal o cold ULV table.
tb_ulv(x, jur = NULL, mun, coldfog)
tb_ulv(x, jur = NULL, mun, coldfog)
x |
is the ULV datasets. |
jur |
is the name of jurisdiction. |
mun |
es valor logico TRUE o FALSE para indicar si la tabla es por jurisdiccion y municipia o por por estado y jurisdiccion, respectivamente. |
coldfog |
is logical value TRUE or FALSE to indicate if the table is by jurisdiction and municipality or by state and jurisdiction, respectively |
a table.
Felipe Antonio Dzul Manzanilla [email protected]
1+1
1+1