
Identify continuous lines in a network using an approach based on theContinuity in Street Network (COINS) method1.
rcoins is a R (re)implementation of the COINS algorithm,which is also available in Python as a module of themomepylibrary or in its original version:PratyushTripathy/COINS.
You can install the released version of rcoins fromCRAN with:
install.packages("rcoins")You can install the development version of rcoins from the R terminallike so:
# install.packages("devtools")devtools::install_github("CityRiverSpaces/rcoins")condaAn environment including rcoins and all its dependencies can becreated using Conda (or its faster implementation Mamba).
Conda can be installed using the Miniforge scripts providedhere (download one of theMambaforge scripts in order to install Mamba as well).
First clone this repository and access it:
git clone https://github.com/CityRiverSpaces/rcoins.gitcd rcoins/Runconda (ormamba, if using Mambaforge)to create an environment with all the required dependencies:
conda env create -f environment.ymlconda activate rcoinsInstall the development version of rcoins (includedependencies = TRUE to install the example datasets):
Rscript -e 'devtools::install(dependencies = TRUE)'Given the street network of the city of Bucharest (data source:OpenStreetMap)
library(rcoins)bucharest<-get_example_data()streets<- bucharest$streetsPlot streets:

Determine continuous lines in the network as:
continuous_streets<-stroke(streets)Plot continuous streets:

We look very much forward to contributions to the package. See theContributingGuide for further details.
This package is released with aContributorCode of Conduct. By contributing to this project you agree to abideby its terms.
When modifying the R source code, load the library as:
devtools::load_all()Run tests locally:
devtools::test()Run the linter locally:
lintr::lint_package()Tripathy, P., Rao, P., Balakrishnan,K., & Malladi, T. (2021). An open-source tool to extract naturalcontinuity and hierarchy of urban street networks. Environment andPlanning B: Urban Analytics and City Science, 48(8), 2188-2205. DOI:10.1177/2399808320967680↩︎