oturns / geosnap

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

Functions not available #370

Closed samueltoro7 closed 7 months ago

samueltoro7 commented 1 year ago

Hi all,

I was trying to follow the "cluster_diagnostics" example but I found some problems to find: find_k and find_region_k functions to calculate the number of clusters.

I think it might be a version issue. Have someone else faced the same problem?

Best, Samuel

jGaboardi commented 1 year ago

Can you provide some more details:

knaaptime commented 1 year ago

Hey, thanks for raising this. Those functions are (relatively) new, so they are in the current code base if you do a development install (ie clone and install from source). But they haven't made it into a release yet.

A release is overdue here so I'll put one together. Though heads up I was thinking of renaming those functions to search_k instead of find_k

samueltoro7 commented 1 year ago

Hi Eli and James, thank you for your quick reply.

Firstly I was using Geosnap in the environment created for the PySAL workshop, where the functions required (fin_k) are not available.

Then I downloaded the environment here in GitHub but it is quite strange for me that the Geosnap package is not on it or I don't know what I am doing wrong

Greetings Unbenannt

knaaptime commented 1 year ago

when you do the development install and do mamba env create -f environment.yml, it installs all the geosnap dependencies, but not geosnap itself (because then you'd have the last packaged version, and that doesnt include the functions you are trying to use). Once you have the environment in place, you just need to do conda activate geosnap, and pip install -e . --no-deps, which will install the latest version from oturns/geosnap@main (and any time you make changes to the local geosnap code, those changes will be available in your environment.

Hope that helps, but i'll also commit some time to getting a new release out the door so that you can do a regular install

knaaptime commented 7 months ago

these are now available