in src/data_utils.py [0:0]
def satellite_data(collection, region_pt, date_range):
"""Returns image data from a landsat collection.
Args:
collection: dataset name
region_pt: coordinates of location the image must contain
date_range: first and last dates to use
Returns:
object: a single satellite image
"""
return (
ee.ImageCollection(collection)
.filterBounds(ee.Geometry.Point(region_pt))
.filterDate(date_range[0], date_range[1])
.sort("CLOUD_COVER")
.first()
)