exploring the sweet spot: geolocation, health, and gov-data
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
Exploring the Sweet Spot
Geolocation, Health, and Gov-data
Lance Roggendorff | @lroggendorff | [email protected]
aggregators
“Pipe Dream” by Rishi Menon - http://www.flickr.com/photos/rxmflickr/4102530508/
Widget builders
Frank Scherschel - http://images.google.com/hosted/life/l?imgurl=a00c346a37821dc5
The Problem
aggregators
“Pipe Dream” by Rishi Menon - http://www.flickr.com/photos/rxmflickr/4102530508/
Data aggregation
http://cdcnpin.org/hivTestLocatorFeed/feed.aspx?zip=37206&radius=5
<?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&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>
<?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&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>
Widget builders
Frank Scherschel - http://images.google.com/hosted/life/l?imgurl=a00c346a37821dc5
Search decentralization
<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>
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
Shareable
Analytics
1,600,000 loads
(meaningless)
~2000 actual searches
Widget on ~70 websites
Widget Techniques
Get on your coding shoes
Case-hardened JS
http://kentbrewster.com/badges/
(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); }); }})();
(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); }); }})();
(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); }); }})();
(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); }); }})();
Meebo Bar
http://en.oreilly.com/velocity2010/public/
schedule/detail/13070
http://en.oreilly.com/velocity2010/public/schedule/detail/13070
Issues
JavaScript Blocks
Solution: Meebo Bar technique
CSS Sandbox
http://github.com/premasagar/cleanslate
JavaScript Prohibited
MySpace, Wordpress.com, FB, others, disallow JS
Performance
<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
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>
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]
One last tip…
• Build• Iterate
Thanks!
• Please rate me: http://spkr8.com/t/4825
• Or, give feedback:• @lroggendorff• [email protected]