Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Hot answers tagged

38

The following solution is based on a post by Roger Bivand on R-sig-Geo. I took his example replacing the German shapefile with some census data from Oregon you can download from here (take all shapefile components from 'Oregon counties and census data'). Let's start with loading the required packages and importing the shapefile into R. # Required packages ...


29

It is on the new version of American Factfinder and don't feel bad, even Census Bureau employees are confounded by the new site. Example for population and housing for Newark, DE: Go to http://factfinder2.census.gov Choose 'Advanced Search' > 'Show Me All' Start searching for the theme you're after: Under Topics choose People > Basic Count/Estimate > ...


18

The first step to determining the correct projection of any layer, is to find the projection information, if any, that came with your layer. In the case of a Shapefile, like what you downloaded from Census.gov, that information is contained in a .prj file, short for Projection. Here are the contents of the projection file from the census data: GEOGCS["...


16

Ok Ben, here are my assumptions: 1) You've already got your data (I had some address points in a shapefile, and I downloaded census tract and census block shapefiles for Missouri). 2) You've already geocoded your address points and you're comfortable projecting the data. 3) You're comfortable with an OGR/PostGIS solution (both free). Here are some ...


16

I found this metadata file indicating: C = County I = Interstate M = Common Name O = Other S = State recognized U = U.S.


10

You want to assemble a nationwide set in one file? For how many variables? There are a few hoops to get over to actually connect the STFIDs in your shapefile with the data. I couldn't read if your primary problem is decoding the naming schemes of the files and figuring out what is in each, or if it was about relating the primary keys of the shape file and ...


9

The FCC has an API: http://www.fcc.gov/developer/census-block-conversions-api


9

UPDATE The new files are now available and known as "Cartographic Boundary Files". More detail on the other types here http://www.census.gov/geo/maps-data/data/tiger.html The County file discussed above is available here: http://www.census.gov/geo/maps-data/data/cbf/cbf_counties.html The official file is not currently available as of 5-12-2011, but ...


9

If you want to use Census tracts the good people at Brown University have already done the hard work for you: Brown University Longitudinal Tract Database This resource contains tract-level variables from 1970-2000 interpolated to 2010 boundaries, facilitating longitudinal analysis.


9

GEOID is the field used to join TIGER/Line geographic data to the demographic data in various American Community Survey products and in the Decennial Census. It is slightly confused by the fact that this field is called GEOID10 only in the TIGER/Line 2010 products (in fact, almost all of the field names in TIGER/Line 2010 end in 10), and by the fact that the ...


8

They are available on the Census FTP site at http://www2.census.gov/geo/tiger/TIGER2010BLKPOPHU/


8

http://www.census.gov/geo/www/tiger/tgrshp2010/tgrshp2010.html allows you to download census blocks by county. Update: the TIGER/shapefiles does not have any demographic data - if that's what you are looking for you would need American FactFinder.


8

The TIGER data from the census bureau is available at http://www.census.gov/geo/www/tiger/


8

You can download Census Blocks from TIGER; you'll just have to download the data on a state-by-state basis and merge it all together. EDIT: See this page for block-level shapefiles that already have the population and housing unit counts attached, so you don't have to deal with joining SF1 tables!


8

The FCC census block conversion API is exactly what you're looking for.


8

Basically, you can do the extract using ogr2ogr as long as you give the Census tract ID, so it's really an issue of getting 72,000 ogr2ogr calls. ogr2ogr -where "tract = '<tract_id>'" /dest_folder /source_folder block_shapefile -nln block_shapefile_<tract_id> Notes: You don't have to specify the source format, ogr2ogr will figure it out. You ...


8

Your output field should be a text field. If you set the field calculator's parser to Python, you could enter this for the formula: '{}.{}'.format( !TractField! , !BlockField! ) If they really are double fields storing integer IDs for tracts and blocks, then enter: '{}.{}'.format( int(!TractField!) , int(!BlockField!) ) If they are double fields storing ...


7

PostgreSQL has a column limit of between 250 and 1600 "depending on column types", and supports spatial data and queries with the PostGIS extension. So I would be inclined to do two things: First, where a column represents a category rather than free text, create a separate table with those categories, and replace the column with an integer ID and foreign ...


7

I recently dealt with the exact same issue with Statistics Canada census profile CSV files containing 2172 columns. You can import your csv into an ESRI File Geodatabase (FGDB) if you have access to ArcGIS. According to ESRI, the FGDB format can handle 65,534 fields in a feature class or table. In my case, I was able to import my 2172 column wide CSV file ...


7

Here is a solution using the sf package: library(tidycensus) library(dplyr) library(sf) library(ggplot2) # get data from tindycensus for demonstration (note you need an API key, folow instructions here: https://walkerke.github.io/tidycensus/articles/basic-usage.html) census <- tidycensus::get_acs(geography = "tract", variables = "B19013_001", ...


7

Very interesting question! I'd note that the geography area calculation is extremely close (in your last example, 3 msq difference over an area of 20000000 msq. (0.000015%) Since we know that census manages its data inside Oracle Spatial, I'd guess that what you're seeing is a very small difference in the implementation of geodetic area calculation between ...


6

I don't know what an STFID is and I have pretty intimate knowledge of the Census counts. The geography file has a record for every geographical unit. There's one for the entire state, for every county, for every tract, for every block etc. Each is uniquely identified by a LOGRECNO. The LOGRECNO will be unique in the geo file. The other files have all of ...


6

I'd recommend using the ACS Summary File Retrieval Tool. It's a macro-enabled Excel workbook that allows for the batch downloading of ACS data for all tracts and block groups within an entire state. This makes it more powerful than the FactFinder website, but it does the downloading of the text files and linking LOGRECNOs for you. Takes less than 30 seconds ...


6

I don't think I can directly link, but what you want is American Community Survey Table S1810 with New Mexico County Geography. Start here: http://factfinder2.census.gov/faces/nav/jsf/pages/searchresults.xhtml?refresh=t Enter S1810 for your search topic. This should give you four tables named Disability Characteristics. From the options on the left, now ...


6

While some districts may follow block group, tract or even county boundaries, many of them (probably most -- might depend on the individual state) were based on block-level data. Since the districts have to be drawn based on Census data, and since the smallest level of geography the Census Bureau uses is the block, there should be no districts that violate ...


6

The Short Answer: No. Census Tracts do change over time (Especially from 2000 to 2010 when in many cases they appear to be essentially redrawn). You can use the faces files to compare the same geographic area with its 2000 Census and 2010 Census assignment using dissolve techniques. You can also check out the relfiles to compare 1990 Census with 2000 Census ...


6

From the US Census http://www.census.gov/popclock/ it appears to be updated by the second.


6

American Fact Finder data (tabular) needs to be joined to TIGER data. The TIGER data delineates the boundaries you are working with, be it State, County, MCD, Census tracts, block groups, blocks, etc. Once you have the data joined through a common field you can start examining the relationships between the data.


5

To get a whole state's data, you can use the ftp option here: http://www.census.gov/rdo/data/2010_census_redistricting_data_pl_94-171_summary_files.html That's probably overkill, but since with FactFinder you 1) can't select a town's blocks by themselves (only cities or counties) and 2) can't download (in my experience) a whole county's blocks through ...


5

From http://www.census.gov/newsroom/releases/archives/2010_census/cb11-cn151.html, there's a link for the Census Bureau's FTP site. You'll have to know how to decipher the file names to get what you want, but since you're looking for bulk data, I assume you know how to do that. You'll want an FTP client for bulk download. Then you can use your unzipper to ...


Only top voted, non community-wiki answers of a minimum length are eligible