accessibility offers a set of fast and convenient functions to calculate multiple transport accessibility measures. Given a pre-computed travel cost matrix and a land use dataset (containing the location of jobs, healthcare and population, for example), the package allows one to calculate active and passive accessibility levels using multiple accessibility measures, such as: cumulative opportunities (using either travel cost cutoffs or intervals), minimum travel cost to closest N number of activities, gravity-based (with different decay functions) and different floating catchment area methods.
Stable version:
install.packages("accessibility")
Development version:
# install.packages("remotes")
::install_github("ipeaGIT/accessibility") remotes
library(accessibility)
# required data: a travel matrix and some land use data
<- system.file("extdata", package = "accessibility")
data_dir <- readRDS(file.path(data_dir, "travel_matrix.rds"))
travel_matrix <- readRDS(file.path(data_dir, "land_use_data.rds"))
land_use_data
<- cost_to_closest(
cost_closest
travel_matrix,
land_use_data,opportunity = "schools",
travel_cost = "travel_time",
n = 1
)head(cost_closest)
#> id travel_time
#> 1: 89a881a5a2bffff 29
#> 2: 89a881a5a2fffff 24
#> 3: 89a881a5a67ffff 28
#> 4: 89a881a5a6bffff 33
#> 5: 89a881a5a6fffff 32
#> 6: 89a881a5b03ffff 17
<- cumulative_cutoff(
cum_cutoff
travel_matrix,
land_use_data,opportunity = "jobs",
travel_cost = "travel_time",
cutoff = 30
)head(cum_cutoff)
#> id jobs
#> 1: 89a881a5a2bffff 14561
#> 2: 89a881a5a2fffff 29452
#> 3: 89a881a5a67ffff 16647
#> 4: 89a881a5a6bffff 10700
#> 5: 89a881a5a6fffff 6669
#> 6: 89a881a5b03ffff 37029
<- cumulative_interval(
cum_interval
travel_matrix,
land_use_data,opportunity = "jobs",
travel_cost = "travel_time",
interval = c(20, 30)
)head(cum_interval)
#> id jobs
#> 1: 89a88cdb57bffff 7649
#> 2: 89a88cdb597ffff 21990
#> 3: 89a88cdb5b3ffff 22282
#> 4: 89a88cdb5cfffff 26841
#> 5: 89a88cd909bffff 14421
#> 6: 89a88cd90b7ffff 25699
<- gravity(
grav
travel_matrix,
land_use_data,opportunity = "schools",
travel_cost = "travel_time",
decay_function = decay_exponential(decay_value = 0.2)
)head(grav)
#> id schools
#> 1: 89a88cdb57bffff 0.03041853
#> 2: 89a88cdb597ffff 1.15549493
#> 3: 89a88cdb5b3ffff 0.56519126
#> 4: 89a88cdb5cfffff 0.19852152
#> 5: 89a88cd909bffff 0.41378042
#> 6: 89a88cd90b7ffff 0.95737555
<- floating_catchment_area(
fca
travel_matrix,
land_use_data,opportunity = "jobs",
travel_cost = "travel_time",
demand = "population",
method = "2sfca",
decay_function = decay_binary(cutoff = 50)
)head(fca)
#> id jobs
#> 1: 89a88cdb57bffff 0.4278111
#> 2: 89a88cdb597ffff 0.3863614
#> 3: 89a88cdb5b3ffff 0.4501725
#> 4: 89a88cdb5cfffff 0.5366707
#> 5: 89a88cd909bffff 0.4280401
#> 6: 89a88cd90b7ffff 0.5176583
<- spatial_availability(
sptl_avlblt
travel_matrix,
land_use_data,opportunity = "jobs",
travel_cost = "travel_time",
demand = "population",
decay_function = decay_exponential(decay_value = 0.1)
)head(sptl_avlblt)
#> id jobs
#> 1: 89a88cdb57bffff 186.0876
#> 2: 89a88cdb597ffff 140.0738
#> 3: 89a88cdb5b3ffff 736.5830
#> 4: 89a88cdb5cfffff 900.9284
#> 5: 89a88cd909bffff 0.0000
#> 6: 89a88cd90b7ffff 204.7962
<- balancing_cost(
bc
travel_matrix,
land_use_data,opportunity = "jobs",
travel_cost = "travel_time",
demand = "population"
)head(bc)
#> id travel_time
#> 1: 89a881a5a2bffff 15
#> 2: 89a881a5a2fffff 13
#> 3: 89a881a5a67ffff 23
#> 4: 89a881a5a6bffff 7
#> 5: 89a881a5a6fffff 10
#> 6: 89a881a5b03ffff 6
Please read the vignettes for more details on the usage:
vignette("accessibility")
.vignette("decay_functions", package = "accessibility")
.vignette("inequality_and_poverty", package = "accessibility")
.accessibility is developed by a team at the Institute for Applied Economic Research (Ipea), Brazil.