Skip to content

Instantly share code, notes, and snippets.

View keithamoss's full-sized avatar

Keith Moss keithamoss

  • Perth, Australia
View GitHub Profile
@keithamoss
keithamoss / el_wa
Last active December 10, 2015 01:19
INSERT INTO `australian_postcode` (`election_id`, `postcode`, `constituency`) VALUES
(4, 872, 'Pilbara'),
(4, 872, 'Kalgoorlie'),
(4, 6000, 'Perth'),
(4, 6003, 'Perth'),
(4, 6004, 'Perth'),
(4, 6004, 'Mount Lawley'),
(4, 6005, 'Perth'),
(4, 6006, 'Perth'),
(4, 6007, 'Perth'),
{
"type": "FeatureCollection",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:EPSG::3410" } },
"features": [
{ "type": "Feature", "properties": { "name": "Afghanistan" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 5894667.629608472809196, 4287823.474364124238491 ], [ 5992878.742643840610981, 4248143.103105548769236 ], [ 6065490.814364247024059, 4262113.653206573799253 ], [ 6085605.798220810480416, 4309403.180655007250607 ], [ 6161621.824126372113824, 4325080.570372958667576 ], [ 6215895.474267287179828, 4356607.558118255808949 ], [ 6235119.673157300800085, 4438927.1569256298244 ], [ 6316286.362191072665155, 4458704.91140025947243 ], [ 6331375.103911510668695, 4494972.519517701119184 ], [ 6376805.522409897297621, 4467745.793280748650432 ], [ 6405813.525566038675606, 4464582.141818708740175 ], [ 6459470.078402559272945, 4463904.469206269830465 ], [ 6532102.084446002729237, 4442323.46728001255542 ], [ 6
// @TOOD GitHub
// @TODO Data download
// @TODO Templating http://mustache.github.io/
// @TODO Parse Info Window response rather than using the GME API
// @TODO Make proxy safe
// @TOOD Make tagline markup less shit
// @TODO IE8 Respond.JS
// @TODO Editing UI
// @TODO A VM
// @TODO New icons: Coffee, 'Other' (e.g. GF/Veg, details in extra_info field)
var elections = {
"queensland_election_2015": {
title: "Queensland Election 2015",
lat: -22,
lng: 146,
zoom: 5,
layerIds: ["08198754560717916103-11020532994758899661", "08198754560717916103-03958069248388696200"],
tableId: "08198754560717916103-12095069980316140126",
boundaries: "queensland-2013.json",
has_polling_place_type: true
if (url) {
console.log(url);
$.ajax(url, {
success: function(response) {
popup.show(evt.coordinate, response);
},
error: function() {
alert("Failed querying layer.");
}
// controls: ol.control.defaults({
// attributionOptions: /** @type {olx.control.AttributionOptions} */ ({collapsible: false})
// }),
controls: [
new ol.control.Rotate(),
new ol.control.Attribution({collapsible: false})
],
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Heatmaps</title>
<style>
html, body {
height: 100%;
margin: 0;
padding: 0;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@keithamoss
keithamoss / small-geom-first.json
Created October 14, 2016 04:46
A GeoJSON dataset with two polygons (small polygon first, large polygon second)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.