the geo-aware parent
DESCRIPTION
10 minutes on my little web app for parents.TRANSCRIPT
![Page 1: The Geo-aware Parent](https://reader033.vdocuments.site/reader033/viewer/2022052909/5597dce91a28abca1e8b4681/html5/thumbnails/1.jpg)
The Geo-Aware ParentMatt Machell for Multipack Presents
Feb 2011
![Page 2: The Geo-aware Parent](https://reader033.vdocuments.site/reader033/viewer/2022052909/5597dce91a28abca1e8b4681/html5/thumbnails/2.jpg)
It started when I became a dad
![Page 3: The Geo-aware Parent](https://reader033.vdocuments.site/reader033/viewer/2022052909/5597dce91a28abca1e8b4681/html5/thumbnails/3.jpg)
What if I had a web app to find child-friendly places?
![Page 4: The Geo-aware Parent](https://reader033.vdocuments.site/reader033/viewer/2022052909/5597dce91a28abca1e8b4681/html5/thumbnails/4.jpg)
So I made a prototype using Javascript
![Page 5: The Geo-aware Parent](https://reader033.vdocuments.site/reader033/viewer/2022052909/5597dce91a28abca1e8b4681/html5/thumbnails/5.jpg)
Python
• code.google.com/edu/languages/google-python-class/
• diveintopython.org/
![Page 6: The Geo-aware Parent](https://reader033.vdocuments.site/reader033/viewer/2022052909/5597dce91a28abca1e8b4681/html5/thumbnails/6.jpg)
Let’s Build This With : Pylons
• More mix-n-match than Django
• Good docs but some gaps
• pylonshq.com
• pylonsbook.com
![Page 7: The Geo-aware Parent](https://reader033.vdocuments.site/reader033/viewer/2022052909/5597dce91a28abca1e8b4681/html5/thumbnails/7.jpg)
Up and running...python go-pylons.py mydevenv
source mydevenv/bin/activate
easy_install sqlalchemy
easy_install mako
paster create -t pylons parents
paster controller locations
paster serve development.ini --reload
![Page 8: The Geo-aware Parent](https://reader033.vdocuments.site/reader033/viewer/2022052909/5597dce91a28abca1e8b4681/html5/thumbnails/8.jpg)
Geo-locating
• Code is really easy
• Slow on desktops without GPS
• Now in FF, Safari, Opera and IE!
![Page 9: The Geo-aware Parent](https://reader033.vdocuments.site/reader033/viewer/2022052909/5597dce91a28abca1e8b4681/html5/thumbnails/9.jpg)
if(navigator.geolocation){
navigator.geolocation.getCurrentPosition(function(position) {
var lat=position.coords.latitude;
var long=position.coords.longitude;
window.location=window.location+'?geo='+lat+','+long;
}, function() {
//failure
},
{maximumAge: 75000});
}
![Page 10: The Geo-aware Parent](https://reader033.vdocuments.site/reader033/viewer/2022052909/5597dce91a28abca1e8b4681/html5/thumbnails/10.jpg)
Haversine Formulas
• Cos the world isn’t flat
![Page 11: The Geo-aware Parent](https://reader033.vdocuments.site/reader033/viewer/2022052909/5597dce91a28abca1e8b4681/html5/thumbnails/11.jpg)
Geocoding
• Need to match name to lat/long
• Need to match lat/long to name
• Need to match postcode to lat/long
![Page 12: The Geo-aware Parent](https://reader033.vdocuments.site/reader033/viewer/2022052909/5597dce91a28abca1e8b4681/html5/thumbnails/12.jpg)
Geonames Rocks!
• Web Service APIs in JSON/XML/etc
• Country specific targeting
• Postcodes
• www.geonames.org
![Page 13: The Geo-aware Parent](https://reader033.vdocuments.site/reader033/viewer/2022052909/5597dce91a28abca1e8b4681/html5/thumbnails/13.jpg)
Interface
• Part of my “New Dad Site” blog
• Lightweight HTML5, mostly forms
• CSS3 transitions tied to :invalid
![Page 14: The Geo-aware Parent](https://reader033.vdocuments.site/reader033/viewer/2022052909/5597dce91a28abca1e8b4681/html5/thumbnails/14.jpg)
Some Assembly Required
• finder.newdadsite.com
• @shuckle / @newdadsite
• eclecticdreams.com