Coder Social home page Coder Social logo

ireisme / running-maps Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tylerpearson/running-maps

0.0 1.0 0.0 8 KB

Ruby scripts to generate maps of the most popular running routes in a city

Home Page: http://www.newmediacampaigns.com/blog/visualizing-most-popular-running-routes-in-chapel-hill-durham-and-raleigh

License: MIT License

Ruby 100.00%

running-maps's Introduction

Most popular running routes scripts

Setup

Install the gems these scripts use with bundle install.

Usage

results-scrape.rb

First we need to gather all the public runs on RunKeeper for a city. This goes through the results page for the city and saves the URL for each page to a file.

Usage: Update the URL and path for the RunKeeper results page to scrape and output location. Run the script with ruby results-scrape.rb.

routes-scrape.rb

Now that we have all the public pages' URLs, we need to extract the JSON embedded in the HTML on each page that contains the route the person followed during their run.

Usage: Update the paths to where the data should be loaded and output. Run the script with ruby routes-scrape.rb.

generate-gpx.rb

Lastly, to load the data into QGIS, I formatted the scraped routes' JSON into a QGIS file. This script could easily be modified to generate GeoJSON or anything else you'd prefer to work with.

Usage: Update the paths to where the data should be loaded and output. Run the script with ruby generate-gpx.rb.

Examples

These scripts were used to gather the data needed to generate running maps for Chapel Hill, Raleigh, and Durham. I created the maps in QGIS, but the data could easily be used anywhere else (for example, loaded on an interactive map).

Chapel Hill

Chapel Hill

Durham

Durham

Raleigh

Raleigh

License

MIT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.