Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bisaloo/semaforos
Get Semáforo Epidemiológico Data from 🇲🇽 Mexico COVID-19 Response
https://github.com/bisaloo/semaforos
covid-19 datos-abiertos mexico open-data r-package
Last synced: 3 months ago
JSON representation
Get Semáforo Epidemiológico Data from 🇲🇽 Mexico COVID-19 Response
- Host: GitHub
- URL: https://github.com/bisaloo/semaforos
- Owner: Bisaloo
- License: other
- Created: 2021-01-26T15:19:41.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-11-18T12:40:33.000Z (about 1 year ago)
- Last Synced: 2024-10-10T20:33:39.887Z (3 months ago)
- Topics: covid-19, datos-abiertos, mexico, open-data, r-package
- Language: R
- Homepage: https://bisaloo.github.io/semaforos
- Size: 114 MB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```# semaforos
[![Lifecycle:
maturing](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing)
[![Codecov test
coverage](https://codecov.io/gh/Bisaloo/semaforos/branch/main/graph/badge.svg)](https://codecov.io/gh/Bisaloo/semaforos?branch=main)
[![R-CMD-check](https://github.com/Bisaloo/semaforos/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/Bisaloo/semaforos/actions/workflows/R-CMD-check.yaml)![](https://bisaloo.github.io/semaforos/articles/semaforos_files/figure-html/maps-ggplot-1.png)
The semaforos R package provides easy access to historical data of [**Semáforos
Epidemiológicos**, which are part of the COVID-19 response strategy of
Mexico](https://coronavirus.gob.mx/semaforo/). The **Semáforos** define 4
degrees of alert at the State level and are re-evaluated weekly.*El paquete de R semaforos proporciona un facil acceso a los datos historicos de
los [**Semáforos Epidemiológicos**, los cuales forman parte de la estrategia de
respuesta del Gobierno Mexicano contra la pandemia del
COVID-19](https://coronavirus.gob.mx/semaforo/). Los **Semáforos** poseen 4
grados de alerta que se aplican a cada Estado por una semana.*![Explanation of the different levels](man/figures/semaforos_explanation.png)
## Installation
You can install the development version of this package from GitHub:
*Puedes instalar la ultima version de este paquete desde GitHub:*
```{r eval = FALSE}
remotes::install_github("Bisaloo/semaforos")
```**The data can also be directly used by downloading the [csv
file](https://github.com/Bisaloo/semaforos/blob/main/inst/extdata/semaforos.csv)**.*Tambien puedes descargar los datos directamente desde
[aqui](https://github.com/Bisaloo/semaforos/blob/main/inst/extdata/semaforos.csv).*## Usage
```{r}
library(semaforos)
``````{r}
sw <- semaforos_get(format = "wide")
head(sw)
``````{r}
sl <- semaforos_get(format = "long")
head(sl)
```## Data source
The data is
[scraped](https://raw.githubusercontent.com/Bisaloo/semaforos/main/data-raw/semaforos.R)
[weekly](https://raw.githubusercontent.com/Bisaloo/semaforos/main/.github/workflows/cron.yml)
from [the Mexican federal government
website](https://datos.covid-19.conacyt.mx/#SemaFE) using the
[httr](https://httr.r-lib.org/) and the [xml2](https://xml2.r-lib.org/)
packages.*Los datos son
[extraidos](https://raw.githubusercontent.com/Bisaloo/semaforos/main/data-raw/semaforos.R)[semanalmente](https://raw.githubusercontent.com/Bisaloo/semaforos/main/.github/workflows/cron.yml)
desde [el sitio web del gobierno
Mexicano](https://datos.covid-19.conacyt.mx/#SemaFE) con los paquetes
[httr](https://httr.r-lib.org/) y [xml2](https://xml2.r-lib.org/).*