Skip to content

Instantly share code, notes, and snippets.

View timwaters's full-sized avatar
💭
Set your status

Tim Waters timwaters

💭
Set your status
View GitHub Profile
@timwaters
timwaters / geoiq_leaflet.htm
Created October 31, 2011 11:34
geoiq geocommons and leaflet
<html><head><title>Geocommons and Leaflet JS</title>
<!-- Leaflet CSS -->
<link rel="stylesheet" href="CloudMade-Leaflet-404b097/dist/leaflet.css" />
<!--[if lte IE 8]><link rel="stylesheet" href="CloudMade-Leaflet-404b097/dist>/leaflet.ie.css" /><![endif]-->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script>
<!-- Leaflet JavaScript -->
<script type="text/javascript" src="CloudMade-Leaflet-404b097/dist/leaflet.js"></script>
@timwaters
timwaters / simple_sinatra_oauth_app_geoiq.rb
Created November 8, 2011 12:04
Simple GeoCommons and GeoIQ OAuth Sinatra App
require "rubygems"
require "sinatra"
require "oauth"
require "oauth/consumer"
require 'haml'
enable :sessions
# Simple Ruby Sinatra application for interacting with GeoIQ server
# You would need to either supply environment variables for key, secret and site or change them in this file.
{
"NAME": "Navajo",
"county_sta": "NavajoArizona",
"County_B": "NavajoCounty",
"x": -110.314143272,
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
@timwaters
timwaters / hot_osm_links.txt
Created November 13, 2012 14:46
plan workshop HOT osm useful links
"address":{
"type": "object",
"properties": {
"number": {
"type": "string",
"index": "not_analyzed",
"store": "no"
},
"street": {
"type": "string",
@timwaters
timwaters / gist:4336435
Created December 19, 2012 12:48
elasticsearch combining AND and OR - possible?
// (name.second == ba || name.second == po) && postdate ...
filter': {
'and': [
{
'or':[
{
"prefix" : { "name.second" : "ba" }
},
{
@timwaters
timwaters / gist:5477222
Last active December 16, 2015 18:20
leeds data hack bdw13 Tims One Hour Data Challenge
Tims One Hour Data Challenge
leeds data hack bdw13
http://i.imgur.com/AfNJhRX.png
Dr G Lees & Partners
Highfield Surgery
The Surgery at Nursery Lane and Adel
@timwaters
timwaters / ES facets
Created May 8, 2013 16:51
facets all up in the place
{
"facets": {
"feature_code": {
"_type": "terms",
"total": 5529,
"terms": [
{
"count": 5220,
"term": "HSTS"
},
@timwaters
timwaters / gist:5584511
Last active December 17, 2015 08:59
elasticsearch numeric_range to script filter? Seems to work?
#start_date = 2013-05-15
#"start": { "type": "date" }
date_filter = {
"or" : [
{
"numeric_range" : {
"timeframe.start" : {
"gte" : start_date,
"lte" : end_date
@timwaters
timwaters / gazzy-source-fixures.json
Created May 31, 2013 14:34
gazzy origin / source definitions
[
{
"model": "gazetteer.origin",
"pk": 1,
"fields": {
"name": "Robinsons Atlas Brooklyn 1886",
"description": "Robinson's atlas of the city of Brooklyn, New York : embracing all territory within its corporate limits; from official records ... / by and under the supervision of E. Robinson and R.H. Pidgeon, civil engineers. ",
"example": "http://maps.nypl.org/warper/layers/867.3523",
"code": "maps.nypl.org/warper/layers/867"
}