Overview

This interactive tool will help you craft queries to test out the CitySDK, and make sure you are getting the correct response.

1. Select Dataset

2. Select Location





°N
Number - The latitude of the requested location (North). Also supported: latitude, y
°E
Number - The longitude of the requested location (East). Also supported: longitude, x
String - The 5-digit zip code of the location. Note that USPS zip code areas do not align precisely with Census geographies, so when high accuracy is required it is recommended to use latitude and longitude. Specified as a string because certain zip codes begin with zeroes.

String - The 2-letter USPS state code. It will be converted into the latitude and longitude of that state's capital.

Object - Represents the address of the requested location.

Some common co-ordinates:
Name Lat (N) Lng (E)
Washington DC 38.9047 -77.0164
Seattle 47.6097 -122.3331
Honolulu 21.3000 -157.8167
Miami 25.7753 -80.2089
Houston 29.7604 -95.3698

3. Select Desired Variables

These are aliases defined in CitySDK for ACS Variables for easier access. See Alias/Variable List.

Need a variable that isn't in the alias list? Input the Variable Code directly here.

Validating Variable Code...
Array - Optional - An array of strings specifying which variables to query. One can specify an aliased variable (see variable aliases) or a specific ACS5 variable code (e.g. "B24124_407E"). If this array is not specified, the SDK will simply geocode the location into Census FIPS codes. A list of all ACS variables is available on the Census's developer portal or via the SDK's getACSVariableDictionary method.

4. How Will The Data Be Grouped?

At what level to request the data. These are based on census geographies. Supported options are: "blockGroup", "tract", "county", "state", "us", and "place". Note that the "place" tag currently only supports incorporated places. Sublevel - Optional Whether or not to return based upon sublevels. See sublevel requests for more information. Defaults to false.

This option is only available for GeoJSON requests  

String - Optional, GeoJSON request only - Specifies a level which serves as a boundary for a GeoJSON request. For instance, if your level is "tract" and your container is set as "place" with sublevel enabled, it the SDK will return all tracts which fall within or touch that place's geographical boundaries. The container tag says "get all level within container", a place is the census word for an incorporated city, and sublevel says "get all of that level"

5. Select SDK Call and Submit

CitySDK Call Type

Get the Data

Update Data

The Request




      

The Returned Data

                                    

<script>

                            var sdk = new CitySDK();
                            var census = new CensueModule("Your API Key Here");

                            var request = ;

                            census.apiRequest(request, function (response) {

                            //Outputs the raw JSON text
                            jQuery("#rawOutput").append(JSON.stringify(response));

                            });
                            </script>
<script>

                            var sdk = new CitySDK();
                            var census = new CensueModule("Your API Key Here");

                            var request = ;

                            census.geoRequest(request, function (response) {

                            //Outputs the raw JSON text
                            jQuery("#rawOutput").append(JSON.stringify(response));

                            map.data.forEach(function (feature) {
                            map.data.remove(feature);
                            });
                            map.data.addGeoJson(response);
                            map.setCenter({
                            lat : Number(response.features[0].properties.INTPTLAT),
                            lng : Number(response.features[0].properties.INTPTLON)
                            });

                            });
                            </script>
Credits
Modified from code by @mpaquette1