Aki298 commited on
Commit
3282ce0
·
verified ·
1 Parent(s): 22f2398

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +288 -0
README.md ADDED
@@ -0,0 +1,288 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ language:
4
+ - en
5
+ pretty_name: Sagil Monthly GEE Environmental Risk Dataset
6
+ size_categories:
7
+ - 1K<n<10K
8
+ task_categories:
9
+ - tabular-regression
10
+ - time-series-forecasting
11
+ tags:
12
+ - earth-engine
13
+ - remote-sensing
14
+ - environmental-monitoring
15
+ - flood-risk
16
+ - drought-risk
17
+ - agriculture
18
+ - malaysia
19
+ - time-series
20
+ ---
21
+
22
+ # Sagil Monthly GEE Environmental Risk Dataset
23
+
24
+ This dataset contains monthly Google Earth Engine environmental observations and deterministic time-series features for agricultural grid cells in Sagil, Tangkak, Johor, Malaysia.
25
+
26
+ It supports a prototype task:
27
+
28
+ ```text
29
+ monthly environmental features at month t
30
+ -> one-month-ahead signed flood/drought proxy-risk score at month t+1
31
+ ```
32
+
33
+ The learned score used by the project is an environmental anomaly and directional risk proxy. It is not a verified flood event label, crop-loss label, or calibrated flood/drought probability.
34
+
35
+ ## Dataset Summary
36
+
37
+ - Study area: Sagil, Tangkak, Johor, Malaysia
38
+ - Spatial unit: 1 km x 1 km grid-cell centroid
39
+ - Current valid grid cells: 49
40
+ - Monthly period: 2021-01-01 through 2026-06-01
41
+ - Months per valid grid cell: 66
42
+ - Processed rows: 3,234
43
+ - Data type: tabular monthly spatiotemporal environmental data
44
+ - Primary file for modeling: `processed/processed_data.csv`
45
+
46
+ ## Repository Structure
47
+
48
+ ```text
49
+ input/
50
+ coordinates.csv
51
+
52
+ metadata/
53
+ sample_index.csv
54
+ extraction_manifest.json
55
+
56
+ raw/
57
+ monthly/
58
+ sagil_1.csv
59
+ sagil_2.csv
60
+ ...
61
+
62
+ processed/
63
+ processed_data.csv
64
+ ```
65
+
66
+ ## File Descriptions
67
+
68
+ ### `input/coordinates.csv`
69
+
70
+ Manual coordinate source for the Sagil grid cells.
71
+
72
+ Important columns:
73
+
74
+ ```text
75
+ sample_id
76
+ grid_row
77
+ grid_col
78
+ latitude
79
+ longitude
80
+ study_area
81
+ cell_size_m
82
+ ```
83
+
84
+ Each row represents the centroid of a 1 km x 1 km grid cell. `grid_row = 0` is the northernmost row and `grid_col = 0` is the westernmost column.
85
+
86
+ ### `metadata/sample_index.csv`
87
+
88
+ Extraction lookup table for raw monthly files.
89
+
90
+ Important columns:
91
+
92
+ ```text
93
+ sample_id
94
+ grid_row
95
+ grid_col
96
+ latitude
97
+ longitude
98
+ cell_area_m2
99
+ first_month
100
+ last_month
101
+ row_count
102
+ raw_csv
103
+ extraction_status
104
+ ```
105
+
106
+ Use rows with `extraction_status = ok` for modeling.
107
+
108
+ ### `metadata/extraction_manifest.json`
109
+
110
+ Extraction run metadata, including:
111
+
112
+ ```text
113
+ extraction timestamp
114
+ study area
115
+ first and last month
116
+ month count
117
+ source datasets
118
+ thresholds
119
+ failed samples
120
+ ```
121
+
122
+ ### `raw/monthly/<sample_id>.csv`
123
+
124
+ One raw monthly observation file per valid grid cell. Each file contains 66 monthly rows.
125
+
126
+ Raw observation groups include:
127
+
128
+ - Identifiers: `sample_id`, `grid_row`, `grid_col`, `latitude`, `longitude`, `month`
129
+ - Sentinel-2 optical indices: `ndvi_mean`, `evi_mean`, `ndmi_mean`, `ndwi_mean`
130
+ - Sentinel-2 quality: `s2_image_count`, `s2_valid_pixel_fraction`
131
+ - Sentinel-1 SAR: `vv_mean_db`, `vh_mean_db`, `vv_minus_vh_db`, `vv_vh_ratio_linear`, `s1_image_count`
132
+ - CHIRPS rainfall: `rainfall_total_mm`, `rainfall_mean_daily_mm`, `rainfall_max_1day_mm`, `dry_days_count`, `heavy_rain_days_count`
133
+ - ERA5-Land climate and water variables: `temperature_2m_mean_c`, `relative_humidity_mean_pct`, `soil_water_layer1_mean`, `surface_runoff_total_m`, `evaporation_total_m`
134
+ - Dynamic World probabilities: `water_probability_mean`, `flooded_vegetation_probability_mean`, `built_probability_mean`, `dynamicworld_image_count`
135
+ - Terrain and historical extent: `elevation_mean_m`, `elevation_min_m`, `elevation_max_m`, `slope_mean_deg`, `lowland_fraction`, `max_water_extent_fraction`
136
+ - Missingness flags: `optical_missing_flag`, `sar_missing_flag`, `climate_missing_flag`, `any_missing_flag`
137
+
138
+ ### `processed/processed_data.csv`
139
+
140
+ Combined model-ready deterministic feature table.
141
+
142
+ It contains:
143
+
144
+ - all raw monthly observation columns
145
+ - calendar features: `year`, `month_number`, `month_sin`, `month_cos`
146
+ - lag features for selected hydrology, vegetation, SAR, and water variables
147
+ - rolling mean and rolling sum features
148
+ - month-to-month difference features
149
+
150
+ It intentionally does not contain:
151
+
152
+ - learned anomaly scores
153
+ - learned risk scores
154
+ - one-month-ahead target columns
155
+ - model predictions
156
+
157
+ Those values are generated in the modeling pipeline so that training-only preprocessing and target construction remain leakage-controlled.
158
+
159
+ ## Source Datasets
160
+
161
+ The dataset is derived through Google Earth Engine using:
162
+
163
+ - Sentinel-2 Surface Reflectance Harmonized
164
+ - Sentinel-1 GRD
165
+ - CHIRPS Daily Rainfall
166
+ - ERA5-Land Daily Aggregates
167
+ - Dynamic World V1
168
+ - SRTM elevation
169
+ - JRC Global Surface Water maximum extent
170
+
171
+ Please consult the original providers' terms for downstream use and redistribution requirements.
172
+
173
+ ## Intended Use
174
+
175
+ This dataset is intended for:
176
+
177
+ - academic machine learning experiments
178
+ - environmental time-series forecasting prototypes
179
+ - flood/drought proxy-risk modeling
180
+ - remote-sensing feature engineering demonstrations
181
+ - chronological train/test/holdout evaluation
182
+
183
+ The matching project code constructs a learned signed risk proxy and trains:
184
+
185
+ - persistence baseline
186
+ - Ridge regression
187
+ - Random Forest regressor
188
+ - LSTM sequence model
189
+ - Transformer encoder sequence model
190
+
191
+ ## Not Intended For
192
+
193
+ This dataset should not be used as:
194
+
195
+ - an official flood warning dataset
196
+ - a calibrated disaster-probability dataset
197
+ - verified crop-loss or damage labels
198
+ - a substitute for field survey, hydrological model output, river gauge data, or official disaster records
199
+
200
+ ## Risk Proxy Method
201
+
202
+ The project builds the target outside `processed_data.csv`.
203
+
204
+ For each grid cell `i` and month `t`, selected environmental variables form:
205
+
206
+ ```text
207
+ x_i,t
208
+ ```
209
+
210
+ Training-fitted preprocessing:
211
+
212
+ ```text
213
+ z_i,t = StandardScaler(MedianImputer(x_i,t))
214
+ ```
215
+
216
+ Anomaly magnitude:
217
+
218
+ ```text
219
+ anomaly_magnitude = mean((z_i,t - MLP_reconstruct(z_i,t))^2)
220
+ ```
221
+
222
+ Flood/drought direction is estimated from standardized environmental indicators:
223
+
224
+ ```text
225
+ flood_direction_score = average of positive wetness and flood indicators
226
+ drought_direction_score = average of dry and vegetation-stress indicators
227
+ ```
228
+
229
+ Signed proxy score:
230
+
231
+ ```text
232
+ signed_risk_score = anomaly_magnitude * direction_sign
233
+ ```
234
+
235
+ where:
236
+
237
+ ```text
238
+ direction_sign = +1 for flood-directed anomaly
239
+ direction_sign = -1 for drought-directed anomaly
240
+ direction_sign = 0 for neutral or ambiguous anomaly
241
+ ```
242
+
243
+ Forecasting target:
244
+
245
+ ```text
246
+ target_risk_score_t_plus_1 = signed_risk_score at month t+1
247
+ ```
248
+
249
+ ## Temporal Split Used In The Project
250
+
251
+ The project code uses target-month splitting:
252
+
253
+ ```text
254
+ train: target_month <= 2025-05-01
255
+ test: 2025-06-01 <= target_month <= 2026-05-01
256
+ holdout: target_month == 2026-06-01
257
+ ```
258
+
259
+ The June 2026 source row has no July 2026 target and is excluded from supervised evaluation.
260
+
261
+ ## Loading Example
262
+
263
+ ```python
264
+ from huggingface_hub import snapshot_download
265
+ import pandas as pd
266
+
267
+ local_dir = snapshot_download(
268
+ repo_id="Aki298/AML-Johor-Tangkak-Sagil-GEE-dataset",
269
+ repo_type="dataset",
270
+ local_dir="data",
271
+ )
272
+
273
+ processed = pd.read_csv("data/processed/processed_data.csv")
274
+ coordinates = pd.read_csv("data/input/coordinates.csv")
275
+ ```
276
+
277
+ ## Limitations
278
+
279
+ - The target risk score is self-supervised and proxy-based, not field-verified.
280
+ - The current release covers one agricultural study area in Sagil, Johor.
281
+ - The effective independent sample size is smaller than the row count because neighboring grid cells and adjacent months are correlated.
282
+ - Next-month flood/drought behavior may depend on future rainfall and hydrological conditions that are not known at month `t`.
283
+ - Model results should be interpreted as prototype environmental-risk forecasting, not operational disaster forecasting.
284
+
285
+ ## Citation
286
+
287
+ If using this dataset, cite the dataset repository and acknowledge the original Earth observation and climate data providers used through Google Earth Engine.
288
+