Geo::Demo::Zipskinny - Census 2000 geographic and demographic data by ZIP code, courtesy of ZIPskinny.com


Geo-Demo-Zipskinny documentation  | view source Contained in the Geo-Demo-Zipskinny distribution.

Index


NAME

Top

Geo::Demo::Zipskinny - Census 2000 geographic and demographic data by ZIP code, courtesy of ZIPskinny.com

SYNOPSIS

Top

  use Geo::Demo::Zipskinny;
  my $zip = new Geo::Demo::Zipskinny();

  #get the stats page from zipskinny.com over the network
  my $stats = $zip->get('90232');
  #alternatively, read a local copy
  #my $stats = $zip->parse($html);

  #population of the zip code
  my $pop   = $stats->{'general'}{'population'};

  #fractions 0-1 inclusive
  my $asian = $stats->{'race'}{'Asian'};
  my $k250  = $stats->{'income'}{'200000+'};

  my $asian_count = $pop * $asian;
  my $k250_count  = $pop * $k250;

  use Data::Dumper;
  print Data::Dumper::Dumper( $stats );

DESCRIPTION

Top

Use this for quick access to some ZIP code centric demographic data. ZIPskinny.com claims to have built the site from the Census 2000 data freely available from http://census.gov.

I chose to write this screen scraper after several unproductive hours spent poring over the (copious and dry) census docs and unsuccessfully trying to grok the SF3 files.

AUTHOR

Top

Allen Day, <allenday@ucla.edu>

COPYRIGHT AND LICENSE

Top


Geo-Demo-Zipskinny documentation  | view source Contained in the Geo-Demo-Zipskinny distribution.