Skip to content

Instantly share code, notes, and snippets.

View andrewxhill's full-sized avatar

Andrew W. Hill andrewxhill

View GitHub Profile
@andrewxhill
andrewxhill / cdb_import.sh
Created June 28, 2013 13:43 — forked from luisbosque/cdb_import.sh
Import CartoDB file with cURL (Mac version)
#!/bin/bash
CDB_USER=$1
API_KEY=$2
IMPORT_FILE=$3
if [[ -z $CDB_USER ]]
then
echo "Missing user"
fi
@andrewxhill
andrewxhill / README.md
Last active December 18, 2015 02:58 — forked from jatorre/gist:3892665
Efficient bulk update and insert

Bulk insert or update CartoDB records

Use the SQL example here to efficiently update CartoDB tables. See both the INSERT and UPDATE variants

@andrewxhill
andrewxhill / index.html
Last active December 11, 2015 02:39 — forked from anonymous/index.html
Exploding globe in D3
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Exploding world</title>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://libs.cartocdn.com/cartodb.js/v2/cartodb.js"></script>
<style type="text/css">
body{
@andrewxhill
andrewxhill / index.html
Last active December 10, 2015 22:38 — forked from javisantana/index.html
<html>
<head>
<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v2/themes/css/cartodb.css" />
<script src="http://libs.cartocdn.com/cartodb.js/v2/cartodb.js"></script>
<style>
html, body {padding: 0; margin: 0;}
#map { width: 100%; height:100%; background: black;}
#menu { position: absolute; top: 5; right: 5; width: 400px; height:60px; background: transparent;}
#menu a {
margin: 0 5px 0 0;
<html>
<head>
<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v2/themes/css/cartodb.css" />
<script src="http://libs.cartocdn.com/cartodb.js/v2/cartodb.js"></script>
<style>
html, body {padding: 0; margin: 0;}
#map { width: 100%; height:100%; background: black;}
#menu { position: absolute; top: 5; right: 5; width: 400px; height:60px; background: transparent;}
#menu a {
margin: 0 5px 0 0;
@andrewxhill
andrewxhill / cartodb_test.html
Created August 21, 2012 15:31 — forked from anonymous/cartodb_test.html
cartodb_test.html
<html><body><h1>Summary</h1> <h3>40 Tests Run with 1 Failures - 2012-08-21 11:30</h3> <table border="1"><tr><th>#</th><th>production</th><th>staging</th><th>sql</th><th>carto</th></tr>
<tr>
<td class="test_count">10</td>
<td class="production_img"><a href='http://examples.cartodb.com/tiles/carto_tests/0/0/0.png?style=%23carto_tests+%7Bmarker-fill%3A%23ff7%3B+marker-max-error%3A0.762117952967%3B+marker-line-opacity%3A0.954313683078%3B+marker-allow-overlap%3Afalse%3B+polygon-fill%3Argba%28255%2C+255%2C+0%2C+1%29%3B+marker-spacing%3A16.0%3B+marker-width%3A4.0%3B+marker-height%3A3.0%3B+marker-opacity%3A0.667163700797%3B+line-color%3Agreen%3B+line-gamma%3A0.524514770107%3B+line-cap%3Around%3B+polygon-opacity%3A0.814145908039%3B+marker-type%3Aarrow%3B+polygon-gamma%3A0.296743932444%3B+line-dasharray%3A2%2C10%3B+line-join%3Amiter%3B+marker-placement%3Aline%3B+line-width%3A12.0%3B+marker-line-color%3Argb%28155%2C+133%2C+0%29%3B+line-opacity%3A0.749564105384%3B+marker-line-width%3A4.0%3
@andrewxhill
andrewxhill / collectionsmetadata.json
Created May 19, 2011 00:50 — forked from tucotuco/collectionsmetadata.json
Third pass at collections metadata JSON from Andrew
{
"collection":{
"source":"World Wildlife Fund (WWF)",
"type":"Ecoregion",
"name":"World Ecoregions",
"description":"The WWF's Conservation Science Program (CSP) has developed a biogeographic regionalization of the Earth's terrestrial biodiversity. WWF termed the biogeographic units ecoregions, defined as relatively large units of land or water containing distinct assemblages of natural communities sharing a large majority of species, dynamics, and environmental conditions. Ecoregions represent the original distribution of distinct assemblages of species and communities.",
"url":"http://www.worldwildlife.org/science/ecoregions/item1267.html",
"agreements":{
"0":{"url": "http://www.worldwildlife.org/agreement.html"
"text": "A brief overview of the TOS",