The City of Fresno is required by Municipal Code and State Law to keep the population of the council districts evenly balanced. At the decennial census, the area and boundaries of each district are checked against the new population count and, if necessary, changes are made to bring the populations back in to balance. The 2010 Census population count for the City of Fresno was 494,665 people. Therefore the ideal population of each of the seven districts will be 494,665 / 7, or about 70,666 people. This process was most recently completed by the City Council in response to the 2010 Census. You can view the Ordinance adopting the new Council District boundaries on the Fresno City Clerk’s Web site.
This exercise will verify the new council district boundaries by mapping the 2010 Census population counts of each district. To do this, we will use Free Open Source GIS tools. Quantum GIS (QGIS), a Free Open Source GIS desktop tool that can display ESRI Shapefiles and perform complex spatial analysis. Download and install QGIS if necessary. We will also use ogr2ogr to project the Census shape files. I’m on OSX, so I downloaded the latest (1.9) framework from KyngChaos.
City of Fresno maintains a Web site of publicly available GIS data. In addition to downloadable shape files, you can browse an online interactive map of City data. Click on Layers/Legend and turn on the City Council Districts Layer to see the current City council districts based on the Federal 2010 Census. The Official Council District Map is also available as a PDF file in the City of Fresno Planning Department Map Gallery. The PDF file is interesting because it shows the official color for each district, and the legend contains the actual population count for each district based on the 2010 Census.
The Federal Census provides a wealth of public information. Tabular data for the most recent (2010) census can be accessed through the American FactFinder. To use this data in GIS, we’ll need to download the appropriate Census shape files and join the tabular data to the spatial location in QGIS.
Where to get the data we need:
- City of Fresno Council Districts
- American FactFinder for Population table in CSV format for all block in the City of Fresno
- Census 2010 shapefiles for shape file of all blocks in Fresno County, California
After installing our tools and acquiring the appropriate data, we will follow these steps to find the population of each City of Fresno Council district:
- Project the Census Blocks layer to State Plane, and add to the map
- Add the Council Districts layer to our map
- Join the population data to the Census Blocks layer
- Join the Blocks to the Districts
- Dissolve the Blocks by District, and sum the population
Projecting the census data using ogr2ogr is necessary because local GIS data from the City of Fresno is projected into State Plane (the EPSG code is 2228 - NAD_1983_StatePlane_California_IV_FIPS_0404_Feet) and the Census data is not projected. Census data is GCS NAD 83 (EPSG 4269 - GCS_North_American_1983). Opening both of these shape files in a QGIS project window will not work–they will not overlap correctly.
We will use ogr2ogr to project the Census shape file to State Plane. Here is the ogr2ogr command we will use:
ogr2ogr -s_srs EPSG:4269 -t_srs EPSG:2228 outfile.shp infile.shp
We should now have both shape files displayed in QGIS. Zoom to the extents of the council districts shape file. In order to add the population data as an attribute of the census blocks shape file, add the CSV file to the map and create a join. After successfully joining the data, only the blocks inside the City of Fresno will contain information (because this is the only population information we downloaded). Therefore we can export the blocks with population data to a new shape file in order to create a shape file for only the City of Fresno, comprised of blocks attributed with population data.
In order to attribute each of the blocks with the council district, create a spatial join to your new blocks layer with the council districts layer. The result of this will be a new shape file of census blocks within the city of Fresno, attributed with the population count for the block and the council district it is in.
The final step is to dissolve the blocks back to council districts. However in QGIS when we do this we lose the other attribute information. Ideally, we’d be able to sum the population of the blocks as we dissolve on the council district field, but this is not possible in QGIS. One solution, described on the QGIS user mailing list, is to dissolve to districts in a new shape file, then import both shape file tables into a database, where grouping of population data by district is accomplished.
A slightly easier method, described on another mailing list, is to copy all the rows from the attribute table in QGIS and paste them into Excel. You can then filter on each district, and sum the population.

