Contours of San Francisco overlayed over OpenStreeMap vector tiles using code from mbostock's vector tiles with multiple layers example. View the hi-res file
See gist for code used to generate contours.
/** | |
* Original author: David Eads (https://github.com/eads) | |
* | |
* Wrap D3 charting components in a simple Backbone view interface | |
* | |
* Provides a redrawing path, data sync, and fallback for non-d3 browsers. | |
* | |
* Views that extend ChartView should implement their own "draw" function and go to work. | |
* | |
* var collection = new Backbone.Collection([ ["Maria", 33], ["Heather", 29] ]); |
function addMahZipCodez() { | |
// grab basic sheet data | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var rows = sheet.getDataRange(); | |
var numRows = rows.getNumRows(); | |
var values = rows.getValues(); | |
// init some locals for looping over each row | |
var row; |
Contours of San Francisco overlayed over OpenStreeMap vector tiles using code from mbostock's vector tiles with multiple layers example. View the hi-res file
See gist for code used to generate contours.
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="keywords" lang="de" content="Zeitleiste, Zeitlinie, Zeitkarte, Geschichte, Chronologie"> | |
<meta name="keywords" lang="en" content="Timeline, Timemap, History, Chronology"> | |
<title>Timeline - Proof-of-concept</title> | |
<!-- That's my local d3 path. When working locally, use your local path. --> |
This is free and unencumbered software released into the public domain. | |
Anyone is free to copy, modify, publish, use, compile, sell, or | |
distribute this software, either in source code form or as a compiled | |
binary, for any purpose, commercial or non-commercial, and by any | |
means. | |
In jurisdictions that recognize copyright laws, the author or authors | |
of this software dedicate any and all copyright interest in the | |
software to the public domain. We make this dedication for the benefit |
<string>(?:^\s+)?(<)((?i:script))\b(?![^>]*/>)</string> | |
=> | |
<string>(?:^\s+)?(<)((?i:script))\b(?!([^>]*text/template[^>]*|[^>]*/>))</string> |
require 'formula' | |
def raster? | |
ARGV.include? '--with-raster' | |
end | |
def topology? | |
ARGV.include? '--with-topology' | |
end |
# Install subversion | |
sudo apt-get -y install subversion | |
# Install g++ | |
sudo apt-get -y install g++ | |
# Install Hierarchical Data Format library | |
# NOTE: This library is not necessarily needed, but was required | |
# in order for this to compile against a clean Ubuntu 12.04 LTS system. | |
# I didn't need it on a clean EC2 Ubuntu 12.10 instance, so |
// This is the core part of Pitchfork.com's Backbone app. | |
// The autobahn object in particular is a great example of how to layer backbone on to a traditional, CMS-driven media site while maintaing server-side view rendering. | |
var p4k = window.p4k || {}; | |
$(function() { | |
var a = p4k.core = p4k.core || {}; | |
a.Task = function(c, b) { | |
this.fn = c; | |
this.initialize(b) | |
}; |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!