Skip to content

Instantly share code, notes, and snippets.

View andrewxhill's full-sized avatar

Andrew W. Hill andrewxhill

View GitHub Profile
@andrewxhill
andrewxhill / index.html
Last active August 29, 2015 14:17
Publish a map with a filterable table
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Map - Table</title>
<meta name="description" content="Template for publishing a map and sortable table">
<meta name="author" content="andrewxhill">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="https://cartodb.com/favicon.ico">
@andrewxhill
andrewxhill / index.html
Created March 19, 2015 20:00
Simple table view
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Map - Table</title>
<meta name="description" content="Template for publishing a map and sortable table">
<meta name="author" content="andrewxhill">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="https://cartodb.com/favicon.ico">
/** torque_heat visualization */
Map {
-torque-frame-count:1;
-torque-animation-duration:10;
-torque-time-attribute:"cartodb_id";
-torque-aggregation-function:"count(cartodb_id)";
-torque-resolution:2;
-torque-data-aggregation:linear;
}
@andrewxhill
andrewxhill / index.html
Last active August 29, 2015 14:15
projections for fun
<!DOCTYPE html>
<html>
<head>
<title>Leaflet multilayer example | CartoDB.js</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<link rel="shortcut icon" href="http://cartodb.com/assets/favicon.ico" />
<style>
html, body, #map {
height: 100%;
@andrewxhill
andrewxhill / index.html
Created January 29, 2015 01:31
multi layer toggle for ferzoco
<!DOCTYPE html>
<html>
<head>
<title>Layer selector example | CartoDB.js</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<link rel="shortcut icon" href="http://cartodb.com/assets/favicon.ico" />
<style>
html, body, #map {
height: 100%;
<!doctype><html><head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Odyssey.js Slides</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/x-icon" href="http://cartodb.github.io/odyssey.js/sandbox/favicon.png">
<link rel="icon" type="image/png" href="http://cartodb.github.io/odyssey.js/sandbox/favicon.png">
@andrewxhill
andrewxhill / README.md
Last active November 16, 2015 22:36
Torque date format picker

Allows you to easily change the displayed date/time format on a Torque timeslider

@andrewxhill
andrewxhill / index.html
Last active August 29, 2015 14:14
Speak a place to go to it on a map
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Web Speech API Demo</title>
<style>
html, body, #map {
height: 100%;
padding: 0;
margin: 0;
@andrewxhill
andrewxhill / index.html
Last active August 29, 2015 14:14
Blow into make to move the car
<!doctype html>
<html>
<head>
<title>Pitch Detector</title>
<link href='http://fonts.googleapis.com/css?family=Alike' rel='stylesheet' type='text/css'>
<style>
html, body, #map {
height: 100%;
padding: 0;
margin: 0;
# very handy/brute forcey ugly way to rip a flat file from a netcdf
from netCDF4 import Dataset
import numpy as np
from datetime import datetime, timedelta
import csv
b = open('test.csv', 'w')
a = csv.writer(b, delimiter=',')
# pressure levels in air data