header:
  title: Trips
  description: General information about modal share and trip distributions.
subtabs:
- title: Trips
  rows:
  - first
  - second
  - third
  - dist-dist
  - departures
  - arrivals
- title: By Groups
  rows:
  - category_header_age
  - category_1_age
  - category_2_age
  - category_header_economic_status
  - category_1_economic_status
  - category_2_economic_status
  - category_header_income
  - category_1_income
  - category_2_income
layout:
  first:
  - type: plotly
    title: Modal split
    datasets:
      dataset:
        file: analysis/population/mode_share.csv
        constant:
          source: Simulated
        aggregate:
          func: SUM
          target: share
          groupBy:
          - main_mode
      lausitzmodeshare:
        file: analysis/resources/lausitz_mode_share.csv
        constant:
          source: Reference
        aggregate:
          func: SUM
          target: share
          groupBy:
          - main_mode
    traces:
    - x: $dataset.share
      "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
          groupBy:
          - dist_group
      lausitzmodeshare:
        file: analysis/resources/lausitz_mode_share.csv
        aggregate:
          func: SUM
          target: share
          groupBy:
          - dist_group
    traces:
    - x: $dataset.dist_group
      "y": $dataset.share
      orientation: v
      type: bar
      name: Simulated
      original_name: Simulated
    - x: $lausitzmodeshare.dist_group
      "y": $lausitzmodeshare.share
      orientation: v
      type: bar
      name: Reference
      original_name: Reference
    colorRamp: Viridis
  second:
  - type: csv
    title: Mode Statistics
    description: "by main mode, over whole trip (including access & egress)"
    dataset: analysis/population/trip_stats.csv
    showAllRows: true
  - type: plotly
    title: Modal distance distribution
    datasets:
      dataset:
        file: analysis/population/mode_share_per_dist.csv
        constant:
          source: Sim
      lausitzmodeshareperdist:
        file: analysis/resources/lausitz_mode_share_per_dist.csv
        constant:
          source: Ref
    traces:
    - x: $dataset.dist_group
      "y": $dataset.share
      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:
  - type: csv
    title: Population statistics
    description: over simulated persons (not scaled by sample size)
    dataset: analysis/population/population_trip_stats.csv
    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
        constant:
          source: sim
      lausitzmodeusers:
        file: analysis/resources/lausitz_mode_users.csv
        constant:
          source: ref
    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
    width: 1.5
    csv: analysis/population/mode_shift.csv
  dist-dist:
  - type: plotly
    title: Detailed distance distribution
    description: by mode. Dashed line represents the reference data.
    datasets:
      dataset:
        file: analysis/population/mode_share_distance_distribution.csv
        pivot:
          exclude:
          - dist
          namesTo: main_mode
          valuesTo: share
        constant:
          source: Sim
      lausitzmodesharedistancedistribution:
        file: analysis/resources/lausitz_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
    - fill: none
      "y": $lausitzmodesharedistancedistribution.share
      x: $lausitzmodesharedistancedistribution.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: $lausitzmodesharedistancedistribution.main_mode
      text: $lausitzmodesharedistancedistribution.source
    layout:
      xaxis:
        title: "Distance [m]"
        color: "#444"
        type: '-'
      showlegend: false
      yaxis:
        title: Share
        color: "#444"
        type: '-'
    colorRamp: Viridis
    interactive: dropdown
  departures:
  - type: plotly
    title: Departures
    description: by hour and purpose
    datasets:
      dataset: analysis/population/trip_purposes_by_hour.csv
    traces:
    - x: $dataset.h
      "y": $dataset.departure
      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:
  - type: plotly
    title: Arrivals
    description: by hour and purpose
    datasets:
      dataset: analysis/population/trip_purposes_by_hour.csv
    traces:
    - x: $dataset.h
      "y": $dataset.arrival
      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
  category_header_economic_status:
  - type: text
    backgroundColor: transparent
    content: "## **Economic_status**"
  category_1_economic_status:
  - type: plotly
    title: Mode share
    description: by economic_status
    datasets:
      dataset:
        file: analysis/population/mode_share_per_economic_status.csv
        pivot:
          exclude:
          - main_mode
          - dist_group
          - economic_status
          namesTo: source
          valuesTo: share
        aggregate:
          func: SUM
          target: share
          groupBy:
          - main_mode
          - source
          - economic_status
        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.economic_status
    layout:
      barmode: stack
    height: 6.0
  category_2_economic_status:
  - type: plotly
    title: Modal distance distribution
    description: by economic_status
    datasets:
      dataset:
        file: analysis/population/mode_share_per_economic_status.csv
        pivot:
          exclude:
          - main_mode
          - dist_group
          - economic_status
          namesTo: source
          valuesTo: share
        normalize:
          groupBy:
          - dist_group
          - source
          - economic_status
          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.economic_status
    layout:
      xaxis:
        title: Distance group
        color: "#444"
        type: '-'
      barmode: stack
      yaxis:
        title: Share
        color: "#444"
        type: '-'
    interactive: dropdown
    multiIndex:
      dist_group: source
  category_header_income:
  - type: text
    backgroundColor: transparent
    content: "## **Income**"
  category_1_income:
  - type: plotly
    title: Mode share
    description: by income
    datasets:
      dataset:
        file: analysis/population/mode_share_per_income.csv
        pivot:
          exclude:
          - main_mode
          - dist_group
          - income
          namesTo: source
          valuesTo: share
        aggregate:
          func: SUM
          target: share
          groupBy:
          - main_mode
          - source
          - income
        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.income
    layout:
      barmode: stack
    height: 6.0
  category_2_income:
  - type: plotly
    title: Modal distance distribution
    description: by income
    datasets:
      dataset:
        file: analysis/population/mode_share_per_income.csv
        pivot:
          exclude:
          - main_mode
          - dist_group
          - income
          namesTo: source
          valuesTo: share
        normalize:
          groupBy:
          - dist_group
          - source
          - income
          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.income
    layout:
      xaxis:
        title: Distance group
        color: "#444"
        type: '-'
      barmode: stack
      yaxis:
        title: Share
        color: "#444"
        type: '-'
    interactive: dropdown
    multiIndex:
      dist_group: source
