Skip to content

vgXhc/madison_bike_shop_map

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bike shop and repair station map

Map of Madison bike shops and repair stations for the Madison Bikes website, using Leaflet and RMarkdown.

Data

Bike shop info was manually compiled and entered into a Google Sheet; repair station data is imported from the City of Madison Open Data portal.

Deployment

The Madison Bikes website runs on Wordpress, which means there are some manual steps required to set up the map.1

Initial set-up

  1. Set the YAML header to output a html_document and knit
title: 'Madison Area Bike Shops and Repair Stations'
output: 
  html_document:
    self_contained: false
    lib_dir: lib
  1. Copy the lib folder into your Wordpress site root directory via ssh (i.e. the libraries will be madisonbikes.org/lib)
  2. Create a new root-level page on Wordpress
  3. Add an html block in the Wordpress editor
  4. Copy all library references from the map.html <head> section into the block (starting from <script src="lib/jquery-1.12.4/jquery.min.js"></script> and ending at <link href="lib/fontawesome-4.7.0/font-awesome.min.css" rel="stylesheet">)
  5. Manually adjust the paths to point to the right lib directory (i.e. insert ../ in front of every relative path to go up to the root directory and then into lib)
  6. Copy all content between the <body> ... </body> tags into the block after the <script>s.

Updates

  1. Change YAML header output format to html_fragment and knit
  2. Copy map.html content and paste it into the <body> section on Wordpress

Footnotes

  1. If anyone can think of a more automated solution, let me know.

About

Map of Madison bike shops and repair stations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published