Skip to content

Instantly share code, notes, and snippets.

@aaronpk
Created October 22, 2012 18:00
Show Gist options
  • Select an option

  • Save aaronpk/3933002 to your computer and use it in GitHub Desktop.

Select an option

Save aaronpk/3933002 to your computer and use it in GitHub Desktop.
simple example of importing a dataset
request = Chimps::QueryRequest.new('encyclopedic/wikipedia/dbpedia/wikipedia_articles/search',
:query_params => {
'g.radius' => 5000,
'g.latitude' => location['location']['position']['latitude'],
'g.longitude' => location['location']['position']['longitude']
})
data = JSON.parse response.body
data['results'].each{|article|
geoloqi.post 'trigger/create', {
:latitude => article['coordinates'][1],
:longitude => article['coordinates'][0],
:radius => 400,
:type => 'message',
:text => article['about'],
:url => article['url'],
:one_time => 1
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment