oturns / geosnap

The Geospatial Neighborhood Analysis Package
https://oturns.github.io/geosnap-guide
BSD 3-Clause "New" or "Revised" License
243 stars 32 forks source link

Unable to import geosnap #337

Closed datamongerbonny closed 2 years ago

datamongerbonny commented 2 years ago

Unable to load geosnap in jupyter notebook.

I tried both conda and pip install. The install works but the import fails due to:

ImportError: cannot import name 'cached_property' from 'functools' (/usr/lib/python3.7/functools.py)

I am using the updated released April 2022

https://pypi.org/project/geosnap/

knaaptime commented 2 years ago

thanks for raising this! The root of the issue is that the cached_property function is only available for python 3.8+.

It looks like there's a backwards-compatible fix, so i should be able to get that incorporated pretty shortly

(In the meantime, you should be able to use the package as long as you start with a python 3.8 environment).

datamongerbonny commented 2 years ago

Thanks. I am up and running! Curious when you anticipate 2020 Census updates? A great package!

knaaptime commented 2 years ago

awesome. Glad to hear you're finding it useful.

good question on the 2020 data. We target the same variable set as LTDB, and the internal tooling is setup to collect everything from the ACS Data Profile. For past 5-year releases, that has meant hitting the census FTP server for the data profile, computing intermediate variables, then storing in the cloud. But it looks like 2020 hasnt been posted there yet (even though it's available for download through the website)

tools like cenpy or tidycensus are setup to work very differently because they hit the census API, then convert the JSON response into a dataframe, whereas we grab a massive extract from the FTP and store it all ourselves (our variable set is essentially static, whereas those other tools are designed to be flexible), but all the same I'll ping @walkerke and @loganpowell just in case they have any insight

knaaptime commented 2 years ago

this should be resolved through #336, so i'm going to close but feel free to repoen if you think something else should be adddressed