The SpNetPrep package does not deal with statistics, but with the previous steps that can be required in order to perform a spatial statistical analysis of a point pattern that lies on a linear network representing a road structure. In this regard, the name chosen for the package summarizes its main goal of "Spatial Network Preprocessing" (SpNetPrep). The main feature provided by the SpNetPrep package is an interactive application that allows to carry out the complete preprocessing of a linear network that comes from a road structure.
According to the technical difficulties that the development of a spatial analysis over a linear network implies, the SpNetPrep takes advantage of the R packages leaflet and shiny to provide an intuitive application that helps to reduce such difficulties.
Specifically, the SpNetPrep package focuses on the following parts of the preprocessing process that could be required prior to any spatial analysis over a linear network: network creation and edition, network direction endowment and point pattern revision and modification.
Install the SpNetPrep package in R
install.packages("SpNetPrep")
Load the application
library(SpNetPrep) runAppSpNetPrep()
The application included in SpNetPrep is divided into three sections: "Network Edition", "Network Direction" and "Point Pattern Revision". Now, it is briefly described how to use the options contained in each of these sections.
NETWORK EDITION
Join vertex: Click vertex 1 and vertex 2 of the linear network to make them connected by an edge
Remove edge: Click on the edge to be removed (anywhere along its length)
Add point (+edge): First click on a point of the map (where there is no vertex nor edge) and second click on a vertex already existing in the network to make both points connected by an edge
Add two points (+edge): Click on two points of the map (where there is no vertex nor edge) consecutively and the two points will be created and connected by an edge
The execution of these steps is marked in the map (green for additions, red for removals). Pressing the button "Rebuild linear network" makes these modifications of the linear network effective.
NETWORK DIRECTION
Add flow: Click vertex 1 and vertex 2 of the linear network being connected by an edge, and a flow from vertex 1 to vertex 2 will be defined
Add long flow: Click vertex 1 and vertex 2 of the linear network not being connected by an edge, and a flow from vertex 1 to vertex 2 will be defined taking the shortest path of the network (assuming all paths can be taken) that connects them
Remove flow: Click vertex 1 and vertex 2 of the linear network being connected by an edge, and the flow from vertex 1 to vertex 2 will be removed
Remove long flow: Click vertex 1 and vertex 2 of the linear network not being connected by an edge, and the flow from vertex 1 to vertex 2 that takes the shortest path of the network (assuming all paths can be taken) that connects them will be removed
POINT PATTERN REVISION
Explore pattern: Keep this option to explore the pattern and click the events located along the road network to see its marks attached (if the point pattern is marked)
Remove point: Click an event on the linear network to be moved an then on the point of the network (on an edge of the network) where it should be
The execution of Remove point is not made effective until the user clicks the "Rebuild point pattern" button.
Álvaro Briz Redón
Statistics and Operations Research, University of València, Spain
alvaro.briz@uv.es
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.