From 104f215a0eff50ed4f1fbb7ea34805f6bc210a98 Mon Sep 17 00:00:00 2001 From: Ben Varick Date: Tue, 5 Nov 2024 07:52:14 -0600 Subject: [PATCH] Edited .gitignore, edited README, edited Makefile to include new brouter make commands --- Makefile | 5 ++++- README.md | 10 ++++++++-- docker/brouter/.gitignore | 3 +++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 325bd9e..025afa9 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,12 @@ walk: route_analysis.Rmd R -e 'library("rmarkdown"); old_path <- Sys.getenv("PATH"); Sys.setenv(PATH = paste(old_path, "/usr/local/bin", sep = ":")); rmarkdown::render(knit_root_dir = "./", output_dir = "./html", input = "./route_analysis.Rmd", output_file = "./html/route_analysis.html")' -cycle: cycling_route_analysis.Rmd +cycle_osrm: cycling_route_analysis.Rmd R -e 'library("rmarkdown"); old_path <- Sys.getenv("PATH"); Sys.setenv(PATH = paste(old_path, "/usr/local/bin", sep = ":")); rmarkdown::render(knit_root_dir = "./", output_dir = "./html", input = "./cycling_route_analysis.Rmd", output_file = "./html/cycling_route_analysis.html")' +cycle_brouter: cycling_route_analysis_brouter.Rmd + R -e 'library("rmarkdown"); old_path <- Sys.getenv("PATH"); Sys.setenv(PATH = paste(old_path, "/usr/local/bin", sep = ":")); rmarkdown::render(knit_root_dir = "./", output_dir = "./html", input = "./cycling_route_analysis_brouter.Rmd", output_file = "./html/cycling_route_analysis.html")' + osrm-container: ./docker/osrm/docker-compose.yml cd ./docker/osrm/; docker compose up -d diff --git a/README.md b/README.md index 3a2179c..9ab8fdc 100644 --- a/README.md +++ b/README.md @@ -22,8 +22,14 @@ This script will generate a few figures: ![example routes-lts figure](examples/example-routes-lts.png) ## Using make -The command `make route_analysis` will run *route_analysis.Rmd* which -is an R markdown file containing the original R script *route_analysis.R* +- `make osrm-data`: downloads the OpenStreetMap data for Wisconsin, and preproccesses it for use with OSRM. +- `make osrm-container`: starts the OSRM containers (backends and frontends) for walking and biking. +- `make brouter-data`: clones the repositories for brouter and brouter-web and downloads the segment data. It also builds the docker images for brouter and brouter-web. +- `make brouter-container`: starts the brouter containers (backend and frontend). +- `make walk` will run *route_analysis.Rmd* which +calculates the walking routes using OSRM. +- `make cycle-osrm` will run *cycling_route_analysis.Rmd* which calculates the biking routes using OSRM. +- `make cycle_brouter` will run *cycling_route_analysis_brouter.Rmd* which calculates the biking routes using brouter. ## Misc. - [Bike Level of Traffic Stress (LTS)](https://www.dvrpc.org/webmaps/bike-lts/analysis/) diff --git a/docker/brouter/.gitignore b/docker/brouter/.gitignore index ed90703..43905bb 100644 --- a/docker/brouter/.gitignore +++ b/docker/brouter/.gitignore @@ -5,3 +5,6 @@ # Except the list of relevant segments !segments.csv + +# Except docker-compose.yml +!docker-compose.yml