Road networks can be modeled as graphs where each edge in the graph represents a specific road segment. And each edge (road segment) can have an associated “weight” that indicates things like traffic, the time for travel, distance, etc.
Traffic weights data: This is a stream of fake traffic data associated with each edge in the D.C. road network that I have set up using Kafka. Each message in the Kafka topic consists of an edge ID that corresponds to the ID in the D.C. road network data and an associated traffic weight.
The second materialized view joins the recent weights view above with the D.C. road network data that contains information on the number of points in each edge in the data.