Skip to content

Instantly share code, notes, and snippets.

View anandthakker's full-sized avatar

Anand Eng-Thakker anandthakker

View GitHub Profile
var tb = require('tilebelt')
var turf = require('turf')
var columns = ['Zoom', 'Tile size at equator (km)', 'Resolution at equator (m)']
console.log(columns.join('|'))
console.log(columns.map((c) => c.replace(/./g, '-')).join('|'))
for (var z = 0; z < 22; z++) {
var tile = tb.tileToGeoJSON(tb.pointToTile(0, 0, z));
var area = turf.area(tile);
Zoom Tile size at equator (km) Resolution at equator (m)
0 22568 88155
1 11284 44078
2 7656 29904
3 4577 17881
4 2443 9544
5 1244 4861
6 625 2442
7 313 1223
@anandthakker
anandthakker / README.md
Last active January 22, 2016 04:08 — forked from mbostock/.block
Clipped Map Tiles

Hi Matt and Chris,

As we discussed last week, we've pulled together a bare-bones, pre-beta version of the "state card" component, to give you some time to work on page builder integration before the holidays. Docs and other info are here: http://dohdeick6sqa6.cloudfront.net/assets/alpha/index.html . Much of this is of course quite rough, but it should have enough of the under-the-hood functionality in place to be a good test integration.

Some notes:

  • The results data is indeed being requested every 30 seconds, but it's just pointing at static dummy data right now. We have dummy data set up for four raceIds: 2016-02-01-IA-16672, 2016-02-01-IA-16957, 2016-02-09-NH-31146, and 2016-02-09-NH-31796 -- that's one for each party for IA and NH.
  • Please disregard the visuals: i.e., colors are mindlessly auto-generated placeholders, map boundaries are low-precision stubs, etc.

Our thought is that if you're able to get this successfully integrated as a page builder feature, then we'd be able to update

@anandthakker
anandthakker / directions.md
Last active November 4, 2015 16:15
Development Seed DC Office Location

Our address is 1226 9th St. NW, but the entrance is actually around back: from that block of 9th street, look for Blagden Alley. As you walk into Blagden Alley there's a parking lot on your right; ours is the building right next to it, and we're up on the second floor

@anandthakker
anandthakker / bootstrap.sh
Last active October 16, 2015 16:08
Ubuntu bootstrap: tilelive-s3, mbtiles, tippecanoe, oam-catalog-grid
#!/bin/bash
set -e
sudo apt-get update
sudo apt-get install -y git build-essential
git clone https://github.com/anandthakker/dotfiles
cd dotfiles && git submodule update --init --recursive
cd ..
@anandthakker
anandthakker / index.html
Created September 22, 2015 21:56
Data driven style example with Mapbox GL
<!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.11.0/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.11.0/mapbox-gl.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
@anandthakker
anandthakker / index.html
Last active January 17, 2016 10:41
Hover styles with Mapbox GL
<!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.11.0/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.11.0/mapbox-gl.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }

Derek SSC

##Start

  1. Structured technical education for new and current team-members who are coders. Covers coding style, coding for readability and maintainability, and other best practices. Applies to anyone who joins us and is expected to code, more to those who are expected to code all/most of the time.

Right now we have a just-do-it approach where we throw them into the fire and call it teching up. We can't expect people to just osmosis this stuff. It can be more of a mentor/mentee approach or something else entirely, but we have to build time for it, by which I mean, if two people build something and one is expected to teach the other, it takes longer than if that first person just built it.

  1. Make someone the ZOD of communicating to the world what we're doing. This someone must not already be a fully-burdened team member.
#### Start IPython, generate SHA1 password to use for IPython Notebook server
$ ipython
Python 2.7.5 |Anaconda 1.8.0 (x86_64)| (default, Oct 24 2013, 07:02:20)
Type "copyright", "credits" or "license" for more information.
IPython 1.1.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.