GetFromSerendipia: Get Covid-19 Data From Serendipia's page

Description Usage Arguments Details Value

View source: R/requests.R

Description

Get Covid-19 Data From Serendipia's page

Usage

1
2
3
  GetFromSerendipia(targetURL = "https://serendipia.digital/2020/03/datos-abiertos-sobre-casos-de-coronavirus-covid-19-en-mexico/",
  targetCSS = "table", type = "confirmed", date = "today",
  neat = TRUE)

Arguments

targetURL

Target URL of the HTTP request. character vector of length 1.

targetCSS

CSS selector of the nodes containing the data files URL. character vector of length 1.

type

Get confirmed (confirmed) or suspect (suspects) cases?. character vector of length 1.

date

Date (version) of the report. character vector of length 1 or Date object. #' If character, date must be in day/month/year format.

neat

Should data be cleaned (dates, state name, column names)? logical vector of length 1.

Details

Mexico's Ministry of Health published a daily report containing data about positive and suspected cases of Covid-19 cases in the country (Comunicado Técnico Diario). However, this report was published as a PDF document, difficulting further analysis. Serendipia, a data based journalism initiative, publishes CSV and XLSX versions of the official reports. This function makes a request to Serendipia's Covid-19 data page and downloads the specified data table.

As of 14/04/2020, Mexico's Ministry of Health started publishing an open format version of the official report on Covid-19 cases. However, Serendipia continues to upload daily CSV files with the same variables as the previous PDF document. This aids in keeping a consistent data logging, and facilitates intertemporal comparisons.

Value

A tibble with 8 columns: Case Number, State, Sex, Age, Symptoms Onset Date, COVID-19 Test Result, Country Visited, Date of Arrival to Mexico.


pablorm296/covidMex documentation built on May 2, 2020, 4:56 p.m.