I came across an example shared on YouTube by Madhu Mysore. Here is the link: https://www.youtube.com/watch?v=IGUYSeoeHhg&t=2105s.
I changed the code as I am not interested in regions at the moment, but rather in daily/weekly observations. What I am struggling to do is to add a timestamp to the following code. I checked multiple forums and EE developers page but cannot figure it out.
import ee
import pandas as pd
ee.Initialize()
districts = ee.FeatureCollection('users/mdm/za/za_districts')
chirps = ee.ImageCollection("UCSB-CHG/CHIRPS/DAILY").select('precipitation').filterDate('2018-01-01', '2018-12-31').mean()
evi = ee.ImageCollection('MODIS/006/MOD13A2').select('EVI').filterDate('2018-01-01', '2018-12-31').mean()
composite = ee.Image.cat([chirps, evi])
dist_stats = composite.reduceRegions(districts, 'mean', 5000)
dist_stats = dist_stats.select(['precipitation', 'EVI'], ['tot_rainfall', 'med_evi'], retainGeometry=False).getInfo()
dtstats_df = pd.DataFrame()
for dist in dist_stats['features']:
df = pd.DataFrame([dist['properties']],columns=dist['properties'].keys())
dtstats_df = pd.concat([dtstats_df, df], axis=0)
dtstats_df = dtstats_df[['tot_rainfall', 'med_evi']]
dtstats_df