header:
  title: Network Traffic
  description: "Traffic related analyses for the modes [car, freight, bike, truck].\
    \ Volumes for PT are not shown in this dashboard."
layout:
  index_by_hour:
  - type: plotly
    title: Network congestion index
    description: by hour
    datasets:
      dataset: analysis/traffic/traffic_stats_by_road_type_and_hour.csv
    traces:
    - fill: none
      "y": $dataset.congestion_index
      x: $dataset.hour
      mode: lines
      whiskerwidth: 0.0
      type: scatter
      name: $dataset.road_type
      colorRamp: Spectral
    layout:
      xaxis:
        title: Hour
        color: "#444"
        type: '-'
      barmode: overlay
      yaxis:
        title: Index
        color: "#444"
        type: '-'
  - type: csv
    title: Traffic stats per road type
    description: daily
    dataset: analysis/traffic/traffic_stats_by_road_type_daily.csv
    enableFilter: false
    showAllRows: true
  map:
  - type: map
    title: Traffic statistics
    description: "Volume for the modes [car, freight, bike, truck] (value: simulated_traffic_volume).\
      \ For the different modes the volumes can set in the config in the plot. Values\
      \ are scaled by sample size. The shown values are scaled to represent 100 %\
      \ based on a simulated sample size of 3%."
    height: 12.0
    datasets:
      traffic: analysis/traffic/traffic_stats_by_link_daily.csv
    center:
    - 13.39
    - 52.51
    zoom: 9.1
    display:
      lineWidth:
        dataset: traffic
        columnName: simulated_traffic_volume
        join: link_id
        scaleFactor: 20000.0
      lineColor:
        dataset: traffic
        columnName: avg_speed
        join: link_id
        colorRamp:
          reverse: false
          steps: 5
          ramp: RdYlBu
      fill: {}
      fillHeight: {}
      radius: {}
    shapes:
      file: analysis/network/network.avro
      join: id
  info:
  - type: text
    backgroundColor: transparent
    content: |
      ### Notes
      - The congestion index is the ratio of time a road is in an uncongested state. 0.5 means that a road is congested half of the time. A road with 1.0 is always uncongested.
      - Cf. A Traffic Congestion Assessment Method for Urban Road Networks Based on Speed Performance Index by Feifei He, Xuedong Yan, Yang Liu, Lu Ma.
