Running a Simple Access Study in the Command Line
This guide walks through a quick example of building a default walk / bike / drive road network for the Denver region and running an access study from the command line.
Prerequisites
Compile the Rust binaries and set your U.S. Census API key:
cargo build --release --manifest-path rust/Cargo.toml
export CENSUS_API_TOKEN="<your-census-api-key>"
1. Build the Network
Use script/bambam_build_open_data.sh with --to-stage network to download Overture Maps road data for the buffered Denver region (query/denver_470_buffer.txt) and write the network files to denver_buf/:
./script/bambam_build_open_data.sh \
--extent-file query/denver_470_buffer.txt \
--output-dir denver_buf \
--to-stage network
This downloads the road network, separates it into walk/, bike/, and drive/ edge lists, and writes a ready-to-run denver_buf/bambam.toml configuration file.
2. Run BAMBAM
Now run bambam using the generated denver_buf/bambam.toml configuration and a query file describing our interior study grid (query/denver_extent.json, which sits well inside the buffered network extent):
cd denver_buf
../rust/target/release/bambam \
--config-file bambam.toml \
--query-file ../query/denver_extent.json
Here, query/denver_extent.json simply specifies the study area polygon in Well-Known Text (WKT):
{
"extent": "POLYGON ((-105.026035 39.728445, -104.958401 39.728445, -104.958401 39.77002, -105.026035 39.77002, -105.026035 39.728445))"
}
When finished, BAMBAM writes result.csv and result.json inside denver_buf/, containing the 10-, 20-, 30-, and 40-minute isochrones and reachable opportunity counts for every H3 grid cell and mode (walk, bike, and drive).