-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API for USDA plants database? #7
Comments
I'm also interested in this so +1 |
+1 |
As a former (6 year) employee of the USDA now in academia, I would highly support and endorse an API for this database. If there is anything I can do to move this along, please let me know. |
+1 |
👍 from me as well. |
+1 - I would like to have a plants API as well. |
@konklone, any info as to whether this is in the works? |
I have no idea. =) CC-ing @thisisparker. |
Seems we can give up on this now, 2 years later :( |
Unfortunately, I agree with @sckott here, we should give up hope that this is going to happen. :( |
Can you leave this issue open? |
@bbrotsos does this mean this is in the works? |
@bbrotsos is the api in the works? |
👍 this would be cool |
Having access to a USDA database of plants would be really helpful in building applications that target gardeners and plant enthusiasts. Currently, many application developers are creating their own databases of plants with common information, overlapping one another. |
|
correction to my previous post. Apparently we reduced the amount of data returned by the api call above. However, (@sckott) given that the USDA Plants database is "free for any use" (http://plants.usda.gov/java/intellectualPlants) and here is a copy from 2011: https://uofi.box.com/s/erpkt05msepkld5zitij7elvzrh4bpi8 that I think has all of the fields. Wouldn't it be pretty easy (for someone like you) to host and configure an API somewhere (at least in the meantime)? |
@dlebauer cool, so the whole thing is only 34 MB, can that be right? about 50K rows |
That's what I have. I know there are also photos on the website but this is the bulk of the info. I forgot to export column names in the version above. I'll do that and remove some rows that we inserted to track crop hybrids and update later today. |
thanks |
OK. Here it is on Box there is a csv (32MB) and RData file (2.3MB): https://uofi.box.com/s/pbr11886smc33hfnqw239m2bivavzwwp I've removed most of the rows that we added and returned column names to USDA style CamelCase. I kept the field 'betydb.species.id' as foreign key to BETYdb; otherwise this should be pretty close to the original ... I also kept the 'created_at' and 'updated_at' fields - created_at is probably the date of import and if updated_at is the same there is probably no difference. Empty strings and NAs can be treated as missing (e.g. NULL though some prefer not to use that). Code used to (mostly) revert betydb.species to usda.plants is here: https://gist.github.com/dlebauer/15b588bf334334a34c31 |
thanks! |
@sckott I did some advanced searching and found almost 100k records; I added it to the same Box folder as above (https://uofi.box.com/s/pbr11886smc33hfnqw239m2bivavzwwp). The file is called usda_plants_20160223.csv Unlike the other files, this is direct from the source. If you want to normalize it, there are actually only ~2000 records with detailed characteristics (i.e. columns to the right of "Active Growth Period"). Also, this one doesn't include information on wetland status, since USDA says this information is kept up to date on the National Wetland Plant List (http://rsgisias.crrel.usace.army.mil/NWPL/). Good Luck! |
Nice, thanks. |
API up at https://plantsdb.xyz |
How does it work?
|
This is the new website that I mentioned earlier that we have been
building. Thank you for linking it.
…On Sat, Sep 25, 2021, 5:42 PM Zac Gross ***@***.***> wrote:
For the current site, it looks like there are some public endpoints. When
running a search I was able to see a request like this in the Inspect
window in Chrome:
curl "https://plantsservices.sc.egov.usda.gov/api/PlantSearch" -H
"Content-Type: application/json" --data-raw ^"^{ ^^"Text^^": ^^"Ratibida
columnifera^^", ^^"Field^^": ^^"Scientific Name^^",^}^" ^ --compressed
The results from that include the symbol (RACO3) and id (39375) of the
plant.
And then looking at an a plant profile (example:
https://plants.usda.gov/home/plantProfile?symbol=RACO3) I can see some
requests like this:
https://plantsservices.sc.egov.usda.gov/api/PlantProfile?symbol=RACO3
https://plantsservices.sc.egov.usda.gov/api/PlantDocumentation/39375?orderBy=DataSourceString&offset=-1
So you could use those to perform an operation like: Search for a name ->
Return the profile information for that plant. It looks pretty difficult to
use and probably fragile since it's not a publicized API but it's usable.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABPJBYOS7HMHLQABA6O4CW3UDY64ZANCNFSM4AI4ESWA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
There is no current public API as you mentioned but that will be in the
future plans as it is currently in our backlog.
…On Sat, Sep 25, 2021, 5:42 PM Zac Gross ***@***.***> wrote:
For the current site, it looks like there are some public endpoints. When
running a search I was able to see a request like this in the Inspect
window in Chrome:
curl "https://plantsservices.sc.egov.usda.gov/api/PlantSearch" -H
"Content-Type: application/json" --data-raw ^"^{ ^^"Text^^": ^^"Ratibida
columnifera^^", ^^"Field^^": ^^"Scientific Name^^",^}^" ^ --compressed
The results from that include the symbol (RACO3) and id (39375) of the
plant.
And then looking at an a plant profile (example:
https://plants.usda.gov/home/plantProfile?symbol=RACO3) I can see some
requests like this:
https://plantsservices.sc.egov.usda.gov/api/PlantProfile?symbol=RACO3
https://plantsservices.sc.egov.usda.gov/api/PlantDocumentation/39375?orderBy=DataSourceString&offset=-1
So you could use those to perform an operation like: Search for a name ->
Return the profile information for that plant. It looks pretty difficult to
use and probably fragile since it's not a publicized API but it's usable.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABPJBYOS7HMHLQABA6O4CW3UDY64ZANCNFSM4AI4ESWA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
@chadchandler2423 Any updates on an available API that allows the download of plant data similar to https://plants.usda.gov/csvdownload?plantLst=plantCompleteList I am even curious if you would entertain having an API that provides an icon/thumbnail to represent the plant? |
@ranchinggames I emailed the point of contact at the USDA site, and they told me that the UofI link in the thread above from a few years ago is the same as the database they have now. https://m.box.com/shared_item/https%3A%2F%2Fuofi.box.com%2Fs%2Fpbr11886smc33hfnqw239m2bivavzwwp |
@Ejjaffe thanks for the follow up and the link! If it hasn't change in such a long time. I will use the version. |
It seems in the plants search you could get list of plants by the county. The CSV files uploaded here didnt seem to show a county associated with a plant. Anyone know were I can get county info for each plant |
I don't know if USDA Plants provides that but you might try |
County information for the plants is limited. This is a difficult thing to keep track of. You may have better luck with iNaturalist, which uses citizen scientists to record observations all over the world. This is INat's Developers page. There are lots of resources there, including their export tool (login required), public APIs, and various datasets. Just going to throw this out there: I reached out to [email protected] and they did respond within a few days, so if you have questions, sometimes they can answer them directly. |
Great tool !! Obviously everyone has noticed the new look and feel of
plants.usda.gov -- I am no longer on that project but I'm pretty sure they
will be releasing more and more API related features.
…On Tue, Dec 14, 2021, 4:06 PM Katie ***@***.***> wrote:
I've been working on a seasonal plant timeline using an API (I know others
may be looking for an API specifically) and I found rOpenSci: The rnpn
package <https://docs.ropensci.org/rnpn/> for interacting with the USA
National Phenology Network data web services (they have some cool data
visualization tools here too
<https://www.usanpn.org/nn/connect/visualizations>).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABPJBYN7YDAYSERPY373VOLUQ6WTZANCNFSM4AI4ESWA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Welcome to 2022, good job on getting through that last year, that was crazy. Any update on a public facing API with information about plants in our Homeland? |
Welcome to 2023! |
Awesome Ava! Checking it out now!
…On Fri, Mar 24, 2023 at 5:02 PM Ava ***@***.***> wrote:
I have a little Postman collection that queries the DB if anyone wants to
use it.
<https://www.postman.com/avasond/workspace/usda-natural-resources-conservation-service-plants-database-api>
—
Reply to this email directly, view it on GitHub
<#7 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABPJBYOEMBKRXNGJHFFVA43W5YDVZANCNFSM4AI4ESWA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
It's not very robust (at all) but it works if you just want to pull the JSON for a species. It could definitely be expanded but I don't wanna manually enter all the taxon filters. |
I did a lot of work on the disaster of a DB plants.usda.gov has on a gov
contract I was on and I can tell you, this is useful. Great work.
…On Fri, Mar 24, 2023 at 5:10 PM Ava ***@***.***> wrote:
It's not very robust (at all) but it works if you just want to pull the
JSON for a species. It could definitely be expanded but I don't wanna
manually enter all the taxon filters.
—
Reply to this email directly, view it on GitHub
<#7 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABPJBYJSMI7OG3QDEFBZNILW5YETJANCNFSM4AI4ESWA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
do you think itd be an issue if i ran a query on each plant to get the characteristics? itll take forever but i could get a csv that way of all the characteristics for available plants. I dont wanna get flagged for running 2k queries just to store it |
Not at all.
…On Sun, Apr 16, 2023, 11:39 PM Sean Ciaschi ***@***.***> wrote:
do you think itd be an issue if i ran a query on each plant to get the
characteristics? itll take forever but i could get a csv that way of all
the characteristics for available plants
—
Reply to this email directly, view it on GitHub
<#7 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABPJBYJIGPYJYBT2MRPRIYDXBS3PLANCNFSM4AI4ESWA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@sciaschi If you do generate that csv, would you share please? :) |
@katiechurchwell totally! im trying to get it formatted nicely but just a heads up, it'll be info overload O.o |
Alright heres the CSV i generated from the website data directly. Im unsure of the changes between the m.box link and this one. New: https://1drv.ms/u/s!AlSMJqLB0fp2i_R_2xJFoVa1wKdPVw?e=GE7FZ8 Old?: https://m.box.com/shared_item/https%3A%2F%2Fuofi.box.com%2Fs%2Fpbr11886smc33hfnqw239m2bivavzwwp Mine is only generated using the characteristic search plants which came out to around 2175 plants. Some still dont have characteristics but thats on their data. I included the json in the event someone wants to use it :) Edit 8/1/2023: Updated "New" link with corrected data |
@sciaschi thank you!! |
@sciaschi thanks for providing this, but I don't see roughly 2200 distinct species. It looks like the data repeats Abelia grandiflora, Abies amabilis, Abies balsamea, Abies concolor, Abies fraseri, Abies grandis, Abies lasiocarpa, Abies magnifica, Abies magnifica, Abies procera, Acacia cyclops, Acacia koa, Acacia koaia, Acacia longifolia, Acacia melanoxylon, Acalypha virginica, Acer circinatum, Acer floridanum, Acer ginnala, Acer glabrum, Acer glabrum, Acer grandidentatum, Acer macrophyllum, Acer negundo, Acer nigrum. Am I missing something? Thanks again. |
@kdnune I'm not too sure 🤔 I didn't really change the data once it was converted to the csv so any data that came through is basically raw data i converted to a csv. I took a look though it quick but didn't see any duplicates 🤔 would you be able to point out where the duplicates of some of those are? Like the row numbers would work because if there are, I dont mind updating it to make it more accurate. |
@sciaschi I ran a value_counts on the 'Id' field and I see only about 25 values repeated over and over again for 2175 rows. The value counts for the 'Id' field are: Are we looking at different files? Thanks for all your help. |
@kdnune ya know, this is why i should really double check my work XD i had a version of my program that didnt actually increase the offset for the api to get each page instead of just getting the first page of results. I uploaded a new version with the json and csv. Sorry about that! XD |
Hey everyone, I launched an api to programmatically expose the USDA PLANTS data at plantapi.xyz. Would love any feedback on the project and any additional desired features as well. |
It's down :( |
Any plans to expose an API for the USDA plants database? There is a lot of information in their on characteristics of different plant species that would be nice to access via a REST API.
The text was updated successfully, but these errors were encountered: