• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Solving the "Brooklyn Problem"
 

Solving the "Brooklyn Problem"

on

  • 7,423 views

Better UX through cheap hacks

Better UX through cheap hacks

Statistics

Views

Total Views
7,423
Views on SlideShare
4,577
Embed Views
2,846

Actions

Likes
6
Downloads
30
Comments
0

12 Embeds 2,846

http://laughingmeme.org 2693
http://www.laughingmeme.com 68
http://laughingmeme.com 43
http://thehyperrealists.tumblr.com 16
url_unknown 9
http://translate.googleusercontent.com 7
http://bitly.com 3
http://www.linkedin.com 2
https://www.linkedin.com 2
http://www.slideshare.net 1
http://webcache.googleusercontent.com 1
http://www.newsblur.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Solving the "Brooklyn Problem" Solving the "Brooklyn Problem" Presentation Transcript

    • Solving The Brooklyn Problem: Better UX through cheap hacks Kellan Elliott-McCrea, Etsy @kellanThursday, April 21, 2011
    • Thursday, April 21, 2011
    • Thursday, April 21, 2011
    • Thursday, April 21, 2011
    • 1. UI/UX can be improved by applying ambient location informationThursday, April 21, 2011
    • 1. UI/UX can be improved by applying ambient location information 2. It’s easy.Thursday, April 21, 2011
    • The Brooklyn ProblemThursday, April 21, 2011
    • The Brooklyn Problem Brooklyn, New York Brooklyn, AlabamaThursday, April 21, 2011
    • if ($query == ‘Brooklyn’) { return ‘Brooklyn, NY’; }Thursday, April 21, 2011
    • Thursday, April 21, 2011
    • Thursday, April 21, 2011
    • Thursday, April 21, 2011
    • Thursday, April 21, 2011
    • Solr 3.10, Maxmind world populations dataset, bash, and an “algorithm”Thursday, April 21, 2011
    • Solr geo-spatial extension 3.10+ schema.xml: <fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/> .... <field name="latlong" type="location" indexed="true" stored="true" required="true" />Thursday, April 21, 2011
    • ALL THE CODE! <?php $fh = fopen(worldcitiespop.txt, r); $row = fgetcsv($fh); // discard headers for($i=0;$i<100;$i++) { $row = fgetcsv($fh); $json = array(add=> array(doc => array( terms => $row[2] . . $row[0], // city country population => $row[4], latlong => $row[5] . , . $row[6], // "latitude,longitude" gets parsed ))); curl_post(json_encode($json)); } } function curl_post($json, $url=http://localhost:8983/solr/update/json) { $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPHEADERS, array(Content-Type: application/json)); curl_setopt($ch, CURLOPT_URL, $URL); } ?>Thursday, April 21, 2011
    • “a custom Solr scoring function to re-rank results based on social geo-relevance”Thursday, April 21, 2011
    • div(geodist(),sqrt(sum(population,1))Thursday, April 21, 2011
    • http://localhost:8393/solr/ placesuggest/select? q=b*&sfield=latlong&pt=37.7749295 ,-122.4194155&sort=div(geodist (),sqrt(sum(population,1)))%20ascThursday, April 21, 2011
    • OM G CO NT http://localhost:8393/solr/ EX TS placesuggest/select? GE EN q=b*&sfield=latlong&pt=37.7749295 OC SIT O D IV ,-122.4194155&sort=div(geodist IN E PE (),sqrt(sum(population,1)))%20asc G! RS !!!! ON AL IZ EDThursday, April 21, 2011
    • Done!Thursday, April 21, 2011
    • the tear down * Solr 3.10+ working geo-spatial extensions * 2.6 million points == 380Mb index * the data sucks, and it doesn’t matter (much) * a few days of work, 85% increase in data quality.Thursday, April 21, 2011
    • .Wanjialing, ChinaThursday, April 21, 2011
    • Brooklyn NY, population: 0Thursday, April 21, 2011
    • So why aren’t people doing this?Thursday, April 21, 2011
    • Thursday, April 21, 2011
    • Thursday, April 21, 2011
    • Thursday, April 21, 2011
    • Solr 3.10, Maxmind world populations dataset, bash, and an “algorithm”Thursday, April 21, 2011
    • Thank you! http://www.etsy.com/listing/59401151/vintage-coffee-bean-bag-chairs http://www.flickr.com/photos/darn/141009324/ http://www.flickr.com/photos/21953562@N07/5539813593/ http://www.maxmind.com/app/worldcities http://www.lucidimagination.com/blog/2010/07/20/update-spatial-search-in- apache-lucene-and-solr/ http://www.etsy.com/listing/66013923/triceratops-forged-copper-maskThursday, April 21, 2011