[ Launch: color scales ] d3d45deafc7fe27321c9 by jacquestardie[ Launch: color scales ] 31e3106f86931970dadf by jacquestardie See Previous Inlet [ Gist ]
[ Launch: color scales ] 31e3106f86931970dadf by jacquestardie See Previous Inlet [ Gist ]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='utf-8' /> | |
<title></title> | |
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' /> | |
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.3.1/mapbox-gl.js'></script> | |
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.3.1/mapbox-gl.css' rel='stylesheet' /> | |
<style> | |
body { margin:0; padding:0; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='utf-8' /> | |
<title></title> | |
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' /> | |
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.3.1/mapbox-gl.js'></script> | |
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.3.1/mapbox-gl.css' rel='stylesheet' /> | |
<style> | |
body { margin:0; padding:0; } |
- Freebase: http://www.freebase.com/query
- DBPedia: http://dbpedia.org/snorql
- Scroll for dbpedia examples: https://wiki.base22.com/display/btg/SPARQL+Query+Examples
- Factforge: http://factforge.net/sparql
Based on Mike Bostock’s [World Map][0], modified to automatically colour countries such that no adjacent countries share the same colour.
This is done by extracting the topology via [TopoJSON][1] and greedily picking colours until the constraint is fulfilled.
See also: [Graph coloring][2] on Wikipedia.
Update: Greedily colouring is now performed in a single line, thanks to Mike Bostock!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Enter bands (ie 4 3 2)" | |
read B1 B2 B3 | |
echo "Enter the resulting filename" | |
read outputname |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sepalLength | sepalWidth | petalLength | petalWidth | species | |
---|---|---|---|---|---|
5.1 | 3.5 | 1.4 | 0.2 | setosa | |
4.9 | 3.0 | 1.4 | 0.2 | setosa | |
4.7 | 3.2 | 1.3 | 0.2 | setosa | |
4.6 | 3.1 | 1.5 | 0.2 | setosa | |
5.0 | 3.6 | 1.4 | 0.2 | setosa | |
5.4 | 3.9 | 1.7 | 0.4 | setosa | |
4.6 | 3.4 | 1.4 | 0.3 | setosa | |
5.0 | 3.4 | 1.5 | 0.2 | setosa | |
4.4 | 2.9 | 1.4 | 0.2 | setosa |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Mac OSX 10.8 geo setup script | |
# loads geo stuffs, mostly through homebrew | |
################### | |
# Before running: | |
# - Install Xcode from the Mac App Store. | |
# - Install the Xcode Command Line Tools by opening Xcode, | |
# Xcode → Preferences → Downloads → Components → |