Trefle DB repalcement #235
Replies: 2 comments 4 replies
-
Hi @astappiev, thank you so much for the extensive work you've done, you've uncovered some really interesting and valuable resources. Next Steps and SuggestionsI'm currently exploring the best path forward and your findings are incredibly timely. Here’s what I’m thinking:
Your suggestions and feedback are welcome since these are just my initial thoughts. I’m particularly looking for suggestions on how best to proceed with these plans, feedback on their feasibility, or if there might be other directions we could consider. Here are some key characteristics I envision for the new service:
Technical Feasibility and Initial TestsI’ve conducted some preliminary tests with the Trefle dump, and your more comprehensive dump will be useful for this. Here's an outline of the current project setup:
This project is still in its infancy and primarily a feasibility study at this stage. If needed, I can share the project with the community to gather more input and collaboration. Looking forward to your thoughts and any additional suggestions you might have. |
Beta Was this translation helpful? Give feedback.
-
Hi :) I'm not a dev so sorry If I add unnecessary noise and I do not know if this is something related or useful or even if this could fit into plant-it. But I leave this here: https://github.com/plantnet It has an API so I thought this could be something of interest for plant-it. Maybe I'm wrong, If so just delete my comment :). |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have finished the project I mentioned earlier, I downloaded the complete db from Trefle using their API.
It's stored in relational DB, which greatly simplifies how we can use it. Also includes 149462 main images of species.
Preamble
I tried to deploy Trefle, but failed.
Also their public dump (available here) is outdated (not a big deal as since then their DB has only slightly grown) and a single CSV with lots of data omitted (I thought so).
Methods:
For simplicity and fun, I used golang to make ~500k requests to their API (single thread and some throttle), in particular, I used pockebase as a backend.
Results:
~1,1GB SQLite db of 489813 species + some other tables
~29,0 GB of 149462 image files (not necessary, there is still
image_url
which points to some random cloud used by Trefle)You only need to download the files, unpack them and put them into the same folder as pocketbase binary (or minimal go source file with framework init). Run
./pocketbase serve
and REST API is ready to be used + GUI Admin panel if needed.I'm planning to share the files with anyone interested, I just don't know a good way to do that.
Alternative solution:
While searching for alternatives to Trefle, I found https://plantbook.io/, which could be a direct replacement for Trefle.
However, it's not open source and I found their website very slow (at least from EU, maybe it's deployed in US), I spent 10 minutes creating the API key because each page loads a minute. API works slightly better, but still not compared to Trefle.
The first mention of this project comes from HomeAssistant forum where it was introduced as integration with plant-card. Reading the forum, I concluded that it was created as a result of a similar crawl to what I made, but from Chinese MiFlora API (a companion App for MiFlora Bluetooth devices).
Following this, I found MiFloraDB, which also consists of CSV file and images.
As a bonus, I put it into a separate SQLite table, with all the images together, so it can serve as Local API (this one is only ~10MB in size + ~500MB of images). And contains the most common household plants with nice pictures.
Conclusion:
I think MiFloraDB is more suitable for the app as it contains "simplified" information about plants. It's also smaller in size, and can be easily packed as a Docker image to be distributed to each installation of the app. Maybe we could create a rival to Trefle: a collaborative platform to gather plant knowledge, but with aim to gardeners instead of biologists.
Beta Was this translation helpful? Give feedback.
All reactions