A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

accessibility

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 accessibility levels and accessibility poverty and inequality.
https://github.com/ipeagit/accessibility

Category: Consumption
Sub Category: Mobility and Transportation

Keywords

accessibility r transport transport-accessibility

Keywords from Contributors

public-transportation r5 routing transport-networks brazil geopackage geopandas sf spatial-data

Last synced: about 13 hours ago
JSON representation

Repository metadata

Calculate accessibility measures in R

README.Rmd

          ---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```

# accessibility logo

[![CRAN
status](https://www.r-pkg.org/badges/version/accessibility)](https://CRAN.R-project.org/package=accessibility)
[![rcmdcheck](https://github.com/ipeaGIT/accessibility/workflows/rcmdcheck/badge.svg)](https://github.com/ipeaGIT/accessibility/actions)
[![CRAN/METACRAN Total
downloads](https://cranlogs.r-pkg.org/badges/grand-total/accessibility?color=yellow)](https://CRAN.R-project.org/package=accessibility)
[![Codecov test
coverage](https://codecov.io/gh/ipeaGIT/accessibility/branch/main/graph/badge.svg)](https://app.codecov.io/gh/ipeaGIT/accessibility?branch=main)
[![Lifecycle:
stable](https://lifecycle.r-lib.org/articles/figures/lifecycle-stable.svg)](https://lifecycle.r-lib.org/articles/stages.html)

**accessibility** offers a set of fast and convenient functions to help
conducting accessibility analyses. 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 accessibility levels and
accessibility poverty and inequality. The package covers the majority of the
most commonly used accessibility measures (such as cumulative opportunities,
gravity-based and floating catchment areas methods), as well as the most
frequently used inequality and poverty metrics (such as the Palma ratio, the
concentration and Theil indices and the FGT family of measures).

## Installation

Stable version:

```{r, eval = FALSE}
install.packages("accessibility")
```

Development version:

```{r, eval = FALSE}
# install.packages("remotes")
remotes::install_github("ipeaGIT/accessibility")
```

## Usage

This section aims to present a very brief overview of some of the packages'
features. Fore more details please read the vignettes:

- [Introduction to **accessibility**: calculating accessibility
  measures](https://ipeagit.github.io/accessibility/articles/accessibility.html)
- [Decay
  functions](https://ipeagit.github.io/accessibility/articles/decay_functions.html)
- [Calculating accessibility inequality and
  poverty](https://ipeagit.github.io/accessibility/articles/inequality_and_poverty.html)

To calculate accessibility levels, one simply needs a pre-calculated travel
matrix and some land use data. Below we showcase some of the available
functions:

```{r}
library(accessibility)

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"))

cum_cutoff <- cumulative_cutoff(
  travel_matrix,
  land_use_data,
  opportunity = "jobs",
  travel_cost = "travel_time",
  cutoff = 30
)
head(cum_cutoff)

grav <- gravity(
  travel_matrix,
  land_use_data,
  opportunity = "schools",
  travel_cost = "travel_time",
  decay_function = decay_exponential(decay_value = 0.2)
)
head(grav)

fca <- floating_catchment_area(
  travel_matrix,
  land_use_data,
  opportunity = "jobs",
  travel_cost = "travel_time",
  demand = "population",
  method = "2sfca",
  decay_function = decay_binary(cutoff = 50)
)
head(fca)
```

Calculating inequality and poverty levels is equally easy. Below we use the
previously calculated cumulative accessibility dataset to show some of the
available inequality and poverty functions:

```{r}
palma <- palma_ratio(
  cum_cutoff,
  sociodemographic_data = land_use_data,
  opportunity = "jobs",
  population = "population",
  income = "income_per_capita"
)
palma

poverty <- fgt_poverty(
  cum_cutoff,
  sociodemographic_data = land_use_data,
  opportunity = "jobs",
  population = "population",
  poverty_line = 95368
)
poverty
```

## Related work:

- [r5r](https://github.com/ipeaGIT/r5r): Rapid Realistic Routing with R5 in R
- [tracc](https://github.com/jamaps/tracc): Transport accessibility measures in
  Python
- [access](https://access.readthedocs.io/en/latest/): Spatial Access for PySAL
- [aceso](https://github.com/tetraptych/aceso): a lightweight Python package for
  measuring spatial accessibility

## Acknowledgement IPEA

**accessibility** is developed by a team at the Institute for Applied Economic Research (Ipea), Brazil.

        

Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 6 days ago

Total Commits: 311
Total Committers: 6
Avg Commits per committer: 51.833
Development Distribution Score (DDS): 0.347

Commits in past year: 5
Committers in past year: 2
Avg Commits per committer in past year: 2.5
Development Distribution Score (DDS) in past year: 0.2

Name Email Commits
Daniel Herszenhut d****z@g****m 203
rafapereirabr r****r@g****m 99
rafapereirabr r****r@g****m 5
Antonio Paez p****a@g****m 2
olivroy 5****y 1
Joey Reid b****e 1

Committer domains:


Issue and Pull Request metadata

Last synced: 1 day ago

Total issues: 51
Total pull requests: 6
Average time to close issues: about 2 months
Average time to close pull requests: 7 days
Total issue authors: 6
Total pull request authors: 5
Average comments per issue: 1.88
Average comments per pull request: 1.33
Merged pull request: 5
Bot issues: 0
Bot pull requests: 0

Past year issues: 3
Past year pull requests: 0
Past year average time to close issues: about 4 hours
Past year average time to close pull requests: N/A
Past year issue authors: 2
Past year pull request authors: 0
Past year average comments per issue: 1.67
Past year average comments per pull request: 0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/ipeagit/accessibility

Top Issue Authors

  • rafapereirabr (37)
  • dhersz (10)
  • botanize (1)
  • Mehrnaz-accessibility (1)
  • luisarmandog (1)
  • baarthur (1)

Top Pull Request Authors

  • paezha (2)
  • soukhova (1)
  • botanize (1)
  • olivroy (1)
  • dhersz (1)

Top Issue Labels

  • v1.4.0 (3)
  • help wanted (1)
  • enhancement (1)

Top Pull Request Labels


Package metadata

cran.r-project.org: accessibility

Transport Accessibility Measures

  • Homepage: https://github.com/ipeaGIT/accessibility
  • Documentation: http://cran.r-project.org/web/packages/accessibility/accessibility.pdf
  • Licenses: MIT + file LICENSE
  • Latest release: 1.4.0 (published about 1 year ago)
  • Last Synced: 2025-01-13T18:29:24.191Z (3 months ago)
  • Versions: 7
  • Dependent Packages: 1
  • Dependent Repositories: 0
  • Downloads: 502 Last month
  • Rankings:
    • Stargazers count: 8.857%
    • Forks count: 12.823%
    • Average: 23.109%
    • Downloads: 28.612%
    • Dependent packages count: 29.797%
    • Dependent repos count: 35.455%
  • Maintainers (1)

Dependencies

.github/workflows/pkgdown.yaml actions
  • actions/checkout v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/rcmdcheck.yaml actions
  • actions/checkout v2 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • r-lib/actions/setup-r v1 composite
DESCRIPTION cran
  • R >= 3.5.0 depends
  • Rdpack >= 0.7 imports
  • checkmate * imports
  • data.table * imports
  • utils * imports
  • covr * suggests
  • ggplot2 * suggests
  • knitr * suggests
  • rmarkdown * suggests
  • sf * suggests
  • stats * suggests
  • testthat * suggests

Score: 12.141470122344515