Let the file load, graphs may take a while to appear
The aim of this project is to automate the process of directed network graph formation, i.e., creation of incidence matrix, node adjacency matrix,and map the sensors to appropriate links. The data used for creating the freeway network is obtained from open street maps, whereas, the data for sensors is obtained from PeMS. The results of the algorithm will be fed to the network sensor error estimation algorithm, that quantifies the erroneous sensors using network statistics.
Osmar - To import data from open street maps
Leaflet, mapview, sp - Mapping the network
dplyr, plyr - To manipulate data frames
Creating the map required
We start by downloading the bulk osm data for California (approx. 18GB). Next, using osmar library, we extract the required data using a bounding box, demarcating the latitude and longitude boundaries.
bbox = corner_bbox(-118.0042, 33.6363, -117.7226, 33.9194)
Then extracting only the freeway information (links and nodes) from the resulting data, the following network is created:
# hw_lines contain extracted link data
# hw_nodes contain extracted node data
mapview(hw_lines) + mapview(hw_nodes, color = "black", cex = 1)