Convenient JavaScript utilities for working with Census APIs: Statistics, Cartographic GeoJSON, lat/lng -> FIPS, and other niceties (written in ClojureScript)
Code to Run
```javascript
const citysdk = require('citysdk');
async function runner() {
const result = await new Promise((resolve, reject) => {
citysdk(
{
vintage: 2019,
geoHierarchy: {
'metropolitan statistical area/micropolitan statistical area': {
lat: 36.3675555, //36.3675555,-94.2678361
lng: -94.2678361,
},
},
sourcePath: ['acs', 'acs5'],
values: ['B01001_001E'],
geoResolution: '20m', // required,
},
(err, res) => {
if (err) {
return reject('Failed to translate lat lng into MSA.');
}
const msa = res.features?.flatMap((feature) => {
return feature.properties?.NAME;
});
return resolve(msa[0]);
},
);
});
console.log(`this is the result: ${result}`);
}
runner()
.then(()=>console.log(`dun! 🚀`));
```
I'm observing a "Unsuccessful: configuration request", I even have seen a "Response: 404: Not Found STATUS: 404 URL: https://raw.githubusercontent.com/uscensusbureau/citysdk/master/v2/src/configs/geojson/index.edn" if that helps.
I'm trying to execute this code:
Code to Run
```javascript const citysdk = require('citysdk'); async function runner() { const result = await new Promise((resolve, reject) => { citysdk( { vintage: 2019, geoHierarchy: { 'metropolitan statistical area/micropolitan statistical area': { lat: 36.3675555, //36.3675555,-94.2678361 lng: -94.2678361, }, }, sourcePath: ['acs', 'acs5'], values: ['B01001_001E'], geoResolution: '20m', // required, }, (err, res) => { if (err) { return reject('Failed to translate lat lng into MSA.'); } const msa = res.features?.flatMap((feature) => { return feature.properties?.NAME; }); return resolve(msa[0]); }, ); }); console.log(`this is the result: ${result}`); } runner() .then(()=>console.log(`dun! 🚀`)); ```I'm observing a
"Unsuccessful: configuration request"
, I even have seen a"Response: 404: Not Found STATUS: 404 URL: https://raw.githubusercontent.com/uscensusbureau/citysdk/master/v2/src/configs/geojson/index.edn"
if that helps.Env
"citysdk": "2.2.1" node: v16.14.0 npm: 8.3.1