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
Created November 10, 2015 21:34
fixed election map
<!DOCTYPE html>
<html>
<head>
<title>Election Mapping Bonanza</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" />
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,700|Open+Sans+Condensed:300,700' rel='stylesheet' type='text/css'>
<style>
@andrewxhill
andrewxhill / index.html
Last active April 10, 2019 22:06
Chart.js using SQL API
<!doctype html>
<html>
<head>
<title>Tornadoes total versus max damage</title>
<script src="http://www.chartjs.org/assets/Chart.js"></script>
<meta name = "viewport" content = "initial-scale = 1, user-scalable = no">
<script src="http://libs.cartocdn.com/cartodb.js/v3/cartodb.js"></script>
<style>
canvas{
}
import ipfsapi
import requests
import random
import string
# Gateways
gateways = [
"rx14.co.uk",
"ipfs.deo.moe",
"hardbin.com",
@andrewxhill
andrewxhill / index.html
Last active August 13, 2018 22:55
Torque plus Chart.js
<!doctype html>
<html>
<head>
<title>Torque plus Radar Chart</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" />
<script src="http://www.chartjs.org/assets/Chart.js"></script>
<script src="http://libs.cartocdn.com/cartodb.js/v3/cartodb.js"></script>
<style>
@andrewxhill
andrewxhill / index.html
Last active August 13, 2018 22:46
Space Launch Report - An example of Torque with labels
<!DOCTYPE html>
<html>
<head>
<title>Space Launch Report | 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 / batchAPI.py
Last active May 16, 2018 16:01
quick example of using the batch api over python
import sys
import urllib
import urllib2
import json
import requests
# Start a new batch SQL task
def cartoBatchQuery(username, api_key, sql):
r = requests.post('http://%s.cartodb.com/api/v2/sql/job?api_key=%s' %(username,api_key),
headers={'content-type':'application/json'},

Keybase proof

I hereby claim:

  • I am andrewxhill on github.
  • I am andrewxhill (https://keybase.io/andrewxhill) on keybase.
  • I have a public key ASCQCpQbOhKgXK6xK9-Xo-2vx_oQgf9v6vW7q6S_ry6FFgo

To claim this, I am signing this object:

@andrewxhill
andrewxhill / last_hour.css
Last active January 5, 2018 19:27
Raincloud CartoCSS
/** raincloud visualization */
@markerw: 2;
#last_1_hours{
marker-fill: #0C2C84;
marker-width: 20;
marker-line-color: #FFF;
marker-line-width: 0;
marker-line-opacity: 0;
marker-opacity: 0.3;