Git Product home page Git Product logo

Comments (3)

ChuBL avatar ChuBL commented on August 13, 2024

Hello! I am glad to hear this project helps.

The function you mentioned was already available from the API, though it was hard to find. Thank you for pointing it out.

I have updated the coding examples to the readme file for your reference.

Please let me know if you need more help using openmindat API.

Jiyin

from openmindat.

fros1y avatar fros1y commented on August 13, 2024

Thanks,

My use case here is trying to convert OpenMindat data into map layers usable in GIS analysis. I've been able to retrieve a list of locations, but that does not include any mineral occurrence data.

From the example you added to the README, it looks like something like

lr = openmindat.LocalitiesRetriever()
lr.expand("geomaterials")
lr.save()

should work. However, the results don't appear to be any different. when using the expand option. Am I missing something?

from openmindat.

ChuBL avatar ChuBL commented on August 13, 2024

Bug Reproduction

I encountered problems running this code. Noticing that the function expand might result in many internal queries and crush the retrieval session, I tested an alternative code for single locality ID querying.

import openmindat
lr = openmindat.LocalitiesRetriever()
lr.id__in("6646").expand("geomaterials")
lr.saveto('./test/', 'test')

As you mentioned, the expand() function doesn't retrieve anything different from the retrieval without it. This is probably a problem from the API side. I will study it and discuss it with the API developers. Thank you for pointing it out.

Updating the Package

You might notice that the LocalitiesRetriever() class was problematic in the Pypi version of the package. We have fixed this issue; now you can import it in the manner shown in the examples. However, the updated code hasn't been published on the Pypi platform. To install the up-to-date version of this package, please clone this repo to your local environment, and run

pip install .

in your root directory of the cloned repo, which should look like:

/Users/YourUserName/.../OpenMindat/

from openmindat.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.