uscensusbureau / citysdk

Convenient JavaScript utilities for working with Census APIs: Statistics, Cartographic GeoJSON, lat/lng -> FIPS, and other niceties (written in ClojureScript)
https://uscensusbureau.github.io/citysdk
MIT License
965 stars 184 forks source link

2010 Geocoding Broken #347

Closed 0xcadams closed 2 years ago

0xcadams commented 2 years ago

The following code breaks the geocoding results:

census(
  {
    vintage: 2010,
    geoHierarchy: {
      // required
      state: {
        lat: 37.774929,
        lng: -122.419418,
      },
    },
    sourcePath: ['dec', 'sf1'],
    values: ['NAME', 'B25001_001E'],
  },
  (err, res) => console.log({ err, res }),
)

The code makes an attempted request to: https://tigerweb.geo.census.gov/arcgis/rest/services/Census2020/tigerWMS_Census2010/MapServer/98/query?geometry=-122.419418,37.774929&geometryType=esriGeometryPoint&inSR=4269&spatialRel=esriSpatialRelIntersects&returnGeometry=false&f=pjson&outFields=STATE

This request results in an error from the TigerWeb server.

loganpowell commented 2 years ago

Looks like those layers were moved here.

Let me see if I can reconfigure this for you today.

0xcadams commented 2 years ago

Thank you! I appreciate it. Hopefully those layers don't shift in the future 🤞

loganpowell commented 2 years ago

can you update to 2.2.0 and see if that fixes it for you?

0xcadams commented 2 years ago

That fixed it - thank you @loganpowell! FYI here is the upstream project:

https://github.com/smartcontractkit/external-adapters-js/pull/1098

loganpowell commented 2 years ago

Thank you for the report