Skip to content

Commit

Permalink
Fetch per state data, instead of country wide, as the state files hav…
Browse files Browse the repository at this point in the history
…e more metadata in them.
  • Loading branch information
bramp committed Sep 8, 2012
1 parent 262f80f commit bd425dc
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions fetch_tiger2010.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// by Andrew Brampton 2011
//
// I created this because a lot of the TIGER data is in multiple files, for example,
// the county data is broken down by state, and in one large US file. This will only
// fetch the large US file.
// the county data is broken down by state, and in one large US file.
// This will download the most complete data possible.

$tiger_ftp = 'ftp2.census.gov';
$tiger_path = '/geo/tiger';
Expand All @@ -16,7 +16,8 @@
'cbsa' => array(
'name' => 'Metropolitan/Micropolitan Statistical Area',
'path' => 'TIGER2010/CBSA',
'regex' => '/_us_.+\.zip$/',
//'regex' => '/_us_.+\.zip$/',
'regex' => '/_\d{2}_.+\.zip$/',
),
'bg' => array(
'name' => 'Block Group',
Expand All @@ -26,12 +27,14 @@
'csa' => array(
'name' => 'Combined Statistical Area',
'path' => 'TIGER2010/CSA',
'regex' => '/_us_.+\.zip$/',
//'regex' => '/_us_.+\.zip$/',
'regex' => '/_\d{2}_.+\.zip$/',
),
'cd' => array(
'name' => 'Congress Districts',
'path' => 'TIGER2010/CD',
'regex' => '/_us_.+\.zip$/',
//'regex' => '/_us_.+\.zip$/',
'regex' => '/_\d{2}_.+\.zip$/',
),
'state' => array(
'name' => 'State',
Expand All @@ -41,17 +44,20 @@
'county' => array(
'name' => 'County',
'path' => 'TIGER2010/COUNTY',
'regex' => '/_us_.+\.zip$/',
//'regex' => '/_us_.+\.zip$/',
'regex' => '/_\d{2}_.+\.zip$/',
),
'cnecta' => array(
'name' => 'Combined New England City and Town Area',
'path' => 'TIGER2010/CNECTA',
'regex' => '/_us_.+\.zip$/',
//'regex' => '/_us_.+\.zip$/',
'regex' => '/_\d{2}_.+\.zip$/',
),
'necta' => array(
'name' => 'New England City and Town Area',
'path' => 'TIGER2010/NECTA',
'regex' => '/_us_.+\.zip$/',
//'regex' => '/_us_.+\.zip$/',
'regex' => '/_\d{2}_.+\.zip$/',
),
'elsd' => array(
'name' => 'Elementary School District',
Expand Down Expand Up @@ -96,7 +102,8 @@
'zcta5' => array(
'name' => 'ZIP Code Tabulation Areas',
'path' => 'TIGER2010/ZCTA5',
'regex' => '/_us_.+\.zip$/',
//'regex' => '/_us_.+\.zip$/',
'regex' => '/_\d{2}_.+\.zip$/',
),
);

Expand Down

0 comments on commit bd425dc

Please sign in to comment.