CitySDK Examples
Node.js
Stats
let census = require('citysdk')
census(
{
"vintage" : "2017",
"geoHierarchy" : {
"state" : "51",
"county" : "*"
},
"sourcePath" : ["acs", "acs1"],
"values" : ["NAME"],
"predicates" : {
"B01001_001E" : "0:100000"
}
},
(err, res) => console.log(res)
)
TRY IT
Stats Merged into GeoJSON properties
with Geocoding
let census = require('citysdk')
census(
{
"vintage": 2016,
"geoHierarchy": {
"county": { lat: 28.2639, lng: -80.7214 },
"tract": "*"
},
"sourcePath": ["acs", "acs5"],
"values": ["B00001_001E"],
"geoResolution": "500k"
},
(err, res) => console.log(res)
)
TRY IT
With mapbox-gl
Source Code Here