An open API service indexing awesome lists of open source software.

https://github.com/mpadge/streetdists

Pairwise distances routed through street networks
https://github.com/mpadge/streetdists

Last synced: about 2 months ago
JSON representation

Pairwise distances routed through street networks

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```

[![Build Status](https://travis-ci.org/mpadge/streetdists.svg)](https://travis-ci.org/mpadge/streetdists)
[![Project Status: Active](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)

# streetdists

Calculate pair-wise distances between all pairs of bicycle hire docking stations
represented in the [`bikedata` package](https://github.com/ropensci/bikedata),
by routing using the [`dodgr` package](https://github.com/gmost/dodgr) through
the corresponding OpenStreetMap street networks extracted using the
[`osmdata` package](https://github.com/ropensci/osmdata).

## Installation

You can install streetdists from github with:

```{r gh-installation, eval = FALSE}
# install.packages("devtools")
devtools::install_github("mpadge/streetdists")
```

## Usage

Extract a single street network for London, New York, Chicago, Philadelphia,
Washington DC, Boston, or Los Angeles (respectively "ny", "ch", "ph", "dc",
"bo", and "la") like this:
```{r, eval = FALSE}
net <- get_streetnet ("ny")
```
Or save all to disk with
```{r, eval = FALSE}
get_all_networks ()
```
Street networks are returned as simple `data.frame` objects of a form ready to
submit to [`dodgr`](https://github.com/gmost/dodgr) routines for calculating
distances. See the [`dodgr`
vignette](https://gmost.github.io/dodgr/articles/dodgr.html) for more
information.

```{r echo=FALSE, message=FALSE, warning=FALSE, error=FALSE}
options(width=120)
```