This covid19
package provides an R API for accessing:
Vignettes demonstrate how to use this API by providing simple visualizations of the data.
Install the development version of covid19
from GitHub with:
remotes::install_github("jimtyhurst/covid19")
There are no plans to created a released version on CRAN or any other repository of published packages.
read_state_cases_nytimes()
:
library(covid19)
df <- covid19::read_state_cases_nytimes()
# Number of rows depends on the day that the data is downloaded,
# because the dataset is updated daily.
dim(df)
# [1] 1437 5
[1] "date" "state" "fips" "cases" "deaths"
read_cases_ecdc()
:
date
column of class Date
, derived from the original dateRep
column, which is a string.library(covid19)
df <- covid19::read_cases_ecdc()
# Number of rows depends on the day that the data is downloaded,
# because the dataset is updated daily.
dim(df)
# [1] 7515 11
colnames(df)
[1] "dateRep" "day" "month"
[4] "year" "cases" "deaths"
[7] "countriesAndTerritories" "geoId" "countryterritoryCode"
[10] "popData2018" "date"
read_confirmed_cases_jhu_csse()
:
library(covid19)
confirmed_cases <- covid19::read_confirmed_cases_jhu_csse()
# Number of rows depends on the day that the data is downloaded,
# because the dataset is updated daily.
dim(confirmed_cases)
# [1] 17204 6
colnames(confirmed_cases)
# [1] "country_region" "province_state" "lat"
# [4] "long" "date" "cumulative_total"
read_deaths_jhu_csse()
:
library(covid19)
deaths <- covid19::read_deaths_jhu_csse()
# Number of rows depends on the day that the data is downloaded,
# because the dataset is updated daily.
dim(deaths)
# [1] 17204 6
colnames(deaths)
# [1] "country_region" "province_state" "lat"
# [4] "long" "date" "cumulative_total"
Copyright © 2020 Jim Tyhurst
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.