RMImron commited on
Commit
72cb55b
·
verified ·
1 Parent(s): b873498

Upload 4 files

Browse files
app.py ADDED
@@ -0,0 +1,253 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # app.py
2
+ import pandas as pd
3
+ import numpy as np
4
+ import joblib
5
+ import os
6
+ from datetime import datetime
7
+ from dateutil.relativedelta import relativedelta
8
+ import gradio as gr
9
+ import matplotlib.pyplot as plt
10
+ import seaborn as sns
11
+ from PIL import Image
12
+ import io
13
+
14
+ # Load Dataset (path relatif)
15
+ dataset_path = os.path.join(os.path.dirname(__file__), 'dataset', 'data_bulanan.csv')
16
+ df_historis = pd.read_csv(dataset_path)
17
+ df_historis['YearMonth'] = pd.to_datetime(df_historis['YearMonth'], format='%Y-%m')
18
+ df_historis['month'] = df_historis['YearMonth'].dt.month
19
+ df_historis['year'] = df_historis['YearMonth'].dt.year
20
+
21
+ # Tambahkan fitur yang dibutuhkan di awal
22
+ df_historis['month_sin'] = np.sin(2 * np.pi * df_historis['month'] / 12)
23
+ df_historis['month_cos'] = np.cos(2 * np.pi * df_historis['month'] / 12)
24
+
25
+ def season(month):
26
+ return 'rainy' if month in [11, 12, 1, 2, 3, 4] else 'dry'
27
+
28
+ df_historis['season'] = df_historis['month'].apply(season)
29
+ df_historis = pd.concat([df_historis, pd.get_dummies(df_historis['season'], prefix='season')], axis=1)
30
+
31
+ # Hitung RR bulanan historis
32
+ monthly_medians = df_historis.groupby('month')['RR'].median()
33
+ monthly_stats = df_historis.groupby('month')['RR'].agg(['median', 'std']).rename(columns={'median': 'monthly_median', 'std': 'monthly_std'})
34
+
35
+ # Tambahkan RR lag12 ke data historis
36
+ df_historis = df_historis.sort_values('YearMonth')
37
+ df_historis['RR_lag12'] = df_historis['RR'].shift(12)
38
+ df_historis = df_historis.reset_index(drop=True)
39
+
40
+ # Fungsi preprocessing
41
+ def preprocess_single_row_from_date(input_date: str) -> pd.DataFrame:
42
+ """Preprocess input tanggal (YYYY-MM-DD) jadi 1-row DataFrame dengan fitur lengkap"""
43
+ target_date = pd.to_datetime(input_date).replace(day=1) # Pastikan awal bulan
44
+ df_all = df_historis.copy()
45
+
46
+ # Ambil 12 bulan sebelumnya
47
+ past_12_months = target_date - pd.DateOffset(months=12)
48
+ df_up_to = df_all[df_all['YearMonth'] <= past_12_months]
49
+
50
+ # Cek apakah data cukup panjang
51
+ if df_up_to.empty:
52
+ raise ValueError(f"Tanggal {input_date} tidak punya data historis 12 bulan ke belakang.")
53
+
54
+ month = target_date.month
55
+ season_str = season(month)
56
+
57
+ # Buat 1 baris data
58
+ row = {
59
+ 'YearMonth': target_date,
60
+ 'month': month,
61
+ 'month_cos': np.cos(2 * np.pi * month / 12),
62
+ 'season_dry': 1 if season_str == 'dry' else 0,
63
+ 'season_rainy': 1 if season_str == 'rainy' else 0,
64
+ }
65
+
66
+ # Ambil RR_lag12
67
+ rr_lag12_date = target_date - pd.DateOffset(months=12)
68
+ rr_lag12 = df_all.loc[df_all['YearMonth'] == rr_lag12_date, 'RR']
69
+ row['RR_lag12'] = rr_lag12.values[0] if not rr_lag12.empty else np.nan
70
+
71
+ # Fitur statistik LOO bulan target
72
+ rr_values_bulan_ini = df_all[df_all['month'] == month]['RR'].values
73
+ if len(rr_values_bulan_ini) < 2:
74
+ row['RR_monthly_median_loo'] = np.nan
75
+ row['RR_monthly_std_loo'] = np.nan
76
+ else:
77
+ rr_loo = rr_values_bulan_ini[:-1] # anggap data terakhir belum tersedia
78
+ row['RR_monthly_median_loo'] = np.median(rr_loo)
79
+ row['RR_monthly_std_loo'] = np.std(rr_loo, ddof=1)
80
+
81
+ # RR_above_monthly_median: bandingkan dengan median historis bulan tsb
82
+ row['RR_above_monthly_median'] = (
83
+ 1 if row['RR_monthly_median_loo'] > monthly_medians[month] else 0
84
+ )
85
+
86
+ # Return sebagai DataFrame
87
+ return pd.DataFrame([row])
88
+
89
+ # Fungsi untuk load model
90
+ def load_model():
91
+ model_path = os.path.join(os.path.dirname(__file__), 'model', 'ModelFinalSVR_rainfallpkl.pkl')
92
+ model = joblib.load(model_path)
93
+ return model
94
+
95
+ # Load model
96
+ model = load_model()
97
+
98
+ # PREDIKSI 1 BULAN
99
+ def prediksi_curah_hujan(bulan_input: str):
100
+ """Fungsi untuk memprediksi curah hujan berdasarkan bulan input."""
101
+ df_row = preprocess_single_row_from_date(bulan_input)
102
+ features = [
103
+ 'month_cos',
104
+ 'RR_lag12',
105
+ 'season_dry',
106
+ 'season_rainy',
107
+ 'RR_above_monthly_median',
108
+ 'RR_monthly_median_loo',
109
+ 'RR_monthly_std_loo',
110
+ ]
111
+ X = df_row[features]
112
+ prediksi = model.predict(X)
113
+ return prediksi[0]
114
+
115
+ # PREDIKSI BANYAK BULAN
116
+ def predict_range(start: str, end: str) -> pd.DataFrame:
117
+ """Melakukan prediksi curah hujan untuk rentang bulan tertentu."""
118
+ start_date = datetime.strptime(start, "%Y-%m")
119
+ end_date = datetime.strptime(end, "%Y-%m")
120
+ if start_date > end_date:
121
+ raise ValueError("Bulan awal tidak boleh lebih besar dari bulan akhir")
122
+
123
+ dates = []
124
+ current = start_date
125
+ while current <= end_date:
126
+ dates.append(current.strftime("%Y-%m"))
127
+ current += relativedelta(months=1)
128
+
129
+ processed_rows = []
130
+ for bulan_input in dates:
131
+ try:
132
+ row = preprocess_single_row_from_date(bulan_input)
133
+ processed_rows.append(row)
134
+ except Exception as e:
135
+ print(f"[SKIP] {bulan_input} gagal diproses: {e}")
136
+
137
+ if not processed_rows:
138
+ raise ValueError("Tidak ada bulan yang berhasil diproses.")
139
+
140
+ df_all = pd.concat(processed_rows, ignore_index=True)
141
+
142
+ features = [
143
+ 'month_cos',
144
+ 'RR_lag12',
145
+ 'season_dry',
146
+ 'season_rainy',
147
+ 'RR_above_monthly_median',
148
+ 'RR_monthly_median_loo',
149
+ 'RR_monthly_std_loo',
150
+ ]
151
+
152
+ X = df_all[features]
153
+ y_pred = model.predict(X)
154
+
155
+ df_result = pd.DataFrame({
156
+ 'input_month': df_all['YearMonth'].dt.strftime('%Y-%m'),
157
+ 'prediksi_rr': y_pred
158
+ })
159
+
160
+ return df_result
161
+
162
+ # Gradio interface untuk visualisasi
163
+ def gradio_predict(start_month: str, end_month: str):
164
+ try:
165
+ df_pred = predict_range(start_month, end_month)
166
+ df_pred['input_month'] = pd.to_datetime(df_pred['input_month'])
167
+
168
+ # Label bulan dalam Bahasa Indonesia
169
+ bulan_indonesia = [
170
+ 'Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni',
171
+ 'Juli', 'Agustus', 'September', 'Oktober', 'November', 'Desember'
172
+ ]
173
+ df_pred['bulan_label'] = df_pred['input_month'].dt.month.apply(lambda x: bulan_indonesia[x-1]) + \
174
+ ' ' + df_pred['input_month'].dt.year.astype(str)
175
+
176
+ # Setup visualisasi
177
+ plt.figure(figsize=(15, 8))
178
+ sns.set_style("whitegrid")
179
+
180
+ # Warna berdasarkan nilai
181
+ cmap = plt.cm.Blues
182
+ norm = plt.Normalize(df_pred['prediksi_rr'].min(), df_pred['prediksi_rr'].max())
183
+ colors = cmap(norm(df_pred['prediksi_rr'].values))
184
+
185
+ # Garis utama
186
+ sns.lineplot(data=df_pred, x='bulan_label', y='prediksi_rr', color='darkcyan', linewidth=2, marker='o')
187
+
188
+ # Titik-titik & label nilai
189
+ for i, row in df_pred.iterrows():
190
+ plt.scatter(row['bulan_label'], row['prediksi_rr'], color=colors[i], s=120, edgecolor='black', zorder=5)
191
+ plt.text(
192
+ row['bulan_label'], row['prediksi_rr'] + 4,
193
+ f"{row['prediksi_rr']:.1f} mm", ha='center', va='bottom',
194
+ fontsize=9, color='black', bbox=dict(boxstyle="round,pad=0.2", fc="white", ec="gray", alpha=0.7)
195
+ )
196
+
197
+ # Titik ekstrem (max dan min)
198
+ max_idx = df_pred['prediksi_rr'].idxmax()
199
+ min_idx = df_pred['prediksi_rr'].idxmin()
200
+ plt.scatter(df_pred.loc[max_idx, 'bulan_label'], df_pred.loc[max_idx, 'prediksi_rr'],
201
+ color='red', s=150, label='Tertinggi', zorder=6)
202
+ plt.scatter(df_pred.loc[min_idx, 'bulan_label'], df_pred.loc[min_idx, 'prediksi_rr'],
203
+ color='blue', s=150, label='Terendah', zorder=6)
204
+
205
+ # Garis rata-rata
206
+ mean_val = df_pred['prediksi_rr'].mean()
207
+ plt.axhline(mean_val, color='orange', linestyle='--', linewidth=1.2, label=f'Rata-rata: {mean_val:.1f} mm')
208
+ plt.text(
209
+ x=len(df_pred) - 3, y=mean_val + 6,
210
+ s=f'{mean_val:.1f} mm', color='orange', fontsize=10, style='italic'
211
+ )
212
+
213
+ # Pengaturan plot
214
+ plt.title('Prediksi Curah Hujan Bulanan\nWilayah: Kota Bandung', fontsize=18, weight='bold')
215
+ plt.xlabel('Bulan', fontsize=12)
216
+ plt.ylabel('Curah Hujan (mm)', fontsize=12)
217
+ plt.xticks(rotation=45)
218
+ plt.legend()
219
+ plt.grid(True, linestyle='--', alpha=0.5)
220
+ plt.tight_layout()
221
+
222
+ # Simpan plot ke buffer
223
+ buf = io.BytesIO()
224
+ plt.savefig(buf, format='png', dpi=300)
225
+ plt.close()
226
+ buf.seek(0)
227
+ img = Image.open(buf)
228
+
229
+ # Format hasil tabel
230
+ df_pred['input_month'] = df_pred['input_month'].dt.strftime('%Y-%m')
231
+ result_str = df_pred[['input_month', 'prediksi_rr']].rename(
232
+ columns={'input_month': 'Bulan', 'prediksi_rr': 'Prediksi RR (mm)'}
233
+ ).to_string(index=False)
234
+
235
+ return result_str, img
236
+
237
+ except Exception as e:
238
+ return f"Terjadi kesalahan: {str(e)}", None
239
+
240
+ # Setup Gradio Interface
241
+ gr.Interface(
242
+ fn=gradio_predict,
243
+ inputs=[
244
+ gr.Textbox(label="Bulan Awal (format: YYYY-MM)", placeholder="contoh: 2023-01"),
245
+ gr.Textbox(label="Bulan Akhir (format: YYYY-MM)", placeholder="contoh: 2023-12")
246
+ ],
247
+ outputs=[
248
+ gr.Textbox(label="Tabel Hasil Prediksi"),
249
+ gr.Image(label="Visualisasi Curah Hujan")
250
+ ],
251
+ title="Aplikasi Prediksi Curah Hujan",
252
+ description="Masukkan rentang bulan untuk memprediksi curah hujan bulanan."
253
+ ).launch()
dataset/data_bulanan.csv ADDED
@@ -0,0 +1,389 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ YearMonth,RR
2
+ 1993-01,251.08135025656145
3
+ 1993-02,150.37262839504174
4
+ 1993-03,390.7
5
+ 1993-04,197.0075286170563
6
+ 1993-05,122.56188768000386
7
+ 1993-06,118.69999999999999
8
+ 1993-07,14.566219567258194
9
+ 1993-08,96.1
10
+ 1993-09,80.4
11
+ 1993-10,134.3
12
+ 1993-11,240.12527981766715
13
+ 1993-12,344.4766996714088
14
+ 1994-01,366.77182912490593
15
+ 1994-02,225.6
16
+ 1994-03,363.2
17
+ 1994-04,432.5660649351236
18
+ 1994-05,85.4
19
+ 1994-06,65.5
20
+ 1994-07,0.0
21
+ 1994-08,11.7
22
+ 1994-09,57.5351072686592
23
+ 1994-10,51.6
24
+ 1994-11,243.98012230099923
25
+ 1994-12,216.66464940636305
26
+ 1995-01,199.1891677897583
27
+ 1995-02,127.13280608084733
28
+ 1995-03,278.1180329428387
29
+ 1995-04,182.04822301879344
30
+ 1995-05,202.53895422814801
31
+ 1995-06,129.6
32
+ 1995-07,50.5
33
+ 1995-08,0.0
34
+ 1995-09,81.49468997686888
35
+ 1995-10,229.9
36
+ 1995-11,397.03326111728165
37
+ 1995-12,129.9028443439577
38
+ 1996-01,292.4
39
+ 1996-02,166.29999999999998
40
+ 1996-03,229.70000000000002
41
+ 1996-04,342.6994459381333
42
+ 1996-05,101.85526951873305
43
+ 1996-06,69.29116051763859
44
+ 1996-07,90.7
45
+ 1996-08,108.30816330151055
46
+ 1996-09,172.0
47
+ 1996-10,292.3
48
+ 1996-11,610.2
49
+ 1996-12,242.51779630088916
50
+ 1997-01,156.19956676540858
51
+ 1997-02,125.0796972537279
52
+ 1997-03,188.7
53
+ 1997-04,241.19844826637615
54
+ 1997-05,206.41137921233945
55
+ 1997-06,7.616059180328022
56
+ 1997-07,15.53677889077752
57
+ 1997-08,16.557572497186086
58
+ 1997-09,1.4
59
+ 1997-10,37.0
60
+ 1997-11,116.47118852757926
61
+ 1997-12,331.7959182704611
62
+ 1998-01,183.6
63
+ 1998-02,414.5295496360607
64
+ 1998-03,507.172770065446
65
+ 1998-04,314.92894396846464
66
+ 1998-05,181.52427268445223
67
+ 1998-06,244.5758154519582
68
+ 1998-07,135.77302400218824
69
+ 1998-08,74.6
70
+ 1998-09,134.3
71
+ 1998-10,211.4639977605679
72
+ 1998-11,229.42735335397427
73
+ 1998-12,97.6
74
+ 1999-01,199.58415299855494
75
+ 1999-02,118.87401572211743
76
+ 1999-03,240.673351922766
77
+ 1999-04,133.3942558576711
78
+ 1999-05,248.3
79
+ 1999-06,74.07277449141301
80
+ 1999-07,77.18755196634574
81
+ 1999-08,25.363982480635606
82
+ 1999-09,18.7
83
+ 1999-10,265.7
84
+ 1999-11,295.1514942143291
85
+ 1999-12,244.96981379033673
86
+ 2000-01,279.38441758682706
87
+ 2000-02,142.57330537170455
88
+ 2000-03,138.05966091042984
89
+ 2000-04,262.6149202763099
90
+ 2000-05,240.1
91
+ 2000-06,49.712135218936865
92
+ 2000-07,80.2
93
+ 2000-08,20.922727915835882
94
+ 2000-09,51.67500379888218
95
+ 2000-10,158.05452928517144
96
+ 2000-11,337.67202002399347
97
+ 2000-12,80.58619478377489
98
+ 2001-01,223.32430779195107
99
+ 2001-02,253.31578383391732
100
+ 2001-03,217.0204668177401
101
+ 2001-04,259.1920090553131
102
+ 2001-05,93.03265954761467
103
+ 2001-06,87.5
104
+ 2001-07,193.86357214461242
105
+ 2001-08,52.3
106
+ 2001-09,108.79184391497556
107
+ 2001-10,415.82291931200433
108
+ 2001-11,526.4
109
+ 2001-12,75.5
110
+ 2002-01,374.8903931276039
111
+ 2002-02,112.27804616775673
112
+ 2002-03,344.1
113
+ 2002-04,183.5
114
+ 2002-05,55.0
115
+ 2002-06,54.1
116
+ 2002-07,133.72269337818736
117
+ 2002-08,37.8
118
+ 2002-09,10.3
119
+ 2002-10,20.8
120
+ 2002-11,211.5421684180434
121
+ 2002-12,465.37348277161055
122
+ 2003-01,70.10004662530501
123
+ 2003-02,271.2144064775262
124
+ 2003-03,359.05275430266335
125
+ 2003-04,136.7594288099275
126
+ 2003-05,116.91849302846519
127
+ 2003-06,37.593951646601816
128
+ 2003-07,40.5
129
+ 2003-08,78.69715959751016
130
+ 2003-09,79.56816330299387
131
+ 2003-10,320.2
132
+ 2003-11,185.6
133
+ 2003-12,203.97199722009177
134
+ 2004-01,209.14869058580464
135
+ 2004-02,232.77658162240834
136
+ 2004-03,249.74186884319855
137
+ 2004-04,303.6981899422686
138
+ 2004-05,286.5
139
+ 2004-06,88.35156126272939
140
+ 2004-07,40.18089163282056
141
+ 2004-08,11.4
142
+ 2004-09,86.05290014705008
143
+ 2004-10,86.9985807167679
144
+ 2004-11,190.63494526593695
145
+ 2004-12,255.86157928520208
146
+ 2005-01,170.86775735669755
147
+ 2005-02,440.88667294204924
148
+ 2005-03,310.97987800600606
149
+ 2005-04,257.5511957678716
150
+ 2005-05,209.84899495802273
151
+ 2005-06,212.20178506431148
152
+ 2005-07,98.946595329573
153
+ 2005-08,66.68359438387021
154
+ 2005-09,158.3680740956845
155
+ 2005-10,156.42384803930068
156
+ 2005-11,237.80625912916258
157
+ 2005-12,205.7000281469098
158
+ 2006-01,326.95405226015663
159
+ 2006-02,282.3
160
+ 2006-03,74.73169255551863
161
+ 2006-04,241.7572058518405
162
+ 2006-05,112.83292031444998
163
+ 2006-06,51.36871787119322
164
+ 2006-07,58.776975287238486
165
+ 2006-08,0.0
166
+ 2006-09,1.7243913136799156
167
+ 2006-10,58.200007910300585
168
+ 2006-11,129.18779806716452
169
+ 2006-12,512.9060308617175
170
+ 2007-01,133.67910950905053
171
+ 2007-02,409.0949626599001
172
+ 2007-03,132.95584296984413
173
+ 2007-04,505.43323039858274
174
+ 2007-05,126.36308591260254
175
+ 2007-06,187.05782736876162
176
+ 2007-07,11.0
177
+ 2007-08,88.91379184788718
178
+ 2007-09,182.39012278636278
179
+ 2007-10,179.20518873492944
180
+ 2007-11,361.63393565709316
181
+ 2007-12,382.5317880490638
182
+ 2008-01,259.42332246135635
183
+ 2008-02,135.0279473718514
184
+ 2008-03,242.4
185
+ 2008-04,322.4216281192347
186
+ 2008-05,181.21353666767806
187
+ 2008-06,79.20694948920988
188
+ 2008-07,3.6
189
+ 2008-08,77.78154170139875
190
+ 2008-09,56.21896326501911
191
+ 2008-10,140.53869295256138
192
+ 2008-11,289.15698476922597
193
+ 2008-12,366.93714169165577
194
+ 2009-01,210.5175561599849
195
+ 2009-02,236.238456637764
196
+ 2009-03,393.82480475116427
197
+ 2009-04,176.1962427810293
198
+ 2009-05,189.91508002729583
199
+ 2009-06,108.37496339673358
200
+ 2009-07,33.16611481118132
201
+ 2009-08,0.8107843564343054
202
+ 2009-09,28.73432976910153
203
+ 2009-10,261.977011414297
204
+ 2009-11,376.02317802750304
205
+ 2009-12,279.0434776062234
206
+ 2010-01,365.5868947485269
207
+ 2010-02,557.1
208
+ 2010-03,559.6204706837364
209
+ 2010-04,96.07836702312055
210
+ 2010-05,372.59388433043284
211
+ 2010-06,170.39615551647037
212
+ 2010-07,241.5526951691408
213
+ 2010-08,120.99924674320692
214
+ 2010-09,428.7780825562002
215
+ 2010-10,256.16272504824616
216
+ 2010-11,439.3425717528467
217
+ 2010-12,246.03237363945593
218
+ 2011-01,122.3216474413144
219
+ 2011-02,90.20470946764267
220
+ 2011-03,120.39939211185718
221
+ 2011-04,382.63329712253
222
+ 2011-05,194.6848614812256
223
+ 2011-06,132.9504670566075
224
+ 2011-07,95.46910412640837
225
+ 2011-08,3.1
226
+ 2011-09,107.88865878793106
227
+ 2011-10,108.97120779210906
228
+ 2011-11,336.5365683828699
229
+ 2011-12,293.08774118583204
230
+ 2012-01,123.4341690333577
231
+ 2012-02,304.9602420483437
232
+ 2012-03,163.02809044787992
233
+ 2012-04,297.9517169383213
234
+ 2012-05,265.4726136905434
235
+ 2012-06,89.10649705767621
236
+ 2012-07,37.58064647205457
237
+ 2012-08,0.0
238
+ 2012-09,33.143910586239556
239
+ 2012-10,127.11403073964557
240
+ 2012-11,564.7500572457384
241
+ 2012-12,636.9
242
+ 2013-01,216.9
243
+ 2013-02,263.4380887675806
244
+ 2013-03,316.2171989666979
245
+ 2013-04,297.55764098933577
246
+ 2013-05,177.8605237239985
247
+ 2013-06,255.84827812249927
248
+ 2013-07,174.51388936268847
249
+ 2013-08,75.40921745179475
250
+ 2013-09,194.2366861979934
251
+ 2013-10,205.29695015015193
252
+ 2013-11,182.0503861612477
253
+ 2013-12,390.23534052627275
254
+ 2014-01,323.44980090226267
255
+ 2014-02,174.9602071533784
256
+ 2014-03,345.8792037963495
257
+ 2014-04,319.15228565699755
258
+ 2014-05,218.86862871420595
259
+ 2014-06,220.22329943366452
260
+ 2014-07,222.00963423847557
261
+ 2014-08,162.48290652468685
262
+ 2014-09,30.697103757073187
263
+ 2014-10,150.77532707802038
264
+ 2014-11,280.5327621963137
265
+ 2014-12,311.22660915720354
266
+ 2015-01,268.44597478139076
267
+ 2015-02,261.9220380209493
268
+ 2015-03,347.5202104325999
269
+ 2015-04,317.2672873718662
270
+ 2015-05,264.29672356457803
271
+ 2015-06,94.79472625847774
272
+ 2015-07,28.48681767396458
273
+ 2015-08,26.418829633355696
274
+ 2015-09,61.70861829094549
275
+ 2015-10,65.51097262740697
276
+ 2015-11,505.50977741742184
277
+ 2015-12,334.62812309356366
278
+ 2016-01,451.05832137686497
279
+ 2016-02,208.42041817018406
280
+ 2016-03,447.45806563130395
281
+ 2016-04,469.7255801955244
282
+ 2016-05,378.0961339270254
283
+ 2016-06,180.76857229278173
284
+ 2016-07,206.20425159965515
285
+ 2016-08,177.78658334208833
286
+ 2016-09,309.94783792135735
287
+ 2016-10,385.38446987853877
288
+ 2016-11,472.54993120938644
289
+ 2016-12,89.58773722976137
290
+ 2017-01,91.59854510058943
291
+ 2017-02,203.94350300763767
292
+ 2017-03,427.7059284805644
293
+ 2017-04,231.50285036316524
294
+ 2017-05,252.61527270669504
295
+ 2017-06,163.97346571055053
296
+ 2017-07,215.8306004618938
297
+ 2017-08,63.98220588075185
298
+ 2017-09,92.5756682215938
299
+ 2017-10,346.8
300
+ 2017-11,457.9926554140231
301
+ 2017-12,168.42776093948407
302
+ 2018-01,209.70965888869222
303
+ 2018-02,239.91616485384893
304
+ 2018-03,292.097431011106
305
+ 2018-04,313.4874464952281
306
+ 2018-05,141.3978006017689
307
+ 2018-06,33.4
308
+ 2018-07,15.664818099662051
309
+ 2018-08,40.21016547118674
310
+ 2018-09,54.08733528243221
311
+ 2018-10,141.58974882140342
312
+ 2018-11,498.56752131042197
313
+ 2018-12,325.52770785091076
314
+ 2019-01,231.4
315
+ 2019-02,275.269297009915
316
+ 2019-03,237.81367790969256
317
+ 2019-04,314.4744094372529
318
+ 2019-05,262.36848518322546
319
+ 2019-06,26.5
320
+ 2019-07,17.248187844876682
321
+ 2019-08,2.6167495556427434
322
+ 2019-09,57.339936906043654
323
+ 2019-10,91.76411978893357
324
+ 2019-11,278.9860029033337
325
+ 2019-12,367.74898035024984
326
+ 2020-01,293.20641769857497
327
+ 2020-02,372.5957914042957
328
+ 2020-03,346.55076947047854
329
+ 2020-04,343.9137634262813
330
+ 2020-05,260.8945506303953
331
+ 2020-06,112.09918095252984
332
+ 2020-07,157.40915303926636
333
+ 2020-08,80.4529869918556
334
+ 2020-09,144.657204262832
335
+ 2020-10,338.4963294135904
336
+ 2020-11,241.16637931037678
337
+ 2020-12,148.6836525618784
338
+ 2021-01,265.42343836962976
339
+ 2021-02,191.2224652264138
340
+ 2021-03,385.578105212618
341
+ 2021-04,311.25680902408845
342
+ 2021-05,295.5328755958329
343
+ 2021-06,138.95568449582794
344
+ 2021-07,155.20393442994296
345
+ 2021-08,166.97661914699515
346
+ 2021-09,216.3185847615164
347
+ 2021-10,302.5802034466951
348
+ 2021-11,472.991881394166
349
+ 2021-12,230.0184447192437
350
+ 2022-01,125.8100259311639
351
+ 2022-02,153.30683845792902
352
+ 2022-03,238.45949809096317
353
+ 2022-04,420.65234252780795
354
+ 2022-05,280.3307643523407
355
+ 2022-06,242.72385238238581
356
+ 2022-07,178.0948265160396
357
+ 2022-08,118.98603546767782
358
+ 2022-09,294.62060502656965
359
+ 2022-10,335.92
360
+ 2022-11,309.00269772787976
361
+ 2022-12,343.4114186277845
362
+ 2023-01,211.13494915526633
363
+ 2023-02,120.40668991499172
364
+ 2023-03,343.1042983486973
365
+ 2023-04,399.7114552397399
366
+ 2023-05,317.588290958841
367
+ 2023-06,245.32943432669816
368
+ 2023-07,92.57339297952734
369
+ 2023-08,73.86438118727291
370
+ 2023-09,76.36124630750058
371
+ 2023-10,156.7884226357093
372
+ 2023-11,368.0072365245131
373
+ 2023-12,418.74159053603546
374
+ 2024-01,360.83871763682805
375
+ 2024-02,335.6914371466504
376
+ 2024-03,307.9739595430766
377
+ 2024-04,228.31447305647336
378
+ 2024-05,170.3470991761926
379
+ 2024-06,239.8851788966072
380
+ 2024-07,40.932802665391954
381
+ 2024-08,22.900000000000002
382
+ 2024-09,179.85871676743912
383
+ 2024-10,136.4342202266847
384
+ 2024-11,549.6916845822988
385
+ 2024-12,265.5119508617036
386
+ 2025-01,161.2660874675449
387
+ 2025-02,193.27965381794792
388
+ 2025-03,364.7579048790125
389
+ 2025-04,233.1
model/ModelFinalSVR_rainfallpkl.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e99dea464402def4ac1ac9d99999e214ed213e1572a4510491bbc1266447fbb7
3
+ size 22334
requirements.txt ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ gradio
2
+ matplotlib
3
+ pandas
4
+ seaborn
5
+ scikit-learn
6
+ joblib
7
+ python-dateutil