Learn R Programming

giscoR (version 0.3.1)

gisco_get_healthcare: Get locations of healthcare services in Europe.

Description

The dataset contains information on main healthcare services considered to be 'hospitals' by Member States.

Usage

gisco_get_healthcare(
  cache = TRUE,
  update_cache = FALSE,
  cache_dir = NULL,
  verbose = FALSE,
  country = NULL
)

Arguments

cache

A logical whether to do caching. Default is TRUE. See About caching.

update_cache

A logical whether to update cache. Default is FALSE. When set to TRUE it would force a fresh download of the source .geojson file.

cache_dir

A path to a cache directory. See About caching.

verbose

Logical, displays information. Useful for debugging, default is FALSE.

country

Optional. A character vector of country codes. It could be either a vector of country names, a vector of ISO3 country codes or a vector of Eurostat country codes. Mixed types (as c("Turkey","US","FRA")) would not work. See also countrycode::countrycode().

Value

A POINT object.

About caching

You can set your cache_dir with gisco_set_cache_dir().

Sometimes cached files may be corrupt. On that case, try re-downloading the data setting update_cache = TRUE.

If you experience any problem on download, try to download the corresponding .geojson file by any other method and save it on your cache_dir. Use the option verbose = TRUE for debugging the API query.

For a complete list of files available check gisco_db.

Details

Files are distributed on EPSG:4326. Metadata available on https://gisco-services.ec.europa.eu/pub/healthcare/metadata.pdf.

See Also

gisco_get_countries()

Other infrastructure: gisco_get_airports()

Examples

Run this code
# NOT RUN {
health_BEL <- gisco_get_healthcare(country = "Belgium")
health_BEL[health_BEL$public_private == "", ]$public_private <- "unknown"
BEL <- gisco_get_nuts(
  country = "Belgium", nuts_level = 2,
  resolution = "01"
)

library(ggplot2)

ggplot(BEL) +
  geom_sf(fill = "white", color = "grey80") +
  geom_sf(
    data = health_BEL, aes(color = public_private),
    alpha = 0.5, size = 3
  ) +
  theme_bw() +
  labs(
    title = "Healthcare in Belgium",
    subtitle = "NUTS 2",
    fill = "type",
    caption = paste0(gisco_attributions())
  ) +
  scale_color_manual(name = "type", values = hcl.colors(3, "Berlin")) +
  theme_minimal()
# }

Run the code above in your browser using DataLab