Get NCoV data

get_ncov(
  method = c("ncovr", "tidy", "api", "china", "csv", "json"),
  port = c("area", "overall", "news", "rumors"),
  base = "https://lab.isaaclin.cn/nCoV/api/",
  if_en = FALSE
)

Arguments

method

character.

port

character. The port(s). Valid only for the 'api' method

base

character. The link of the database api.

Value

a list

Examples

get_ncov("overall")
#> Error in match.arg(method): 'arg' should be one of "ncovr", "tidy", "api", "china", "csv", "json"
us_current <- ncovr::get_ncov(method = "api", port = "v1/states/current.json", base = "https://covidtracking.com/api/")
#> No encoding supplied: defaulting to UTF-8.
ports <- c("v1/states/current.json", "v1/states/daily.json", "v1/states/info.json", "v1/us/current.json", "v1/us/daily.json", "v1/urls.json", "v1/states/screenshots.json") us <- ncovr::get_ncov(method = "api", port = ports, base = "https://covidtracking.com/api/")
#> No encoding supplied: defaulting to UTF-8.
#> No encoding supplied: defaulting to UTF-8.
#> No encoding supplied: defaulting to UTF-8.
#> No encoding supplied: defaulting to UTF-8.
#> No encoding supplied: defaulting to UTF-8.
#> No encoding supplied: defaulting to UTF-8.
#> No encoding supplied: defaulting to UTF-8.