NodeJS micro-services for retrieving nation-wide Census Data from the Colorado Demography Office database.
Here is an inventory of the files in this repo:
demog.js allows for a query of any of the currently available datasets. Output is in either CSV or JSON.
geojson.js is similar to demog.js but accepts arguments for bounding box information and map-zoom level. Ideal for creating mapping applications. Output is in GeoJSON.
meta.js retrieves metadata information.
Address: /demog?
db: currently valid are acs1014, acs0913, acs0812, c2010, c2000, c1990, c1980. Default is acs0913
type: json or csv (default is json)
schema: no need to specify if using acs or 2010 census. specify sf1 or sf3 for 1980, 1990, and 2000 census. If you don't specify it will assume sf1.
field: comma delimited list of fields. If you specify fields, table parameter will be ignored. 1980 census format ex: t01001,t11003,t38013 1990, 2000, 2010 census format ex: p1001,p20003,h17a001
table: comma delimited list of tables. 1980 census format ex: t01,t11,t38 1990, 2000, 2010 census format ex: p1,p20,h17a
sumlev: 40 is state, 50 is county, 140 is tract, 150 is block group, 160 is place
state: any state (integer format, no leading zeros).
county: any county (integer format, no leading zeros). would be smart to also specify state.
geoid: comma delimited list. (no quotes, leading zeros are necessary) example: '08' is Colorado, '08031' is Denver County , '08031000701' is a Census Tract in Denver County, and '080010078011' is a block group in Adams County, and '0668154' is the city of San Luis Obispo, CA. (You can also use the integer format for geoid –geonum- by prefixing the geoid with ‘1’. San Luis Obispo would then be 10668154. There are good but technical reasons why I strongly favor the alternate format).
limit: by default, limit is set to 100 records. you can override it by specifying a new limit (not required)
moe: set moe=yes to add margin of error fields for acs databases (not required)
example: (return csv of sex by age table from acs0812 for delaware)
https://gis.dola.colorado.gov/capi/demog?db=acs0812&table=b01001&sumlev=140&state=10&type=csv
example: (return json for median home value for 1980 census for places in vermont)
https://gis.dola.colorado.gov/capi/demog?db=c1980&table=t38&sumlev=160&state=50
example: (return json for median age for 2010 census for San Luis Obispo, CA)
https://gis.dola.colorado.gov/capi/demog?db=c2010&table=p13&geonum=10668154
Address: /geojson?
db: currently valid are acs1014, acs0913, acs0812, c2010, c2000, c1990, c1980. Default is acs0913
schema: no need to specify if using acs or 2010 census. specify sf1 or sf3 for 1980, 1990, and 2000 census. If you don't specify it will assume sf1.
field: comma delimited list of fields. If you specify fields, table parameter will be ignored. 1980 census format ex: t01001,t11003,t38013 1990, 2000, 2010 census format ex: p1001,p20003,h17a001
table: comma delimited list of tables. 1980 census format ex: t01,t11,t38 1990, 2000, 2010 census format ex: p1,p20,h17a
sumlev: 40 is state, 50 is county, 140 is tract, 150 is block group, 160 is place (required)
state: any state (integer format, no leading zeros).
county: any county (integer format, no leading zeros). would be smart to also specify state.
geoid: comma delimited list. (no quotes, leading zeros are necessary) example: '08' is Colorado, '08031' is Denver County , '08031000701' is a Census Tract in Denver County, and '080010078011' is a block group in Adams County, and '0668154' is the city of San Luis Obispo, CA.
limit: by default, limit is set to 100 records. you can override it by specifying a new limit (not required)
moe: set moe=yes to add margin of error fields for acs databases (not required)
zoom: specify the zoom level of the map (from 3 to 16) to return geometry appropriate to that zoom level. Currently required - will fix this to default to no simplification.
bb: bounding box coordinates of geojson search ex: bb=-105,40,-104,39 (not required)
example query: (counties in colorado that intersect a specific bounding box, plus data from table p1 of 1990 census)
Address: /meta?
db: currently valid are acs1014, acs0913, acs0812, c2010, c2000, c1990, c1980. Required - no default
schema: specify 'sf1' or 'sf3' for c1980, c1990, and c2000. Specify 'data' for c2010, acs0913, acs0812. Required - no default
example query: (table metadata for 1990 Census Summary File 1)