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
956 stars 184 forks source link

remove stdout logs #355

Open ryparker opened 7 months ago

ryparker commented 7 months ago

There's a lot of noise coming from this library. Can these been removed/hidden behind a flag?

Here's an example of what citysdk outputs when fetching data:

:geos-only
"Getting Census GeoJSON data from source:"
"https://ddbc5tjh37x38.cloudfront.net/500k/2022/state.json"
:geos-only
"Getting Census GeoJSON data from source:"
"https://ddbc5tjh37x38.cloudfront.net/500k/2022/congressional-district.json"
:geos-only
"Getting Census GeoJSON data from source:"
"https://ddbc5tjh37x38.cloudfront.net/500k/2022/place.json"

Here's an example when attempting to fetch data for a vintage that does not have the requested data (2024 state data):

:geos-only
"No GeoJSON found for: 'state'"
"at this scope in vintage: 2024"
"at resolution: 500k"
""
"For 'state' try one of the following:"
"=== :us = nation-level 'state' geoResolutions ==="
"=== :st = state-levels 'state' geoResolutions ==="
[:1990 {:us ["500k"], :st ["500k"]}]
[:2000 {:us ["500k"], :st ["500k"]}]
[:2010 {:us ["5m" "20m" "500k"], :st nil}]
[:2012 nil]
[:2013 {:us ["5m" "20m" "500k"], :st nil}]
[:2014 {:us ["5m" "20m" "500k"], :st nil}]
[:2015 {:us ["5m" "20m" "500k"], :st nil}]
[:2016 {:us ["5m" "20m" "500k"], :st nil}]
[:2017 {:us ["5m" "20m" "500k"], :st nil}]
[:2018 {:us ["5m" "20m" "500k"], :st nil}]
[:2019 {:us ["5m" "20m" "500k"], :st nil}]
[:2020 {:us ["5m" "20m" "500k"], :st nil}]
[:2021 {:us ["5m" "20m" "500k"], :st nil}]
[:2022 {:us ["5m" "20m" "500k"], :st nil}]
""
"=== available geoHierarchy levels ==="
"school district (secondary)"
"congressional district"
"zip code tabulation area"
"tract"
"place"
"new england city and town area"
"division"
"metropolitan statistical area/micropolitan statistical area"
"us"
"county"
"state"
"combined new england city and town area"
"region"
"state legislative district (lower chamber)"
"american indian area/alaska native area/hawaiian home land"
"state legislative district (upper chamber)"
"public use microdata area"
"county subdivision"
"urban area"
"block group"
"school district (unified)"
"consolidated cities"
"combined statistical area"
"school district (elementary)"
"alaska native regional corporation"
"Unsuccessful `Census GeoJSON` request."
"Error: TypeError: Failed to parse URL from null"
loganpowell commented 7 months ago

@ryparker,

I'm sorry, but this library is in maintenance only ATM. I.e., only new vintages will be added (no additional features). However, I will keep this issue open in case I get some time to add the feature.