Skip to content

PublicHealthDataGeek/CycleInfraLnd

Repository files navigation

CycleInfraLnd

The goal of this CycleInfraLnd R package is to download data from the Transport for London Cycling Infrastructure Database and import it into R as spatial data (Simple features).

The Cycling Infrastructure Database contains the following assets that are either lines(l) or points(p):

  • Advanced Stop Line (l)

  • Crossing (l)

  • Cycle lane/track (l)

  • Restricted Route (l)

  • Cycle Parking (p)

  • Restricted Point (p)

  • Signage (p)

  • Signal (p)

  • Traffic Calming (p)

More information on the CID can be found here and in this TFL blog.

The Database Schema, Asset Information Guide and README provide important and useful information about the content of the database and how it was collected.

Installation

You can install the developed version of CycleInfraLnd from Github with:

#install.packages("devtools")
devtools::install_github("PublicHealthDataGeek/CycleInfraLnd")

Examples

These examples show the two functions in this package that allow you to obtain either lines or points from the Cycling Infrastructure Database. The example list in the help file contains all variations of this code for each of the different asset types i.e. the different lines and points that are available in the Cycling Infrastructure Database.

library(CycleInfraLnd)
?get_cid_lines
cid_asl = get_cid_lines(type = "advanced_stop_line")
cid_cycle_lanes = get_cid_lines(type = "cycle_lane_track")

cid_signal = get_cid_points(type = "signal")
library(dplyr)
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union
london_boroughs = spData::lnd
waltham = london_boroughs %>% 
  filter(NAME == "Waltham Forest")
cid_cycle_lanes_waltham = cid_cycle_lanes[waltham, , op = sf::st_within]
library(tmap)
tmap_mode("view")
#> tmap mode set to interactive viewing

tm_shape(cid_cycle_lanes_waltham) +
  tm_lines()

Publications

The CycleInfraLnd package has been used in the following academic papers:

About

No description, website, or topics provided.

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages