As of May 31, 2023, we have updated our Code of Conduct.

Hot answers tagged

19 votes

Joining polygons in R

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 ...
sebdalgarno's user avatar
  • 1,673
16 votes
Accepted

Why is there no state with code "03" (among other missing numbers)?

These are Federal Information Processing Standard (FIPS) state codes, and the ones you mention are missing because, from the wiki: "certain numeric codes "are reserved for possible future use in ...
Kartograaf's user avatar
  • 2,759
12 votes

Seeking shapefile of city boundaries in US?

Getting the Data You can acquire US Census Place Data, which includes cities, here. For instance, Rhode Island's 2017 Place Data is available here. For ease of bulk downloading, the full list 2017 ...
Richard's user avatar
  • 1,801
8 votes

Concatenating two fields (type double) into single field?

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 ...
Tom's user avatar
  • 4,108
7 votes
Accepted

List of Most Populated US Census Designated Places

These data are available from the 2010 Census or the 2014-2018 American Community Survey (ACS) 5-year estimates. (1 year data are only for places with 60,000 population or more, so you need to use the ...
JamiRae's user avatar
  • 372
6 votes

Downloading US Census data?

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. ...
cl3's user avatar
  • 1,936
5 votes

QGIS's "Points in Polygon" counts zero in every census tract

Save both files as the same CRS. Load each of the files and then run points in polygon with the newly loaded files. The project on the fly is a visual aid. When running analysis it will use the CRS of ...
dustinturp's user avatar
5 votes
Accepted

Identify Census blocks inside urban areas (using pyshp or similar)

I have written a set of scripts to solve this problem and have published the output in case anyone else needs it. See the bottom of this answer for details. GeospatialPython.com pointed me in the ...
Max Masnick's user avatar
5 votes
Accepted

ogr2ogr encoding on Windows using os4geo shell with Census data

There is. If on windows simply run: set PGCLIENTENCODING=LATIN1 In the command line before running your ogr2ogr command. If your on Linux, you need to run: export PGCLIENTENCODING=LATIN1;
HeikkiVesanto's user avatar
5 votes
Accepted

CRS for US Census 1999 ShapeFile

US census data is almost always in NAD 1983 (EPSG:4269). You'll see the same distortion with 4269. Both 4269 and 4326 are geographic coordinate reference systems. They are probably displayed using ...
mkennedy's user avatar
  • 18.6k
5 votes

Migrating US Census GDB file to PostGIS -- ERROR: tables can have at most 1600 columns

I would definitely re-think how you store your Census data in PostGIS. The ArcGIS-ready tables are unnecessarily massive, as you're finding out. We store our census tables separately with geometry ...
DPSSpatial_BoycottingGISSE's user avatar
4 votes
Accepted

After turning census block data into a raster, how do I redistribute the density to reflect land cover types

You have two inputs: A polygon layer of Census counts. A classified land cover layer. You would like to perform a kind of dasymetric mapping in which the output is a density raster. It has two ...
whuber's user avatar
  • 69k
4 votes

Downloading US Census data?

The American Factfinder is going to be the most comprehensive source for downloading current US Census data. It's also going to include the identifiers that you need to join the attributes to the ...
fdonnelly's user avatar
  • 473
4 votes
Accepted

Joining attributes in 100s SHPs back to main SHP file batch in QGIS

I would also recommend using PostGIS as mentioned by DPSSpatial but in QGIS, you could use a bit of python to loop through all your layers and perform a joins operation. It uses a common field to ...
Joseph's user avatar
  • 74.6k
4 votes
Accepted

Understanding U.S. Census MSA to place relationships?

According to the U.S. Census, "Counties or equivalent entities form the geographic 'building blocks' for metropolitan and micropolitan statistical areas throughout the United States and Puerto Rico." ...
syre's user avatar
  • 387
4 votes
Accepted

Working around US Census site blocking of IP addresses?

To simplify the download on multiple machines, you can use more advanced downloading tool (such as aria2c) that supports resume etc., and have a script continuously download the dataset from a file of ...
laser's user avatar
  • 958
4 votes
Accepted

How retrieve blocks for Guam?

Go to that website. Press Ctrl+a Press Ctrl+c Open a text editor (notepad++ should work) Press Ctrl+v Remove the header line (until MTFCC) Save as any_filename.csv You will have a tab-separated (C)SV ...
pLumo's user avatar
  • 6,329
4 votes

What part of the Census Block is the County?

Your example is missing one character (it is 15 in total). In California it should be 060070004024003 (starting with 06; see here). The first and second digits identify the state. The third, fourth ...
Andre Silva's user avatar
  • 10.1k
4 votes
Accepted

Advice on normalizing census data in choropleth maps

I think the first approach (divide the total population with hearing loss within a state by the state's total population) is the best way to go. Here is my take on the different ways one could ...
Nick's user avatar
  • 1,563
3 votes
Accepted

Looking for Employment Density Data: Employees per unit of area by industry by county (USA)

Added per request... Have you tried census.gov, and/or American Fact Finder? You generally have to get the data table and join it to the geographic file (block, tract, group, etc). Not all data is ...
recurvata's user avatar
  • 2,260
3 votes

Having trouble matching up U.S. Census shapefiles in QGIS

The Census geographies follow a strict hierarchy. Doing this as a simple attribute join using a link table will be much faster than doing it as a spatial join, and, as you have discovered also more ...
Lee Hachadoorian's user avatar
3 votes
Accepted

Finding census block for given address using Tiger geocoder

@Akhil answered his/her own question but I wanted to post this clearly for posterity in case others find themselves combing through comments to figure this out like I did. TL/DR answer: SELECT ...
aaryno's user avatar
  • 826
3 votes

What is the smallest US geographic region with income data?

The one caution around using block group level data from the American Community Survey (which is a great resource!) is that the sample sizes are pretty small and you have to watch your margins of ...
epilady's user avatar
  • 31
3 votes

Specification for US Census GEOID

After several years, I finally created my own code to build a schema. However, it is currently embedded in a python library, so it isn't generally usable as a spec. Here is the geoid module, which ...
Eric Busboom's user avatar
3 votes

Identify Census blocks inside urban areas (using pyshp or similar)

I'm the author of PyShp. What you are trying to do is very standard GIS stuff. Download QGIS. It is basically the open-source ArcGIS. It bundles all of the best of breed open source GIS tools into a ...
GeospatialPython.com's user avatar
3 votes

How can I eliminate leftover border/boundary in QGIS?

You could try using Symetrical Difference as this, for me atleast, sometimes removes unwanted slivers if I receive them from the Difference tool. If not then you could try from QGIS: Eliminate Sliver ...
Joseph's user avatar
  • 74.6k
3 votes
Accepted

How can I eliminate leftover border/boundary in QGIS?

You can speed up the manual clean up process a bit by creating a virtual field on your final layer and populating it with the area of each feature ($area in field calculator). Then sort the attribute ...
SpatialSuccess's user avatar
3 votes
Accepted

Where can I find geodata for the Russian терсон-мо or терсон-ате census units? Or: can osm_admin polygons be linked to those?

As I could see, you could crossreferene osm data with терсон names. For instance: Верхнеколымский улус from http://std.gmcrosstata.ru matches with http://atd.osm.rambler.ru/r1399830.html and there ...
dmitry.v.kiselev's user avatar
3 votes
Accepted

How do I reverse geocode Census Block group from 15 character FIPS Code to LATLONG?

Not sure which software you are using. This can be accomplished by getting the centroids of the Census Block Group polygons.
Maksim's user avatar
  • 6,906
3 votes
Accepted

ST_Intersection between MultiPolygon tables leads to gaps, missing intersections

Since ST_Intersection gives geometrycollections in cases where the result gives more than one type of geometry (this happens especially when intersecting near-equal geometries), you have to extract ...
tilt's user avatar
  • 3,267

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