isamplesorg / export_client

Client for the iSamples export service
Apache License 2.0
1 stars 1 forks source link

Add some concrete examples of how to use isample export #15

Closed rdhyee closed 1 month ago

rdhyee commented 3 months ago

I'm in the process of trying out this export client. I'm struggling to figure out the format for the query parameter. For example, I wanted a query to reproduce the default query on the iSamples central interface:

https://central.isample.xyz/isamples_central/ui/#/?searchFields=BOj12i8m44Ml8hDk8LONqgLw0X4tfSWqcKfWcfGu4OjuTwUjo_VV-yq763jYgE4KcScAZs5pHY4eeFV4JisOeikMt76w9tfcbgiVw8BXCKSoZQIDqqkPvgtiqPAe6Nou8MUrsuCnolZ-SsMgVG6l5Ph5whHhl-qF&sortFields=YwvMoabCIirHibBoJ4dDAybCoqmjKj9H0b8vAK31p1GWfomnfpGLo4aiJbQgZGK0

After I figured out how to use the plantuml-encoder and ran

var plantumlEncoder = require('plantuml-encoder')

encoded = "BOj12i8m44Ml8hDk8LONqgLw0X4tfSWqcKfWcfGu4OjuTwUjo_VV-yq763jYgE4KcScAZs5pHY4eeFV4JisOeikMt76w9tfcbgiVw8BXCKSoZQIDqqkPvgtiqPAe6Nou8MUrsuCnolZ-SsMgVG6l5Ph5whHhl-qF";
console.log(plantumlEncoder.decode(encoded)) 

to get

[{"label":"Collection Date","field":"producedBy_resultTimeRange","type":"date-range-facet","minValue":1800,"maxValue":2024,"value":[1800,2023]}]

I'm left with the question -- can I feed the encoded or decoded query to isamples? (I know that I can just try it after writing this up....so let me do so....)

I got the following incantation to work:

isample export -j $ISAMPLES_JWT -f geoparquet -d /tmp -q 'source:SMITHSONIAN'
rdhyee commented 1 month ago

I'm going to close this issue, not revising the documentation is complete, but Re #15 -- update README.md to get rid of the mention of export_clien… by dannymandel · Pull Request #19 · isamplesorg/export_client to provide a basic example was accepted.