Package: eeharvest
eeharvestAnAgricultural Research Federation(AgReFed) project, theeeharvestpackage
simplifies access to Google Earth Engine and its data catalog with a quartet of
convenient methods to collect, process and download data:preprocess(): server-side processing, cloud and shadow masking, image
reduction and calculation of spectral indicesaggregate():🚧(work-in-progress)🚧perform additional temporal aggregaton
on datadownload(): download data collection(s) to disk without limits on size or
number of filesmap(): preview assets automatically in an interactive map⚠ WARNING:eeharvestdoes only a few things, but it does them well. The
main objective is to provide a simple,intuitiveinterface to Google Earth
Engine that is easy to use and understand for researchers who maynothave a
lot of experience with Python or Google Earth Engine, but they "just want to
download some maps".Most importantly,eeharvestis designed to be used withgeodata-harvesterfor fully automated and reproducible data extraction and
processing, but we understand the benefits of using it as a standalone package.If you are an advanced user, we recommend that you use the
Earth Engine API directly (but see useful add-on packages such aseemontandgeemapin our acknowledgements below).Whyeeharvest?This package is part of the AgReFedGeodata-Harvesterproject which extends
the vision of providing Findable, Accessible, Interoperable and Reusable (FAIR)
agricultural data (and beyond) to Australian researchers and stakeholders.There are currently three packages that have been produced under AgReFed:🐍geodata-harvester(link): a Python package for data extraction and processing from a
wide range of data sources in Australia, with support for Google Earth Engine
via a dependency oneeharvest(see below)🐍eeharvest:this package, which provides access to Google Earth Engine
and is designed to work as a standalone packageRdataharvester(link): an R package that replicates the functionality ofgeodata-harvester, but with additional support for functional R programming
and the tidyverseFeatures✅Downloadfrom any dataset available on theGoogle Earth Engine Data Catalog✅ Perform automatic cloud and shadowmasking(credit:eemont)✅Scaleandoffsetimage bands instantly (credit:eemont)✅Spatialaggregation/reduction (e.g. median)❌Temporalaggregation/reduction (🚧work-in-progress🚧)✅ Quickly calculate from a vast library ofspectral indices, e.g. NDVI, BAI (credit:Awesome Spectral Indices)✅Previewassets instantly using interactivemaps, including calculated spectral
indices (credit:geemap)✅Downlodany number of image assets with (almost) no size limits -please
be sensible with this feature(credit:geedim)✅Automateallof the above with the use ofYAMLconfig filesExamplesimporteeharvesteeharvest.initialise()# specify collection, coordinates and date rangeimg=eeharvest.collect(collection="LANDSAT/LC08/C02/T1_L2",coords=[149.799,-30.31,149.80,-30.309],date_min="2019-01-01",date_max="2019-02-01",)# cloud and shadow masking, spatial aggregation, NDVI calculationimg.preprocess(mask_clouds=True,reduce="median",spectral="NDVI")# visualise (optional, but fun)img.map(bands="NDVI")# download to disk (defaults to a "downloads" folder in working directory)img.download(bands="NDVI")InstallationInstalling dependencies from condaBefore installing the package you may need to install the following packages
manually:GDAL: to manipulate raster and vector
geospatial datagcloud
CLI: needed to authenticate
to Google serversIn most cases, these can be installed through conda-forge (but see alternatives
below if not):condainstall-cconda-forgegdalgoogle-cloud-sdkInstalling dependencies from binariesIf conda is somehow not an option, you can install the two dependencies from
binaries. For GDAL, useapt-getorbrew(macOS). Clear instructions have
been written on therasterioandPyPi
GDALwebsites.
For the Google Cloud SDK, follow the instructions on thegcloud
CLIwebsite.Conda -recommendedcondainstall-cconda-forgeeeharvestPippipinstall-UeeharvestAttribution and AcknowledgmentsThis software was developed by theSydney Informatics Hub, a core research
facility of the University of Sydney, as part of the Data Harvesting project for
theAgricultural Research Federation(AgReFed). AgReFed is supported by the
Australian Research Data Commons (ARDC) and the Australian Government through
the National Collaborative Research Infrastructure Strategy (NCRIS).Acknowledgments are an important way for us to demonstrate the value we bring to
your research. Your research outcomes are vital for ongoing funding of the
Sydney Informatics Hub. If you make use of this software for your research
project, please include the following acknowledgment:This research was supported by the Sydney Informatics Hub, a Core Research
Facility of the University of Sydney, and the Agricultural Research Federation
(AgReFed).CreditsGoogle Earth Engine API- Apache License 2.0eemontpackage- MIT licensegeedimpackage- Apache License 2.0geemappackage- MIT LicenseAwesome Spectral
Incices- MIT LicenseNoteThis project has been set up usingPyScaffold4.3.1 and thedsproject
extension0.7.2. For more information seeCONTRIBUTING.mdin this repository.