header:
  title: Trips
  description: General information about modal share and trip distributions.
subtabs:
- title: Trips
  rows:
  - first_Trips
  - second_Trips
  - third_Trips
  - dist-dist_Trips
  - departures_Trips
  - arrivals_Trips
- title: By Groups
  rows:
  - category_header_age
  - category_1_age
  - category_2_age
layout:
  first_Trips:
  - type: plotly
    title: Modal split
    datasets:
      dataset:
        file: analysis/population/mode_share.csv
        constant:
          source: Simulated
        aggregate:
          func: SUM
          target: share_total
          groupBy:
          - main_mode
      modeshareref:
        file: analysis/resources/mode_share_ref.csv
        constant:
          source: Reference
        aggregate:
          func: SUM
          target: share
          groupBy:
          - main_mode
        rename:
          share: share_total
    traces:
    - x: $dataset.share_total
      "y": $dataset.source
      orientation: h
      type: bar
      name: $dataset.main_mode
    layout:
      barmode: stack
    mergeDatasets: true
  - type: plotly
    title: Trip distance distribution
    datasets:
      dataset:
        file: analysis/population/mode_share.csv
        aggregate:
          func: SUM
          target: share_total
          groupBy:
          - dist_group
      modeshareref:
        file: analysis/resources/mode_share_ref.csv
        aggregate:
          func: SUM
          target: share
          groupBy:
          - dist_group
        rename:
          share: share_total
    traces:
    - x: $dataset.dist_group
      "y": $dataset.share_total
      orientation: v
      type: bar
      name: Simulated
      original_name: Simulated
    - x: $modeshareref.dist_group
      "y": $modeshareref.share_total
      orientation: v
      type: bar
      name: Reference
      original_name: Reference
    colorRamp: Viridis
  second_Trips:
  - type: csv
    title: Mode Statistics
    description: "by main mode, over whole trip (including access & egress). Values\
      \ are NOT scaled by sample size. The shown values are for the simulated sample\
      \ size of 1%."
    dataset: analysis/population/trip_stats_total.csv
    showAllRows: true
  - type: plotly
    title: Modal distance distribution
    description: "Mode share within distance groups by main mode, over whole trip\
      \ (including access & egress)"
    datasets:
      dataset:
        file: analysis/population/mode_share_per_dist.csv
        constant:
          source: Sim
      modeshareperdistref:
        file: analysis/resources/mode_share_per_dist_ref.csv
        constant:
          source: Ref
          subpopulation: N/A
          modelType: personTraffic
          groupOfSubpopulation: N/A
          share_personTraffic: N/A
        rename:
          share: share_total
    traces:
    - x: $dataset.dist_group
      "y": $dataset.share_total
      orientation: v
      type: bar
      name: $dataset.main_mode
    layout:
      xaxis:
        title: Distance group
        color: "#444"
        type: '-'
      barmode: stack
      yaxis:
        title: Share
        color: "#444"
        type: '-'
    mergeDatasets: true
    multiIndex:
      dist_group: source
  third_Trips:
  - type: csv
    title: Population statistics
    description: over simulated persons. Values are NOT scaled by sample size. The
      shown values are for the simulated sample size of 1%.
    dataset: analysis/population/population_trip_stats.csv
    show:
    - Group
    - total
    showAllRows: true
  - type: plotly
    title: Mode usage
    description: Share of persons using a main mode at least once per day
    datasets:
      dataset:
        file: analysis/population/mode_users.csv
        filter:
          group: total
        constant:
          source: sim
      modeusersref:
        file: analysis/resources/mode_users_ref.csv
        constant:
          source: ref
          group: N/A
    traces:
    - x: $dataset.main_mode
      "y": $dataset.user
      orientation: v
      type: bar
      name: $dataset.main_mode
    width: 2.0
    mergeDatasets: true
    multiIndex:
      main_mode: source
  - type: sankey
    title: Mode shift
    description: by main mode. Compares initial input with output after the last iteration.
      Values are NOT scaled by sample size. The shown values are for the simulated
      sample size of 1%.
    width: 1.5
    csv: analysis/population/mode_shift_total.csv
  dist-dist_Trips:
  - type: plotly
    title: Detailed mode share distance distribution
    description: by mode. Dashed line represents the reference data.
    datasets:
      dataset:
        file: analysis/population/mode_share_distance_distribution_total.csv
        pivot:
          exclude:
          - dist
          namesTo: main_mode
          valuesTo: share
        constant:
          source: Sim
      modesharedistancedistribution:
        file: analysis/resources/mode_share_distance_distribution.csv
        pivot:
          exclude:
          - dist
          namesTo: main_mode
          valuesTo: share
        constant:
          source: Ref
    traces:
    - fill: none
      "y": $dataset.share
      x: $dataset.dist
      mode: lines
      whiskerwidth: 0.0
      type: scatter
      name: $dataset.main_mode
      original_name: total
    - fill: none
      "y": $modesharedistancedistribution.share
      x: $modesharedistancedistribution.dist
      mode: lines
      line:
        color: black
        width: 2.0
        smoothing: 1.0
        shape: linear
        dash: dash
        simplify: true
        context:
          color: black
          shape: linear
          width: 2.0
          smoothing: 1.0
          simplify: true
          dash: dash
      whiskerwidth: 0.0
      type: scatter
      name: $modesharedistancedistribution.main_mode
      text: $modesharedistancedistribution.source
    layout:
      xaxis:
        title: "Distance [m]"
        color: "#444"
        type: '-'
      showlegend: false
      yaxis:
        title: Share
        color: "#444"
        type: '-'
    colorRamp: Viridis
    interactive: dropdown
  departures_Trips:
  - type: plotly
    title: Departures of the Trips
    description: by hour and the activity type at the destination.
    datasets:
      dataset:
        file: analysis/population/trip_purposes_by_hour.csv
        filter:
          group: total
    traces:
    - x: $dataset.h
      "y": $dataset.departures
      orientation: v
      type: bar
      name: $dataset.purpose
      colorRamp: Spectral
    layout:
      xaxis:
        title: Hour
        color: "#444"
        type: '-'
      barmode: stack
      yaxis:
        title: Share
        color: "#444"
        type: '-'
  arrivals_Trips:
  - type: plotly
    title: Arrivals of the Trips
    description: by hour and the activity type at the destination.
    datasets:
      dataset:
        file: analysis/population/trip_purposes_by_hour.csv
        filter:
          group: total
    traces:
    - x: $dataset.h
      "y": $dataset.arrivals
      orientation: v
      type: bar
      name: $dataset.purpose
      colorRamp: Spectral
    layout:
      xaxis:
        title: Hour
        color: "#444"
        type: '-'
      barmode: stack
      yaxis:
        title: Share
        color: "#444"
        type: '-'
  category_header_age:
  - type: text
    backgroundColor: transparent
    content: "## **Age**"
  category_1_age:
  - type: plotly
    title: Mode share
    description: by age
    datasets:
      dataset:
        file: analysis/population/mode_share_per_age.csv
        pivot:
          exclude:
          - main_mode
          - dist_group
          - age
          namesTo: source
          valuesTo: share
        aggregate:
          func: SUM
          target: share
          groupBy:
          - main_mode
          - source
          - age
        rename:
          sim_share: Sim
          ref_share: Ref
    traces:
    - x: $dataset.source
      "y": $dataset.share
      orientation: v
      type: bar
      name: $dataset.main_mode
      facet_col: $dataset.age
    layout:
      barmode: stack
    height: 6.0
  category_2_age:
  - type: plotly
    title: Modal distance distribution
    description: by age
    datasets:
      dataset:
        file: analysis/population/mode_share_per_age.csv
        pivot:
          exclude:
          - main_mode
          - dist_group
          - age
          namesTo: source
          valuesTo: share
        normalize:
          groupBy:
          - dist_group
          - source
          - age
          target: share
        rename:
          sim_share: Sim
          ref_share: Ref
    traces:
    - x: $dataset.dist_group
      "y": $dataset.share
      orientation: v
      type: bar
      name: $dataset.main_mode
      facet_col: $dataset.age
    layout:
      xaxis:
        title: Distance group
        color: "#444"
        type: '-'
      barmode: stack
      yaxis:
        title: Share
        color: "#444"
        type: '-'
    interactive: dropdown
    multiIndex:
      dist_group: source
