An official website of the United States government
Here’s how you know
Official websites use .gov
A .gov website belongs to an official government organization in the United States.
Secure .gov websites use HTTPS
A lock (
) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.
The U.S. Census Bureau is releasing a new classification of required variables to allow users to see when a default value is used when the variable is not directly queried. The default value of these variables will be returned without the user requesting them. Required variables still must be directly queried or an error will occur.
This functionality may break existing calls to the API Discovery for variables due to changing fields in the XML, JSON and HTML.
This functionality will only be available with select datasets.
Released to beta on July 6, 2017 and plan to release to production on July 19, 2017.
Beta: https://beta.dataweb.rm.census.gov/data.html
Production: https://api.census.gov/data.html
Some variables will now switch from “required” to “default displayed”. This could aid in creating your queries.
HTML
On the variables page, another classification being added in the required column which may replace existing values.
JSON
{
"name": "LFO",
"label": "Legal form of organization",
"concept": "Employer Statistics",
"required": default displayed,
"predicateType": "string",
"group": "N/A",
"limit": 8,
"validValues": [
]
}
XML
<census-api><vars><var xml:id="LFO" label="Legal form of organization" concept="Employer Statistics" required="default displayed" predicate-type="string" group="N/A" limit="8"><validValues>
</validValues></var></vars></census-api>
This functionality will allow users to distinguish between required variables and default displayed variables. Users previously had issues because the U.S. Census Bureau previously provided the required variables by default. The Census Data API will continue to provide these required variables but they will now be labeled as default displayed.
Please report any problems you encounter to <cnmp.developers.list@census.gov>.
Top