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
var allPolygons = []; | |
function setPolys(geom) { | |
/* geom: a GeoJSON object. | |
Parse geom, and add it as a child to the global Raphael object, R. | |
*/ | |
//geom.type either Polygon or MultiPolygon | |
var translationFunction = function(coords) { | |
var projected = Projections.contiguous.forward(coords); | |
var x = 217+(projected[0]*190/2400000); |
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
==> Downloading http://postgis.refractions.net/download/postgis-1.5.2.tar.gz | |
File already downloaded in /Users/albert/Library/Caches/Homebrew | |
/usr/bin/tar xf /Users/albert/Library/Caches/Homebrew/postgis-1.5.2.tar.gz | |
==> ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/postgis/1.5.2 --with-projdir=/usr/local | |
./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/postgis/1.5.2 --with-projdir=/usr/local | |
configure: WARNING: unrecognized options: --disable-dependency-tracking | |
checking build system type... i386-apple-darwin10.7.0 | |
checking host system type... i386-apple-darwin10.7.0 | |
checking for gcc... /usr/bin/cc | |
checking whether the C compiler works... yes |
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
Unbrewed dylibs were found in /usr/local/lib. | |
If you didn't put them there on purpose they could cause problems when | |
building Homebrew formulae, and may need to be deleted. | |
Unexpected dylibs: | |
/usr/local/lib/libfreenect.0.0.1.dylib | |
/usr/local/lib/libfreenect_sync.0.0.1.dylib | |
/usr/local/lib/libntfs-3g.54.0.0.dylib | |
/usr/local/lib/libntfs.9.0.0.dylib |
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 re | |
from django import template | |
from django.utils.functional import allow_lazy | |
from django.template.defaultfilters import stringfilter | |
from django.utils.safestring import mark_safe, SafeData | |
from django.utils.encoding import force_unicode | |
from django.utils.html import escape | |
from django.utils.text import normalize_newlines | |
register = template.Library() |
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
# http://en.wikipedia.org/wiki/Pareto_interpolation | |
# Example Pareto interpolation to calculate household median income. | |
# Assumes that incomedata is a list of 17 elements containing table B19001 from the United States ACS 5-year summary file | |
from math import log | |
def calculate_median(incomedata): | |
bucket_tops = [10000, 15000, 20000, 25000, 30000, 35000, 40000, 45000, 50000, 60000, 75000, 100000, 125000, 150000, 200000] | |
total = incomedata[0] | |
for i in range(2,18): |
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
/* | |
VectorTileMapType implementing the Google Maps API V3 MapType Interface | |
http://code.google.com/apis/maps/documentation/javascript/maptypes.html#MapTypeInterface | |
Used for http://censusmapmaker.com/ | |
*/ | |
function VectorTileMapType() { | |
this.minZoom = 13; | |
this.maxZoom = 18; | |
} |
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
/* Author: Albert Sun | |
WSJ.com News Graphics | |
*/ | |
/*jslint white: false, nomen: false, debug: false, devel: true, onevar: false, plusplus: false, browser: true, bitwise: false, es5: true, maxerr: 200 */ | |
/*global jQuery: false, $: false, log: false, window: false, WSJNG: false, _: false, google: false, localStorage: false */ | |
// Necessary functions | |
if (!window.typeOf) { | |
window.typeOf = function(b){var a=typeof b;if(a==="object")if(b){if(b instanceof Array)a="array"}else a="null";return a}; |
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 redistricting.apps.features.models import CensusBlock, CensusTract, CensusCounty, DataBlock | |
from redistricting.utils import gmerc | |
from django.http import HttpResponse, Http404, HttpResponseForbidden | |
from django.contrib.gis.geos import GEOSGeometry | |
from django.shortcuts import render_to_response | |
from django.template.loader import render_to_string | |
from django.template import RequestContext |
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 django.contrib.gis.db import models | |
# generated by running ogrinspect against shapefiles | |
# ./manage.py ogrinspect ../state_tabblock_shapefiles/tl_2010_01_tabblock10/tl_2010_01_tabblock10.shp CensusBlock --srid=4326 --mapping --multi | |
# ./manage.py ogrinspect ../state_tract_shapefiles/tl_2010_01_tract10/tl_2010_01_tract10.shp CensusTract --srid=4326 --mapping --multi | |
class CensusBlock(models.Model): | |
statefp10 = models.CharField(max_length=2) | |
countyfp10 = models.CharField(max_length=3) |
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
How We Made Our Maps | |
http://meetupnyc.hackshackers.com/events/37680122/ | |
Presentation Links | |
http://censusmapmaker.com/draw/ | |
http://redistrictinggame.org/launchgame.php?level=basic&mission=1 | |
http://www.publicmapping.org/ |
OlderNewer