Retrieves the travel time raster (in minutes) to the nearest healthcare facility or populated city, based on the Oxford Global Map of Accessibility datasets.
Usage
l4h_travel_time(
region,
destination = "cities",
transport_mode = "all",
fun = "mean",
sf = FALSE,
quiet = FALSE,
force = FALSE,
...
)
Arguments
- region
A spatial object defining the region of interest. Can be an
sf
,sfc
object, or aSpatVector
(from the terra package).- destination
Character. Target destination for travel time. Use
"healthcare"
(default) for travel time to the nearest healthcare facility, or"cities"
for travel time to the nearest populated urban center.- transport_mode
Character. Mode of transportation. Use
"all"
(default) for general travel time (mixed modes), or"walking_only"
for walking-only accessibility (only valid whendestination = "healthcare"
).- fun
Character. Summary function to apply. Values include
"mean"
,"sum"
,"median"
, etc. Default is"mean"
.- sf
Logical. If
TRUE
, returns the result as ansf
object. IfFALSE
, returns an Earth Engine object. Default isFALSE
.- quiet
Logical. If TRUE, suppress the progress bar (default FALSE).
- force
Logical. If
TRUE
, skips the internal representativity check of the input region. Defaults toFALSE
.- ...
arguments of
ee_extract
ofrgee
packages.
References
Weiss, D.J. et al. (2018). A global map of travel time to cities to assess inequalities in accessibility in 2015. Nature, 553(7688), 333–336. DOI: 10.1038/nature25181
Weiss, D.J. et al. (2020). Global maps of travel time to healthcare facilities. Nature Medicine, 26, 1835–1838. DOI: 10.1038/s41591-020-1059-1
Examples
if (FALSE) { # \dontrun{
# Travel time to nearest hospital (all transport modes)
l4h_travel_time(my_shape)
# Travel time to hospital (walking only)
l4h_travel_time(my_shape, transport_mode = "walking_only")
# Travel time to cities
l4h_travel_time(my_shape, destination = "cities")
# Mean travel time to cities
l4h_travel_time(my_shape, destination = "cities", reducer = ee$Reducer$mean())
} # }