Package 'boldenr'

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

Help Index


Action Map

Description

This function generate the action map of vector control.

Usage

action_map(data, mun, cve_mpo, loc, week, num_loc, blocks)

Arguments

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.

Value

a tmap object.

Author(s)

Felipe Antonio Dzul Manzanilla [email protected]

Examples

1+1

animap_areal

Description

Animated map areal of dengue cases by municipality

Usage

animap_areal(
  data,
  year,
  name,
  dir,
  country,
  breaks = NULL,
  vel,
  save,
  cve_edo = NULL,
  dot = NULL,
  pal = NULL
)

Arguments

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.

Details

tmap_animation.

Value

a gif file of animation.

Author(s)

Felipe Antonio Dzul Manzanilla [email protected]

See Also

tmap_animation

Examples

1+1

animate maps of larvae control

Description

this function created the animated map for larvae control.

Usage

animap_vector_cl(path, locality, path_loc, vel, dir, name, x_leg, y_leg)

Arguments

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.

Details

tmap_animation.

Value

a gif file of animation.

Author(s)

Felipe Antonio Dzul Manzanilla [email protected]

See Also

tmap_animation

Examples

1+1

Generate a larval control table

Description

Generate a larval control table

Usage

cl_table(x, jur = NULL, mun)

Arguments

x

is the dataset of control larvario.

jur

is the Jurisdiccion.

mun

is the municipio.

Details

xxx

Value

a table.

Author(s)

Felipe Antonio Dzul Manzanilla [email protected]

References

xxxxx

See Also

formattable

Examples

1+1

dengue epidemiological channel

Description

den_epichannel generate the dengue epidemiological channel at level state, jurisdiction, municipality and locality.

Usage

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
)

Arguments

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.

Details

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.

Value

a ggplot object.

Author(s)

Felipe Antonio Dzul Manzanilla [email protected]


den_heatmap

Description

heatmap of dengue cases by state.

Usage

den_heatmap(x, year, breaks)

Arguments

x

is the dengue dataset.

year

is the year dataset.

breaks

is the breaks of legend.

Value

a ggplot object

Author(s)

Felipe Antonio Dzul Manzanilla [email protected]


Dengue cases by states for epidemiological channel.

Description

is the dataset that contains the 25th, 50th and 75th percentiles of dengue cases by state.

Usage

dendata_epichannel

Format

A df object with 1545 rows and 5 variables:

DES_EDO_RES

is the name of state.

SEM

Epidemiological week.

q25

percentil 25.

q50

percentil 50.

q75

percentil 75.

...


Generate a Entomological Channel

Description

This function has been designed to generate the Entomological Channel of Aedes aegypti eggs.

Usage

entomological_channel(x, z, y, mun1, nom_loc, x_title, sep_ticks)

Arguments

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.

Details

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.

Value

A Entomological Channel.

Author(s)

Felipe Antonio Dzul Manzanilla [email protected].

References

xxxxx

See Also

epidemiological_channel

Examples

1+1

epi_channel

Description

epi_channel

Usage

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
)

Arguments

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.

Author(s)

Felipe Antonio Dzul Manzanilla [email protected]


Graph the epidemiological channel

Description

This function has been designed to generate the epidemiological channel of dengue cases.

Usage

epidemiological_channel(
  x,
  edo,
  mun = NULL,
  state,
  scale_case,
  z,
  juris,
  jurisdiccion = NULL,
  year1,
  year2
)

Arguments

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

Details

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.

Value

a graph of class ggplot.

Author(s)

Felipe Antonio Dzul Manzanilla [email protected]

See Also

entomological_channel

Examples

1+1

Heatmap of dengue cases.

Description

Heatmap of dengue cases.

Usage

heatmap_confirmados(
  dataset,
  year,
  size_text,
  state,
  EDO = NULL,
  JS = NULL,
  MPO = NULL
)

Arguments

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.

Author(s)

Felipe Antonio Dzul Manzanilla [email protected]


Heatmap of hospitalized cases

Description

Generates a Heatmap of hospitalized cases by health jurisdiction.

Usage

heatmap_jur_hosp(
  x,
  state,
  year,
  rtitlesize,
  mtextsize,
  rlabelsize,
  clabelsize,
  rlabeltextsize,
  clabeltextsize,
  heatmap_color
)

Arguments

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.

Details

xxx

Value

A heatmap of hospitalized cases by health jurisdiction.

Author(s)

Felipe Antonio Dzul Manzanilla [email protected]

References

xxxxx

See Also

epidemiological_channel

Examples

1+1

Generate a heatmap of confirmed and probable cases by health jurisdiction

Description

Generate a heatmap of confirmed and probable cases by health jurisdiction

Usage

heatmap_jur_prob_conf(
  x,
  state,
  years,
  clus,
  prob,
  rtitlesize,
  mtextsize,
  rlabelsize,
  clabelsize,
  rlabeltextsize,
  clabeltextsize,
  heatmap_color
)

Arguments

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.

Details

xxxxx

Value

a heatmap of confirmed and probables cases by health jurisdiction.

Author(s)

Felipe Antonio Dzul Manzanilla [email protected]

References

xxxxx

See Also

epidemiological_channel

Examples

1+1

Generate of heatmap of confirmed or probables cases by localities.

Description

Generate of heatmap of confirmed or probables cases by localities.

Usage

heatmap_loc_prob_conf(
  x,
  probable,
  year,
  state,
  rtitlesize,
  mtextsize,
  rlabelsize,
  clabelsize,
  rlabeltextsize,
  clabeltextsize,
  heatmap_color,
  n_loc
)

Arguments

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.

Details

the heatmap is based in the package superheat and the function superheat

Value

a heatmap confirmed or probables cases by localities.

Author(s)

Felipe Antonio Dzul Manzanilla [email protected]

References

xxxxx

See Also

epidemiological_channel

superheat


Heatmap of hospitalized dengue cases

Description

Heatmap of hospitalized dengue cases

Usage

hosp_jur(dataset, state, year, size_text)

Arguments

dataset

is a dengue dataset.

state

is the target state.

year

is the year target

size_text

is the font size of the text.

Author(s)

Felipe Antonio Dzul Manzanilla [email protected]


Generate a map of hot blocks by city.

Description

Generate a map of hot blocks by city.

Usage

hot_blocks(loc, x, blocks, cve_mpo, sem1, risk)

Arguments

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.

Details

xxx

Value

a map of risk or eggs map based in the percentil.

Author(s)

Felipe Antonio Dzul Manzanilla [email protected]

References

xxxxx

See Also

epidemiological_channel

Examples

1+1

Generates a map of confirmed cases by municipalities

Description

Generates a map of confirmed cases by municipalities

Usage

map_conf_state(x, y, cve_state, state, years, risk)

Arguments

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.

Details

xxxx

Value

a map of risk or confirmed cases.

Author(s)

Felipe Antonio Dzul Manzanilla [email protected]

References

xxxxx

See Also

epidemiological_channel

Examples

1+1

Generate a graph of ovitraps indicator,

Description

Generate a graph of ovitraps indicator,

Usage

ovitraps_indicator(x, nom_loc = NULL, all)

Arguments

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.

Details

xxxx

Value

a plot of ovitraps indicator.

Author(s)

Felipe Antonio Dzul Manzanilla [email protected]

References

xxxxx

See Also

epidemiological_channel and entomological_channel

Examples

1+1

Plot the probables and confirmed cases of arbovirosis of years 2018 and 2019 in Veracruz State

Description

Plot the probables and confirmed cases of arbovirosis of years 2018 and 2019 in Veracruz State

Usage

plot_arbovirosis(x, state, year1, year2)

Arguments

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

Details

xxx

Value

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.

Author(s)

Felipe Antonio Dzul Manzanilla [email protected]

References

xxxxx

See Also

epidemiological_channel

Examples

1+1

Plot the dengue cases by state and serotype

Description

Plot the dengue cases by state and serotype

Usage

plot_state_serotype(dataset, year, scale_serotype, x_serotype, y_serotype)

Arguments

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?.

Value

a plot of class ggplot.

Author(s)

Felipe Antonio Dzul Manzanilla [email protected]

See Also

draw_plot and ggdraw.

Examples

1+1

Generate a pyramid plot by health jurisdiction or state.

Description

Generate a pyramid plot by health jurisdiction or state.

Usage

pyramid_plot(x, by_juris, state, year, pal)

Arguments

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.

Details

xxx

Value

a pyramid plot of class ggplot.

Author(s)

Felipe Antonio Dzul Manzanilla [email protected]

References

xxxxx

See Also

epidemiological_channel

Examples

1+1

Read the dataset of Sinave o vector

Description

This function has been designed for read the dataset of sinave or vector

Usage

read_dataset_bol(path, dataset, inf = NULL)

Arguments

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

Value

a dataset of sinave or vectors.

Author(s)

Felipe Antonio Dzul Manzanilla [email protected]

Examples

1 + 1

read_vbd

Description

This function read the vector-borne diseases txt file of sinave.

Usage

read_vbd(x, vbd, arbovirus)

Arguments

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.

Value

a dataframe

Author(s)

Felipe Antonio Dzul Manzanilla [email protected]

Examples

1+1

Calculate the risk based in the percentils

Description

Calculate the risk based in the percentils

Usage

risk_percentil(x, var, en)

Arguments

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.

Details

xxxx

Value

a object of same class of x.

Author(s)

Felipe Antonio Dzul Manzanilla [email protected]

References

xxxxx

See Also

epidemiological_channel, quantile

Examples

1+1

static_map_areal

Description

static map of aggregated dengue cases by municipality

Usage

static_map_areal(
  x,
  breaks,
  week_start,
  week_end,
  country,
  cve_edo = NULL,
  year
)

Arguments

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.

Value

a ggplot object

Author(s)

Felipe Antonio Dzul Manzanilla [email protected]


Generates a table of the cases confirmed by institution or age groups

Description

Generates a table of the cases confirmed by institution or age groups

Usage

tb_conf(x, inst, year, state)

Arguments

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]

Value

a formattable object.

Examples

1+1

Ultra Low Volumen (ULV) table.

Description

This function generate of thermal o cold ULV table.

Usage

tb_ulv(x, jur = NULL, mun, coldfog)

Arguments

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

Value

a table.

Author(s)

Felipe Antonio Dzul Manzanilla [email protected]

Examples

1+1