This function takes information of where and when a set of environmental samples were
collected and retrieves the Evaporative Stress Index (ESI) for those locations and times.
For more information about ESI, see description HERE.
Data come from the Climate Hazards Center InfraRed Precipitation with Station data (CHIRPS) via
the `chirps`

R package. Additionally, the optional `intervals`

argument
specifies a set of intervals over which the function will calculate the average ESI for the previous X number
of days for each location.

## Arguments

- lon
A numeric vector giving the longitude of the sampling sites in Decimal Degrees.

- lat
A numeric vector giving the latitude of the sampling sites in Decimal Degrees.

- dates
A character or date vector of dates giving the date when each sample was collected (format is YYYY-MM-DD)

- intervals
An integer vector giving a set of time intervals over which to calculate the average ESI. Default is NULL where the interval is 0 (returns the ESI value at time t). If

`intervals`

=3 then the average ESI over the preceding 3 days is returned.