mikejohnson51 / climateR

An R 📦 for getting point and gridded climate data by AOI
https://mikejohnson51.github.io/climateR/
MIT License
168 stars 40 forks source link

support for {terra}'s objects #44

Closed Nowosad closed 9 months ago

Nowosad commented 2 years ago

Dear @mikejohnson51 -- thanks for the great package.

I am now thinking about adding climateR to the data packages section of the Geocomputation with R book. As the book uses {terra} for raster data, I have a quick question -- do you have any plans to add terra support for this package?

mikejohnson51 commented 2 years ago

Hi @Nowosad,

Wow! What an honor that would be. I have used your book quite a bit and turned many students towards it as well. As for the question, this is perfect timing. I have terra capabilities built into a not-pushed climateR branch as well as a few new data sets that support on-going drought, fire, and snow modeling efforts here in the US. I will have that update out by the end of the year.

If there is anything I can do to support the inclusion of climateR in Geocomputation with R, please let me know.

Mike

Nowosad commented 2 years ago

Great news! Thanks a lot

mikejohnson51 commented 2 years ago

Hi @Nowosad,

Just wanted to keep you in the loop on this. climateR will soon be based on a more robust dataset collection (and methods) being built over here: https://mikejohnson51.github.io/opendap.catalog/.

With it will come full support for MODIS, NLDAS, GLDAS, and some other datasets!

Once I have docs and tests all set I will transition climateR to calling on its utilities directly - this includes full terra support.

thanks!

Nowosad commented 2 years ago

Looks great -- I look forward to see it when it is ready

mikejohnson51 commented 1 year ago

Hi @Nowosad,

While this took much longer then expected, this package has been completely overhauled to be more flexible, robust, and easy to maintain. It now works with any OPeNDAP endpoint (or VRT/TIF file) and provides an internal catalog of over 100,000 data products. To keep with the old style there are a number of resources which have a shortcut function (e.g.getTerraclim, getGridMet, getMODIS) and all data is returned as SpatRaster objects.

If you are still interested in getting an example of this package in your excellent book, I would be eager to help and am now in a position where I can more readily maintain and improve this software.

Thanks for all you do,

Mike

Nowosad commented 1 year ago

@mikejohnson51 congrats on the progress made and also -- perfect timing. I plan to revise the data chapter in the next few weeks.

Could you create a pull request that adds climateR to the data packages' table (https://r.geocompx.org/read-write.html#geographic-data-packages).?

Nowosad commented 9 months ago

@mikejohnson51 Thanks for adding the terra support!