d3 map showing world admin boundaries. Hover state attibutes and zooming to bounding boxes. Topojson data of Natural Earth Admin 0 - Countries shapefile at 50m resolution.
This file contains 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
convert CID10033747.png CID9919714.png CID10033747.png -loop 0 -morph 9 -gravity South -annotate 1x1 "%t" -set delay "%[fx:(t%10!=0 || t==n-1)?10:240]" morph.gif |
This file contains 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
upstream kzgeo{ | |
server 127.0.0.1; | |
} | |
# NGINX Server Instance | |
server { | |
listen 0.0.0.0:80; | |
server_name kzgeo.spatialdevmo.com; | |
access_log /var/log/nginx/kzgeo.spatialdevmo.log; |
This file contains 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
upstream kzapi { | |
server 127.0.0.1:3333; | |
} | |
server { | |
listen 0.0.0.0:80; | |
server_name kzapi.spatialdevmo.com; | |
access_log /var/log/nginx/kzapi.spatialdevmo.log; | |
# Gzip Compression |
This file contains 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
#bash_profile location: ~/.bash_profile | |
# Setting for the UTF-8 terminal support | |
export LC_CTYPE=en_US.UTF-8 | |
export LC_ALL=en_US.UTF-8 | |
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* |
This map shows the Natural Earth Admin 0 - Countries shapefile at 50m resolution. Converted to GeoJSON only 4.3MB. Each country is identified by its ISO 3166-1 numeric code.
This donut chart is constructed from a CSV file storing the populations of various age groups. The chart employs a number of D3 features:
- d3.csv - load and parse data
- d3.scale.ordinal - color encoding
- d3.svg.arc - display arcs
- d3.layout.pie - compute arc angles from data
This file contains 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
--FROM http://blog.mackerron.com/2012/06/01/postgis-2-ubuntu-12-04/ | |
mkdir -p src | |
# First install PostgreSQL 9.2, plus contributed packages and any missing prerequisites | |
# === | |
# add the Postgres PPA | |
echo 'deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main' \ |
This file contains 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
import json | |
from functools import wraps | |
from flask import redirect, request, current_app | |
def support_jsonp(f): | |
"""Wraps JSONified output for JSONP""" | |
@wraps(f) | |
def decorated_function(*args, **kwargs): | |
callback = request.args.get('callback', False) | |
if callback: |
This file contains 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
if (!Array.prototype.indexOf) { | |
Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) { | |
"use strict"; | |
if (this == null) { | |
throw new TypeError(); | |
} | |
var t = Object(this); | |
var len = t.length >>> 0; | |
if (len === 0) { |
NewerOlder