Using Metric Graph to estimate AADT on traffic links in Norway #10
Replies: 2 comments
-
|
Hi, if you build a metric_graph object of your road network you can then simply follow the construction here https://davidbolin.github.io/MetricGraph/articles/inla_interface.html to fit the model using INLA, where you just use your current model but replace the Besag model by an SPDE model on the graph (which you for example can create as graph_spde(graph). The only difference in this case is that you need to store the data you have in the graph object, including any other covariates, but that is explained in the vignette. You can build the graph in a few different ways, but the simplest option is if you have the different road segments as spatiallines objects (for example obtained from openstreetmap): https://davidbolin.github.io/MetricGraph/articles/MetricGraph.html Let us know if you have any specific questions. |
Beta Was this translation helpful? Give feedback.
-
|
Hi Johannes, We would also like to inform you that we expanded the options in creations of metric graph objects. You can see more details here: https://davidbolin.github.io/MetricGraph/articles/metric_graph.html We now allow one to manually pass the edge lengths. So, you can probably create the metric graph object by passing V (the vertices), E (the edges) and manual_edge_lengths (the lengths of the links, in your case). As @davidbolin mentioned, you can also create the metric graph object by using Please, let us know if this helps you, and also if you have more questions. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Good afternoon,
I am working on a project where the goal is to use data from Traffic Registration Points(TRPs) to estimate AADT for the rest of the road network in Norway. So basically, "filling out the blanks" on this map.
We are only working with traffic links, which are segments of the road network where traffic is assumed to be conserved in regards to AADT. This map shows the extent..
Note that the map shows undirected, in most cases there is a traffic link going both ways(except one-way roads etc).
I have a dataset where each row is one of these directed traffic links, with some explanatory variables such as the length of the link, functional road class, urban ratio(how much of the link is in an urban area). In total I have around 44.000 directed traffic links, and I have measured AADT(called prelimAadt) from TRPs on around 10.000 of the rows.
I am currently using INLA with an edge adjacency list as input to a Besag model, and then fitting a Poisson response. So in a way, I am using the traffic links as nodes, and then the edges are if it is possible to move from one link to another. I have added some code below, so you can see what I am currently doing.
Using MetricGraph instead sounds like a good idea, and therefore I am wondering if this might be possible?
Beta Was this translation helpful? Give feedback.
All reactions