Skip to content

Instantly share code, notes, and snippets.

ftp://ftp2.census.gov/geo/tiger/TIGER2010/TABBLOCK/2010/tl_2010_01_tabblock10.zip
ftp://ftp2.census.gov/geo/tiger/TIGER2010/TABBLOCK/2010/tl_2010_02_tabblock10.zip
ftp://ftp2.census.gov/geo/tiger/TIGER2010/TABBLOCK/2010/tl_2010_04_tabblock10.zip
ftp://ftp2.census.gov/geo/tiger/TIGER2010/TABBLOCK/2010/tl_2010_05_tabblock10.zip
ftp://ftp2.census.gov/geo/tiger/TIGER2010/TABBLOCK/2010/tl_2010_06_tabblock10.zip
ftp://ftp2.census.gov/geo/tiger/TIGER2010/TABBLOCK/2010/tl_2010_08_tabblock10.zip
ftp://ftp2.census.gov/geo/tiger/TIGER2010/TABBLOCK/2010/tl_2010_09_tabblock10.zip
ftp://ftp2.census.gov/geo/tiger/TIGER2010/TABBLOCK/2010/tl_2010_10_tabblock10.zip
ftp://ftp2.census.gov/geo/tiger/TIGER2010/TABBLOCK/2010/tl_2010_11_tabblock10.zip
ftp://ftp2.census.gov/geo/tiger/TIGER2010/TABBLOCK/2010/tl_2010_12_tabblock10.zip
ftp://ftp2.census.gov/geo/tiger/TIGER2010/TRACT/2010/tl_2010_78_tract10.zip
ftp://ftp2.census.gov/geo/tiger/TIGER2010/TRACT/2010/tl_2010_72_tract10.zip
ftp://ftp2.census.gov/geo/tiger/TIGER2010/TRACT/2010/tl_2010_69_tract10.zip
ftp://ftp2.census.gov/geo/tiger/TIGER2010/TRACT/2010/tl_2010_66_tract10.zip
ftp://ftp2.census.gov/geo/tiger/TIGER2010/TRACT/2010/tl_2010_60_tract10.zip
ftp://ftp2.census.gov/geo/tiger/TIGER2010/TRACT/2010/tl_2010_56_tract10.zip
ftp://ftp2.census.gov/geo/tiger/TIGER2010/TRACT/2010/tl_2010_55_tract10.zip
ftp://ftp2.census.gov/geo/tiger/TIGER2010/TRACT/2010/tl_2010_54_tract10.zip
ftp://ftp2.census.gov/geo/tiger/TIGER2010/TRACT/2010/tl_2010_53_tract10.zip
ftp://ftp2.census.gov/geo/tiger/TIGER2010/TRACT/2010/tl_2010_51_tract10.zip
{
"color_scheme": "Packages/Future Funk - Color Scheme/Future Funk (Blue Monday).tmTheme",
"flatland_sidebar_tree_xsmall": true,
"flatland_square_tabs": true,
"font_size": 14,
"ignored_packages":
[
"Vintage"
],
"tab_size": 2,
@ian29
ian29 / ship.md
Last active August 29, 2015 14:15
Name Units Code Level Source Update Frequency
Temperature C* TMP 80m GFS 0.25 6 Hrs
Snow Depth M SNOD Surface HRRR Hourly
Wind Gust M/s GUST Surface GFS 6 Hrs
Total Precipitation kg/m^2 APCP Surface HRRR Hourly
@ian29
ian29 / scale.md
Created August 27, 2014 14:52
scale, the z() function, zoom levels

scale, and selecting specific zoom levels

Mapnik is very smart about converting map scale to zoom level. As a secret/power user feature, Mapnik exposes a !scale_denominator! variable that changes according to the zoom level and + latitude of the vector tile being rendered. Read about the Mapnik's !scale_denominator! variable here.

With some postgres magic, the !scale_denominator lets us control which features appear and disappear, within a layer.

Concretely this is a two-part process. First you will need to load the following z() function into your PostGIS database:

CREATE OR REPLACE FUNCTION public.z(scaledenominator numeric)
Get:1 http://us-east-1.ec2.archive.ubuntu.com precise Release.gpg [198 B]
Get:2 http://us-east-1.ec2.archive.ubuntu.com precise-updates Release.gpg [198 B]
Get:3 http://us-east-1.ec2.archive.ubuntu.com precise Release [49.6 kB]
Get:4 http://security.ubuntu.com precise-security Release.gpg [198 B]
Get:5 http://us-east-1.ec2.archive.ubuntu.com precise-updates Release [49.6 kB]
Get:6 http://security.ubuntu.com precise-security Release [49.6 kB]
Get:7 http://us-east-1.ec2.archive.ubuntu.com precise/main Sources [934 kB]
Get:8 http://security.ubuntu.com precise-security/main Sources [96.7 kB]
Get:9 http://security.ubuntu.com precise-security/universe Sources [30.9 kB]
Get:10 http://security.ubuntu.com precise-security/main amd64 Packages [357 kB]
select qs_a0,count(distinct(cast(match as text))) from
( select qs_a0,regexp_matches(left(qs_a1_lc,3), '[A-Z]*','g') as match from tmpqsadm1 ) as foo
where match <> '{""}'
group by qs_a0
order by qs_a0;
qs_a0 | count
--------------------------------------+-------
Afghanistan | 1
Get:1 http://us-east-1.ec2.archive.ubuntu.com precise Release.gpg [198 B]
Get:2 http://us-east-1.ec2.archive.ubuntu.com precise-updates Release.gpg [198 B]
Get:3 http://security.ubuntu.com precise-security Release.gpg [198 B]
Get:4 http://security.ubuntu.com precise-security Release [49.6 kB]
Get:5 http://us-east-1.ec2.archive.ubuntu.com precise Release [49.6 kB]
Get:6 http://us-east-1.ec2.archive.ubuntu.com precise-updates Release [49.6 kB]
Get:7 http://us-east-1.ec2.archive.ubuntu.com precise/main Sources [934 kB]
Get:8 http://security.ubuntu.com precise-security/main Sources [95.7 kB]
Get:9 http://security.ubuntu.com precise-security/universe Sources [30.5 kB]
Get:10 http://us-east-1.ec2.archive.ubuntu.com precise/universe Sources [5019 kB]
Get:1 http://us-east-1.ec2.archive.ubuntu.com precise Release.gpg [198 B]
Get:2 http://us-east-1.ec2.archive.ubuntu.com precise-updates Release.gpg [198 B]
Get:3 http://security.ubuntu.com precise-security Release.gpg [198 B]
Get:4 http://security.ubuntu.com precise-security Release [49.6 kB]
Get:5 http://us-east-1.ec2.archive.ubuntu.com precise Release [49.6 kB]
Get:6 http://us-east-1.ec2.archive.ubuntu.com precise-updates Release [49.6 kB]
Get:7 http://us-east-1.ec2.archive.ubuntu.com precise/main Sources [934 kB]
Get:8 http://security.ubuntu.com precise-security/main Sources [95.7 kB]
Get:9 http://security.ubuntu.com precise-security/universe Sources [30.5 kB]
Get:10 http://us-east-1.ec2.archive.ubuntu.com precise/universe Sources [5019 kB]
Get:1 http://us-east-1.ec2.archive.ubuntu.com precise Release.gpg [198 B]
Get:2 http://us-east-1.ec2.archive.ubuntu.com precise-updates Release.gpg [198 B]
Get:3 http://security.ubuntu.com precise-security Release.gpg [198 B]
Get:4 http://security.ubuntu.com precise-security Release [49.6 kB]
Get:5 http://us-east-1.ec2.archive.ubuntu.com precise Release [49.6 kB]
Get:6 http://us-east-1.ec2.archive.ubuntu.com precise-updates Release [49.6 kB]
Get:7 http://us-east-1.ec2.archive.ubuntu.com precise/main Sources [934 kB]
Get:8 http://security.ubuntu.com precise-security/main Sources [95.7 kB]
Get:9 http://security.ubuntu.com precise-security/universe Sources [30.5 kB]
Get:10 http://us-east-1.ec2.archive.ubuntu.com precise/universe Sources [5019 kB]