Shp2graph: Tools to Convert a Spatial Network into an Igraph Graph in R
Open Access
- 24 July 2018
- journal article
- research article
- Published by MDPI AG in ISPRS International Journal of Geo-Information
- Vol. 7 (8) , 293
Abstract
In this study, we introduce the R package shp2graph, which provides tools to convert a spatial network into an ‘igraph’ graph of the igraph R package. This conversion greatly empowers a spatial network study, as the vast array of graph analytical tools provided in igraph are then readily available to the network analysis, together with the inherent advantages of being within the R statistical computing environment and its vast array of statistical functions. Through three urban road network case studies, the calculation of road network distances with shp2graph and with igraph is demonstrated through four key stages: (i) confirming the connectivity of a spatial network; (ii) integrating points/locations with a network; (iii) converting a network into a graph; and (iv) calculating network distances (and travel times). Throughout, the required R commands are given to provide a useful tutorial on the use of shp2graph.Keywords
Funding Information
- National Natural Science Foundation of China (NSFC: U1533102)
- Shenzhen Key Laboratory of Spatial Smart Sensing and Services (Shenzhen University) (open Research Fund Program)
This publication has 23 references indexed in Scilit:
- OSMnx: New methods for acquiring, constructing, analyzing, and visualizing complex street networksComputers, Environment and Urban Systems, 2017
- R Package gdistance: Distances and Routes on Geographical Grids2017
- A protocol to convert spatial polyline data to network formats and applications to world urban road networksScientific Data, 2016
- GWmodel: AnRPackage for Exploring Spatial Heterogeneity Using Geographically Weighted ModelsJournal of Statistical Software, 2015
- The GWmodel R package: further topics for exploring spatial heterogeneity using geographically weighted modelsGeo-spatial Information Science, 2014
- Geographically weighted regression with a non-Euclidean distance metric: a case study using hedonic house price dataInternational Journal of Geographical Information Science, 2013
- Spatial networksPhysics Reports, 2011
- The spatial structure of networksThe European Physical Journal B, 2006
- Geographical data modelingComputers & Geosciences, 1992
- A note on two problems in connexion with graphsNumerische Mathematik, 1959