Hussein-Mahfouz / drt-potential

3 stars 0 forks source link

Code Flowchart #18

Open Hussein-Mahfouz opened 6 months ago

Hussein-Mahfouz commented 6 months ago

This is a description of the code pipeline that should be updated regularly. Ideally, the whole pipeline will be run through the build.R file. I should also check targets to avoid running cripts unnecessarily.

I should also move this to the main readme of the repo

graph LR;
    R/utils --> code/prepare_layers;

    code/prepare_layers --> code/study_area;

    code/study_area --> code/clip_gtfs;
    code/rail_to_gtfs --> code/clip_gtfs;
    R/read_gtfs --> code/clip_gtfs;
    R/read_gtfs --> code/rail_to_gtfs;

    code/study_area --> code/download_elevation;
    code/study_area --> code/download_osm_network;
    R/read_gtfs --> code/compare_gtfs_overlap;
    code/clip_gtfs --> code/compare_gtfs_overlap;
    code/compare_gtfs_overlap -->  code/gtfs_convert_stop_times_to_freq;

    code/rail_to_gtfs --> code/compare_gtfs_overlap;

    R/read_gtfs -->  code/gtfs_convert_stop_times_to_freq;
    code/rail_to_gtfs -->  code/gtfs_convert_stop_times_to_freq;

    code/download_elevation --> code/routing_prep;
    code/download_osm_network --> code/routing_prep;
    code/gtfs_convert_stop_times_to_freq --> code/routing_prep;
    R/utils --> code/routing_prep;

    R/study_area_geographies --> code/routing_r5r;
    code/study_area --> code/routing_r5r;
    code/routing_prep --> code/routing_r5r;
    R/r5r_routing_wrappers --> code/routing_r5r;

    R/study_area_geographies --> code/eda_travel_time;
    code/routing_r5r --> code/eda_travel_time;

    code/study_area --> code/travel_demand_census;
    code/routing_r5r --> code/travel_demand_census;

    R/study_area_geographies --> code/demand_on_buses;
    R/trips_to_zone_pairs --> code/demand_on_buses;
    R/filter_od_matrix --> code/demand_on_buses;
    code/performance_od --> code/demand_on_buses;
    code/travel_demand_census --> code/performance_od;
    R/study_area_geographies --> code/performance_od;

    R/study_area_geographies --> code/eda_travel_demand;
    R/filter_od_matrix --> code/eda_travel_demand;
    code/study_area --> code/eda_travel_demand;
    code/travel_demand_census --> code/eda_travel_demand;
    code/demand_on_buses --> code/eda_travel_demand;

    R/study_area_geographies --> code/demand_no_direct_bus;
    R/filter_od_matrix --> code/demand_no_direct_bus;
    code/routing_r5r --> code/demand_no_direct_bus;
    code/travel_demand_census --> code/demand_no_direct_bus;

    code/demand_on_buses --> code/demand_cluster_flows_prep;

    style R/filter_od_matrix fill:#B48EAD   
    style R/r5r_routing_wrappers fill:#B48EAD   
    style R/read_gtfs fill:#B48EAD
    style R/stop_times_to_frequencies fill:#B48EAD  
    style R/study_area_geographies fill:#B48EAD 
    style R/trips_to_zone_pairs fill:#B48EAD    
    style R/utils fill:#B48EAD

    style code/clip_gtfs fill:#A3BE8C
    style code/compare_gtfs_overlap fill:#A3BE8C
    style code/demand_on_buses fill:#A3BE8C
    style code/download_elevation fill:#A3BE8C
    style code/download_osm_network fill:#A3BE8C
    style code/eda_travel_demand fill:#A3BE8C ,stroke:#f66, stroke-width:2px, ,stroke-dasharray: 5 5
    style code/eda_travel_time fill:#A3BE8C
    style code/gtfs_convert_stop_times_to_freq fill:#A3BE8C
    style code/prepare_layers fill:#A3BE8C
    style code/rail_to_gtfs fill:#A3BE8C
    style code/routing_prep fill:#A3BE8C
    style code/routing_r5r fill:#A3BE8C
    style code/study_area fill:#A3BE8C
    style code/travel_demand_census fill:#A3BE8C
    style code/performance_od fill:#A3BE8C, stroke:#f66, stroke-width:2px, ,stroke-dasharray: 5 5
    style code/demand_no_direct_bus fill:#A3BE8C
    style code/demand_cluster_flows_prep fill:#A3BE8C

Purple is functions used throughout. Green are scripts. Orange border indicates WIP

Robinlovelace commented 6 months ago

:rocket:

mem48 commented 5 months ago

targets has a steep learning curve but does pay off.

Robinlovelace commented 5 months ago

:+1: to targets.