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 ...


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.


9

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


9

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


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

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

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", ...


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

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 ...


7

What you're trying to do is known as apportionment. This takes a numerical attribute value of a feature and divides it in some way between pieces that feature is split into. There are a number of different solutions. In fact, there's a specific tool for it in the Business Analyst extension, but you probably don't have that. Esri has also published a ...


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

In PostGIS, if you have a table of points, and the census boundary information that @Sminbamangu refers to you could calculate this using the following approach: SELECT c.census_tract, p.point_id FROM census_boundary as c, table_of_points as p WHERE ST_Contains(c.geom, p.geom); You can see the description ST_Contains ...


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 ...


5

Downvote me if I'm wrong, but the GEOID is a concatenation of a bunch of fields as noted in the summary file documentation on page 13. In the geographic area codes, you'll be looking for fields at positions 26-65.


5

It turns out that I needed to add a WHERE ST_Intersects to my ST_Intersection Query, as follows: SELECT sum(((st_area (st_intersection (p.the_geom,c.the_geom))/st_area(c.the_geom))*ci.pop2000)) AS Parcels_pop FROM parcel_proj p, census_proj c, tgr39035sf1blk ci WHERE ST_Intersects(p.the_geom,c.the_geom) and ci.stfid=c.stfid; This may not matter for others ...


5

The U.S. Census Bureau's TIGER Products have free shapefiles for the American Community Survey 5-Year Estimates and other datasets. These include several measures of income and poverty, including "Poverty Status In The Past 12 Months By Household Type By Age Of Householder", "Poverty Status Of Individuals In The Past 12 Months By Living Arrangement", and "...


5

Try NHGIS, which allows you to get blocks for all states. Set the filters as I have done in the attached screen shot.


5

The Census Bureau has prepared so-called "Relationship Files" that describe the geographic relationships between geographies (including tracts) at different times. This includes a lot of information for going between the two datasets by population or land area (a complete list is below). In your case, since you're trying to go from 1990 to 2010, you will ...


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