Top Banner
Raining Cats and Dogs DVTO 4: The Google Maps API
28

Data + Visualization Toronto Meetup 4: The Google Maps API

Jan 15, 2015

Download

Technology

mattholtom

Trimmed version of slides shown at the Data + Visualization Toronto Meetup Group's Fourth Meetup. Contains information about the Google Maps API, and Google Geocoding API.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Data + Visualization Toronto Meetup 4: The Google Maps API

Raining Cats and Dogs

DVTO 4: The Google Maps API

Page 2: Data + Visualization Toronto Meetup 4: The Google Maps API

http://www.toronto.ca/fire/cadinfo/livecad.htm

Page 3: Data + Visualization Toronto Meetup 4: The Google Maps API
Page 4: Data + Visualization Toronto Meetup 4: The Google Maps API

Slides Removed

• See http://www.torontofirecalls.com for app

• http://www.toronto.ca/fire/cadinfo/livecad.htm

• http://www.toronto.ca/fire/cadinfo/livecad.xml

Page 5: Data + Visualization Toronto Meetup 4: The Google Maps API

Designs and Compromises

• “First make it possible. Then make it beautiful. Then make it fast.” -Nathan Marz

Page 6: Data + Visualization Toronto Meetup 4: The Google Maps API

Make it Possible

• Node JS and Redis, because programming

• Revert to Rails and Postgres, because spaghetti

Page 7: Data + Visualization Toronto Meetup 4: The Google Maps API

Every 5 Minutes do X1. Custom Rake Task w/ Heroku Scheduler

2. Clockwork and Delayed Job (OMG $$$)

3. Clockwork and Delayed Job with Workless

4. Switch to WebFaction

5. Bare Cron

6. Cron by Whenever Gem

Page 8: Data + Visualization Toronto Meetup 4: The Google Maps API

Slide Removed

• http://mapicons.nicolasmollet.com/

Page 9: Data + Visualization Toronto Meetup 4: The Google Maps API

Make it Fast(er)

• NewRelic development agent -> Profiled

• Event retrieval on click? Not scalable

• Optimized AR Queries

• InfoWindow Generation/Retrieval to AJAX

Page 10: Data + Visualization Toronto Meetup 4: The Google Maps API

Part 4Google Geocoding and

Maps API’s

Page 11: Data + Visualization Toronto Meetup 4: The Google Maps API

Google Geocoding API

• http://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&sensor=true

• JSON or XML, HTTP or HTTPS

• 2,500 requests per 24 hour period.

• Also a rate limit, so sleep during bulk geocodes

Page 12: Data + Visualization Toronto Meetup 4: The Google Maps API
Page 13: Data + Visualization Toronto Meetup 4: The Google Maps API

Reverse Geocoding

• Have location, need address.

• http://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452&sensor=true

Page 14: Data + Visualization Toronto Meetup 4: The Google Maps API
Page 15: Data + Visualization Toronto Meetup 4: The Google Maps API

Slide Removed

• https://github.com/alexreisner/geocoder

Page 16: Data + Visualization Toronto Meetup 4: The Google Maps API

Geocode Happy

1. Realistic use case?

2. Have a strategy.

3. Check the TOS.

Page 17: Data + Visualization Toronto Meetup 4: The Google Maps API

Markers on a Map

Page 18: Data + Visualization Toronto Meetup 4: The Google Maps API

Step 1

Page 19: Data + Visualization Toronto Meetup 4: The Google Maps API

Step 2

Page 20: Data + Visualization Toronto Meetup 4: The Google Maps API

Step 3

Page 21: Data + Visualization Toronto Meetup 4: The Google Maps API

Step 4

Page 22: Data + Visualization Toronto Meetup 4: The Google Maps API

Step 5

Page 23: Data + Visualization Toronto Meetup 4: The Google Maps API

Slide Removed

• See https://github.com/apneadiving/Google-Maps-for-Rails

Page 24: Data + Visualization Toronto Meetup 4: The Google Maps API

Bonus Resources

• CartoDB and Torque

• Google Maps Mania Blog

Page 25: Data + Visualization Toronto Meetup 4: The Google Maps API

Slide Removed

• See thedirt.co

Page 26: Data + Visualization Toronto Meetup 4: The Google Maps API

Slide Removed

• See padmapper.com

Page 27: Data + Visualization Toronto Meetup 4: The Google Maps API

Slide Removed

• http://lifewatch.inbo.be/blog/posts/tracking-eric.html

Page 28: Data + Visualization Toronto Meetup 4: The Google Maps API

Code & Ironcodeandiron.co

m@codeandiron

[email protected]

@mattholtomTO

Matt Holtom