exploring the sweet spot: geolocation, health, and gov-data

53
Exploring the Sweet Spot Geolocation, Health, and Gov-data Lance Roggendorff | @lroggendorff | [email protected]

Upload: lance-roggendorff

Post on 12-Jan-2015

1.839 views

Category:

Technology


1 download

DESCRIPTION

Location based services are increasingly important, especially when it comes to accessing health information and services. Over the past year and a half, AIDS.gov, a program of the U.S. Department of Health and Human Services, Office of HIV/AIDS Policy, has been collaborating with other Federal agencies (CDC, HUD, SAMHSA, among others) to develop an HIV/AIDS prevention and service locator. This new tool combines key Federal HIV/AIDS programs such as HIV testing, mental health services, health centers, substance abuse clinics, and housing services. Each of these programs is run by a separate agency and pulls information from a wide range of sources. Beyond addressing what it took to get each agency to collaborate and push their data in a consumable format, this presentation will focus on the steps AIDS.gov took to create this locator service. We take a technical approach to discuss the GeoRSS standard, how we built the service using mostly JavaScript, and how we pushed this service to mobile, standard web, and native application platforms. We will also talk about the iterative design and development process, and we tie it all together with the big ticket: the sweet spot of location, mobile, and health. We cover it all, location, Health IT, and Gov 2.0.

TRANSCRIPT

Page 1: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

Exploring the Sweet Spot

Geolocation, Health, and Gov-data

Lance Roggendorff | @lroggendorff | [email protected]

Page 2: Exploring the Sweet Spot: Geolocation, Health, and Gov-data
Page 3: Exploring the Sweet Spot: Geolocation, Health, and Gov-data
Page 4: Exploring the Sweet Spot: Geolocation, Health, and Gov-data
Page 5: Exploring the Sweet Spot: Geolocation, Health, and Gov-data
Page 6: Exploring the Sweet Spot: Geolocation, Health, and Gov-data
Page 7: Exploring the Sweet Spot: Geolocation, Health, and Gov-data
Page 8: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

aggregators

“Pipe Dream” by Rishi Menon - http://www.flickr.com/photos/rxmflickr/4102530508/

Page 9: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

Widget builders

Frank Scherschel - http://images.google.com/hosted/life/l?imgurl=a00c346a37821dc5

Page 10: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

The Problem

Page 11: Exploring the Sweet Spot: Geolocation, Health, and Gov-data
Page 12: Exploring the Sweet Spot: Geolocation, Health, and Gov-data
Page 13: Exploring the Sweet Spot: Geolocation, Health, and Gov-data
Page 14: Exploring the Sweet Spot: Geolocation, Health, and Gov-data
Page 15: Exploring the Sweet Spot: Geolocation, Health, and Gov-data
Page 16: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

aggregators

“Pipe Dream” by Rishi Menon - http://www.flickr.com/photos/rxmflickr/4102530508/

Data aggregation

Page 17: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

http://cdcnpin.org/hivTestLocatorFeed/feed.aspx?zip=37206&radius=5

Page 18: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:georss="http://www.georss.org/georss"> <title>Search Results from CDC - Locate HIV/AIDS Testing Sites</title> <link href="http://cdcnpin.org/hivTestLocatorFeed.aspx?zip=37206&amp;radius=5" rel="self" /> <link href="http://hivtest.org" rel="alternate" /> <author> <name>CDC NPIN</name> </author> <id>tag:cdcnpin.org,2009-09-15:/npinwebservices/NPINDataWebservices</id> <updated>2009-09-15T00:00:00-05:00</updated> <entry> <title>Cayce Family Health Center</title> <link href="http://www.hivtest.org/search/OrgResult.cfm?OrgNbr=21952" /> <id>tag:hivtest.org,2000-03-20:/search/OrgResult.cfm?OrgNbr=21952</id> <summary type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml"> <div class="vcard"> <div class="fn org">Cayce Family Health Center</div> <div class="adr"> <div class="street-address">617 S 8th St</div> <span class="locality">Nashville</span>, <span class="region">TN</span>, <span class="postal-

code">37206</span></div> <div class="tel">615-226-1695</div> </div>

</div> </summary> <georss:point>36.168533 -86.755339</georss:point> <updated>2010-10-14T18:17:31.0000000-04:00</updated> </entry></feed>

Page 19: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:georss="http://www.georss.org/georss"> <title>Search Results from CDC - Locate HIV/AIDS Testing Sites</title> <link href="http://cdcnpin.org/hivTestLocatorFeed.aspx?zip=37206&amp;radius=5" rel="self" /> <link href="http://hivtest.org" rel="alternate" /> <author> <name>CDC NPIN</name> </author> <id>tag:cdcnpin.org,2009-09-15:/npinwebservices/NPINDataWebservices</id> <updated>2009-09-15T00:00:00-05:00</updated> <entry> <title>Cayce Family Health Center</title> <link href="http://www.hivtest.org/search/OrgResult.cfm?OrgNbr=21952" /> <id>tag:hivtest.org,2000-03-20:/search/OrgResult.cfm?OrgNbr=21952</id> <summary type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml"> <div class="vcard"> <div class="fn org">Cayce Family Health Center</div> <div class="adr"> <div class="street-address">617 S 8th St</div> <span class="locality">Nashville</span>, <span class="region">TN</span>, <span class="postal-

code">37206</span></div> <div class="tel">615-226-1695</div> </div>

</div> </summary>

<georss:point>36.168533 -86.755339</georss:point> <updated>2010-10-14T18:17:31.0000000-04:00</updated> </entry></feed>

Page 20: Exploring the Sweet Spot: Geolocation, Health, and Gov-data
Page 21: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

Widget builders

Frank Scherschel - http://images.google.com/hosted/life/l?imgurl=a00c346a37821dc5

Search decentralization

Page 22: Exploring the Sweet Spot: Geolocation, Health, and Gov-data
Page 23: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

<noscript><div style="height:115px;position:relative;width:314px;background:url(http://locator.aids.gov/images/bg_widget-8bit.png) no-repeat;padding-left:19px;"><strong style="padding-top:6px;color:#fff;display:block;font-family:Trebuchet MS;font-size:14px;line-height:16px;">Find HIV/AIDS Prevention & Service Providers</strong><p style="font-size:9px;margin: 3px 0 4px;color:#fff;">Enter your address, city and state, or ZIP Code:</p><form action="http://locator.aids.gov/index.php" style="margin:0;"><label style="margin-left:22px;"><input type="text" name="location" style="border:0;font-size:11px;width:230px;"/></label><button type="submit" style="background:none;border:none;cursor:pointer;height:40px;margin-top:5px;padding:0;text-indent:-999em;overflow:hidden;vertical-align:middle;width:40px;">GO</button><input type="hidden" name="text_only" value="true" /></form><p style="font-size:9px;margin: 10px 0 0;color:#fff;">For more information on this widget, please visit <a href="http://aids.gov/locator"

style="color:#fff;">AIDS.gov</a>.</p></div></noscript><script type="text/javascript" src="http://locator.aids.gov/widget.js"></script>

Page 24: Exploring the Sweet Spot: Geolocation, Health, and Gov-data
Page 25: Exploring the Sweet Spot: Geolocation, Health, and Gov-data
Page 26: Exploring the Sweet Spot: Geolocation, Health, and Gov-data
Page 27: Exploring the Sweet Spot: Geolocation, Health, and Gov-data
Page 28: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

var objects = $.d.getElementsByTagName('object');if ( objects.length > 0 ) {

for (var i = 0, ol = objects.length; i < ol; i++) {var obj = objects[i].cloneNode(true);var obj_parent = objects[i].parentNode;var placeholder = $.f.createNode('div', {id:trueName+'obj'+i+'savedspot'});obj_parent.insertBefore(placeholder, objects[i].nextSibling);obj_parent.removeChild(objects[i]);var param = $.f.createNode('param', {name:'wmode',value:'transparent'});obj.appendChild(param);obj_parent.insertBefore(obj, placeholder.nextSibling);obj_parent.removeChild(placeholder);

}}// repeat for <embed> elements for IE

Page 29: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

Shareable

Page 30: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

Analytics

Page 31: Exploring the Sweet Spot: Geolocation, Health, and Gov-data
Page 32: Exploring the Sweet Spot: Geolocation, Health, and Gov-data
Page 33: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

1,600,000 loads

(meaningless)

Page 34: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

~2000 actual searches

Page 35: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

Widget on ~70 websites

Page 36: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

Widget Techniques

Get on your coding shoes

Page 37: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

Case-hardened JS

http://kentbrewster.com/badges/

Page 38: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

(function() { var trueName = ''; for (var i = 0; i < 16; i++) { trueName += String.fromCharCode(Math.floor(Math.random() * 26) + 97); } window[trueName] = {}; var $ = window[trueName]; $.f = function() { return { init : function(target) { var theScripts = document.getElementsByTagName('SCRIPT'); for (var i = 0; i < theScripts.length; i++) { if (theScripts[i].src.match(target)) { $.w = document.createElement('DIV'); $.w.innerHTML = 'Hello, world. My name is ' + trueName + '.'; theScripts[i].parentNode.insertBefore($.w, theScripts[i]); theScripts[i].parentNode.removeChild(theScripts[i]); break; } } } }; }(); var thisScript = /behavior.js/; if (typeof window.addEventListener !== 'undefined') { window.addEventListener('load', function() { $.f.init(thisScript); }, false); } else if (typeof window.attachEvent !== 'undefined') { window.attachEvent('onload', function() { $.f.init(thisScript); }); }})();

Page 39: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

(function() { var trueName = ''; for (var i = 0; i < 16; i++) { trueName += String.fromCharCode(Math.floor(Math.random() * 26) + 97); } window[trueName] = {}; var $ = window[trueName]; $.f = function() { return { init : function(target) { var theScripts = document.getElementsByTagName('SCRIPT'); for (var i = 0; i < theScripts.length; i++) { if (theScripts[i].src.match(target)) { $.w = document.createElement('DIV'); $.w.innerHTML = 'Hello, world. My name is ' + trueName + '.'; theScripts[i].parentNode.insertBefore($.w, theScripts[i]); theScripts[i].parentNode.removeChild(theScripts[i]); break; } } } }; }(); var thisScript = /behavior.js/; if (typeof window.addEventListener !== 'undefined') { window.addEventListener('load', function() { $.f.init(thisScript); }, false); } else if (typeof window.attachEvent !== 'undefined') { window.attachEvent('onload', function() { $.f.init(thisScript); }); }})();

Page 40: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

(function() { var trueName = ''; for (var i = 0; i < 16; i++) { trueName += String.fromCharCode(Math.floor(Math.random() * 26) + 97); } window[trueName] = {}; var $ = window[trueName]; $.f = function() { return { init : function(target) { var theScripts = document.getElementsByTagName('SCRIPT'); for (var i = 0; i < theScripts.length; i++) { if (theScripts[i].src.match(target)) { $.w = document.createElement('DIV'); $.w.innerHTML = 'Hello, world. My name is ' + trueName + '.'; theScripts[i].parentNode.insertBefore($.w, theScripts[i]); theScripts[i].parentNode.removeChild(theScripts[i]); break; } } } }; }(); var thisScript = /behavior.js/; if (typeof window.addEventListener !== 'undefined') { window.addEventListener('load', function() { $.f.init(thisScript); }, false); } else if (typeof window.attachEvent !== 'undefined') { window.attachEvent('onload', function() { $.f.init(thisScript); }); }})();

Page 41: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

(function() { var trueName = ''; for (var i = 0; i < 16; i++) { trueName += String.fromCharCode(Math.floor(Math.random() * 26) + 97); } window[trueName] = {}; var $ = window[trueName]; $.f = function() { return { init : function(target) { var theScripts = document.getElementsByTagName('SCRIPT'); for (var i = 0; i < theScripts.length; i++) { if (theScripts[i].src.match(target)) { $.w = document.createElement('DIV'); $.w.innerHTML = 'Hello, world. My name is ' + trueName + '.'; theScripts[i].parentNode.insertBefore($.w, theScripts[i]); theScripts[i].parentNode.removeChild(theScripts[i]); break; } } } }; }(); var thisScript = /behavior.js/; if (typeof window.addEventListener !== 'undefined') { window.addEventListener('load', function() { $.f.init(thisScript); }, false); } else if (typeof window.attachEvent !== 'undefined') { window.attachEvent('onload', function() { $.f.init(thisScript); }); }})();

Page 42: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

Meebo Bar

http://en.oreilly.com/velocity2010/public/

schedule/detail/13070

Page 43: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

http://en.oreilly.com/velocity2010/public/schedule/detail/13070

Page 44: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

Issues

Page 45: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

JavaScript Blocks

Solution: Meebo Bar technique

Page 46: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

CSS Sandbox

http://github.com/premasagar/cleanslate

Page 47: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

JavaScript Prohibited

MySpace, Wordpress.com, FB, others, disallow JS

Page 48: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

Performance

Page 49: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

<script>$LAB.script("http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js").script("/scripts/config.1284731050.js").wait().script("/scripts/locator.1284731052.js").script("http://www.google.com/jsapi").wait(function () {

google.load("maps", "3", {"callback": "Locator.initialize", "other_params": "sensor=false" });});

</script>

@getify http://labjs.com

Page 50: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

Client cache

http://developer.yahoo.com/performance/rules.html#

expires

#Far Future Expires Header<FilesMatch "\.(gif|png|jpg|js|css|swf)$"> ExpiresActive On ExpiresDefault "access plus 10 years"</FilesMatch>

Page 51: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

File versioning

http://particletree.com/notebook/automatically-version-your-css-and-javascript-files/

#Rules for Versioned Static Files#filename.123456789.js -> filename.jsRewriteRule ^(scripts|css|images)/(.+)\.(.+)\.

(js|css|jpg|gif|png)$ $1/$2.$4 [L]

Page 52: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

One last tip…

• Build• Iterate

Page 53: Exploring the Sweet Spot: Geolocation, Health, and Gov-data

Thanks!

• Please rate me: http://spkr8.com/t/4825

• Or, give feedback:• @lroggendorff• [email protected]