if (FALSE) { # identical(tolower(Sys.getenv("NOT_CRAN")), "true")
data_dir <- system.file("extdata", package = "accessibility")
travel_matrix <- readRDS(file.path(data_dir, "travel_matrix.rds"))
land_use_data <- readRDS(file.path(data_dir, "land_use_data.rds"))
access <- cumulative_cutoff(
travel_matrix,
land_use_data,
cutoff = 30,
opportunity = "jobs",
travel_cost = "travel_time"
)
palma <- palma_ratio(
access,
sociodemographic_data = land_use_data,
opportunity = "jobs",
population = "population",
income = "income_per_capita"
)
palma
}
Run the code above in your browser using DataLab