Skip to content
Compute commute times in San Francisco for generating a heatmap visualization.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
License.md
README.md
index.js
package.json
results.csv

README.md

How does office location affect your team's commute time?

This script computes median commute times from your existing team's home addresses to various office locations in San Francisco. You may also modify the script for your city.

Live map here.

  • For a set of team addresses
  • Loops over a grid of San Francisco lat/lon coordinates
  • Computes the median commute time for the whole team
  • Outputs an array of lat/lon/median_commute for input into Carto.com

Usage

  • Install dependencies: npm install
  • Update script: You'll need to fill in your Google Maps API key, and team home addresses
  • Run script: node index.js
  • Copy and paste console output into a CSV
  • Visualize data in Carto
  • Sign up or login
  • From https://[username].carto.com/dashboard/maps, select "New Map"
  • Upload results.csv under "Connect Dataset"
  • You should see a map of your area of interest with same-color dots
  • Use "Wizard" > "Choropleth" in the right hand column to select a color ramp, and set "Column" to "value"

License

Released under the MIT license.

You can’t perform that action at this time.