# Examples that hit the live NYC Open Data API are wrapped so CRAN checks
# do not fail when the network is unavailable or slow.
# \donttest{
if (curl::has_internet()) {
endpoint <- "https://data.cityofnewyork.us/resource/erm2-nwe9.json"
out <- try(nyc_any_dataset(endpoint, limit = 3), silent = TRUE)
if (!inherits(out, "try-error")) {
head(out)
}
}
# }
Run the code above in your browser using DataLab