Example 3: Search for Location and Containment Data Request

Updated by PolicyMap

Search for a zip code, identify census tracts within, and show data for each tract.
The query string below is used to search for the zip code of 08065, return the census tracts within the zip code, and display the percentage of persons who are Hispanic or Latino in each tract.

ty=data&t=sch,ind&sbt=7&ss=08065&cbt=6&ii=9868944

Definition of parameters in string
  • ty: The service type, which in this case is 'data': a JSON string.
  • t: The data sub type. A single or comma-delimited set of sub types. In this example; sch=search for a location and ind=data requested.
  • sbt: The search boundary type. A single or comma-delimited set of numbers. Required when using the containment boundary type in a search (sch) request. In this example, 7 is the code for zip code tabulation areas.
  • ss: The search search string. A free-form URL encoded string or integer representing a FIPS code. In this example, we are searching for the zip code: 08065
  • cbt: The containment boundary type. A single or comma-delimited set of numbers. Specifying this parameter causes a request to chain internally and derive all boundaries of this type that are contained* within any boundaries specified in the initial request. (* Only matches if the boundary is 100% contained). In this example; 6=census tracts
  • ii: The indicator id(s). A single or comma-delimited set of numbers. In this example; 9868944 is the percentage of persons who are Hispanic or Latino.
Results of the query string
{
"responseCode": 200,
"sch": {
"boundaries": [
{
"boundary": {
"id": 697383372,
"identifier": "08065",
"name": "08065",
"type": {
"boundaryType": {
"id": 7,
"definitionId": 1257
}
},
"state": "NJ"
}
}
]
},
"bnd": {
"boundaries": [
{
"boundary": {
"id": 697085032,
"identifier": "34005700102",
"name": "34005700102",
"overlapPercentage": "100",
"type": {
"boundaryType": {
"id": 6,
"definitionId": 1255,
"type": "Census Tract"
}
}
}
},
{
"boundary": {
"id": 697084837,
"identifier": "34005700103",
"name": "34005700103",
"overlapPercentage": "100",
"type": {
"boundaryType": {
"id": 6,
"definitionId": 1255,
"type": "Census Tract"
}
}
}
},
{
"boundary": {
"id": 697084393,
"identifier": "34005700104",
"name": "34005700104",
"overlapPercentage": "100",
"type": {
"boundaryType": {
"id": 6,
"definitionId": 1255,
"type": "Census Tract"
}
}
}
}
]
},
"ind": {
"boundaries": [
{
"boundary": {
"id": 697085032,
"identifier": "34005700102",
"name": "34005700102",
"overlapPercentage": "100",
"type": {
"boundaryType": {
"id": 6,
"definitionId": 1255,
"type": "Census Tract"
}
},
"indicators": [
{
"indicator": {
"name": "Percent Hispanic or Latino Population",
"datasetId": 108550,
"sources": [
{
"source": {
"dataSource": "Census",
"dataDirectorySection": "Census: Decennial Census and American Community Survey (ACS)",
"dataDescription": "US Bureau of the Census, American Community Survey.",
"display": true
}
}
{
"timeFrame": {
"id": 1612,
"type": "annualrange",
"typeId": 7,
"fullName": "Estimated percent of all people who were Hispanic or Latino, between 2017-2021.",
"fullDescription": "Estimated percent of the population that is Hispanic or Latino, between 2017-2021. Estimated percentage calculations are suppressed in cases where the denominator of the calculation was less than 10 of the unit that is being described (e.g., households, people, householders, etc.).",
"aggregationRule": 410,
"overlapPercentage": null,
"period": "2017-2021",
"overlayset": "null",
"year": "2017",
"value": "2.69"
}
}
}
]
}
}
]
}
},
{
"boundary": {
"id": 697084837,
"identifier": "34005700103",
"name": "34005700103",
"overlapPercentage": "100",
"type": {
"boundaryType": {
"id": 6,
"definitionId": 1255,
"type": "Census Tract"
}
},
"indicators": [
{
"indicator": {
"name": "Percent Hispanic or Latino Population",
"datasetId": 108550,
"sources": [
{
"source": {
"dataSource": "Census",
"dataDirectorySection": "Census: Decennial Census and American Community Survey (ACS)",
"dataDescription": "US Bureau of the Census, American Community Survey.",
"display": true
}
}
{
"timeFrame": {
"id": 1612,
"type": "annualrange",
"typeId": 7,
"fullName": "Estimated percent of all people who were Hispanic or Latino, between 2017-2021.",
"fullDescription": "Estimated percent of the population that is Hispanic or Latino, between 2017-2021. Estimated percentage calculations are suppressed in cases where the denominator of the calculation was less than 10 of the unit that is being described (e.g., households, people, householders, etc.).",
"aggregationRule": 410,
"overlapPercentage": null,
"period": "2017-2021",
"overlayset": "null",
"year": "2017",
"value": "5.67"
}
}
}
]
}
}
]
}
},
{
"boundary": {
"id": 697084393,
"identifier": "34005700104",
"name": "34005700104",
"overlapPercentage": "100",
"type": {
"boundaryType": {
"id": 6,
"definitionId": 1255,
"type": "Census Tract"
}
},
"indicators": [
{
"indicator": {
"name": "Percent Hispanic or Latino Population",
"datasetId": 108550,
"sources": [
{
"source": {
"dataSource": "Census",
"dataDirectorySection": "Census: Decennial Census and American Community Survey (ACS)",
"dataDescription": "US Bureau of the Census, American Community Survey.",
"display": true
}
}
{
"timeFrame": {
"id": 1612,
"type": "annualrange",
"typeId": 7,
"fullName": "Estimated percent of all people who were Hispanic or Latino, between 2017-2021.",
"fullDescription": "Estimated percent of the population that is Hispanic or Latino, between 2017-2021. Estimated percentage calculations are suppressed in cases where the denominator of the calculation was less than 10 of the unit that is being described (e.g., households, people, householders, etc.).",
"aggregationRule": 410,
"overlapPercentage": null,
"period": "2017-2021",
"overlayset": "null",
"year": "2017",
"value": "10.91"
}
}
}
]
}
}
]
}
}
]
},
"warnings": [
{
"warning": {
"message": "Standard boundary type argument supplied along with containment boundary type argument. Discarding standard boundary type argument."
}
}
],
"debug": {
"executionTime": "0.5738 seconds"
},
"versions": null,
"loginState": 4,
"userId": null
}

Some elements of the original return have been removed to simplify the results displayed here.
Description of the results

The sch (search) sbt=7 (zip code boundaries) ss=08065 identifies the zip code of 08065

The cbt=6 finds the three census tracts inside the zip;

  • 34005700102, 34005700103, 34005700104

The ii=9868944 indicator is Percentage of persons who are Hispanic or Latino which shows the values for each tract as;

  • 34005700102 = 2.69%
  • 34005700103 = 5.67%
  • 34005700104 = 10.91%


How did we do?