Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -358,7 +358,7 @@ def update_oni_data():
|
|
358 |
|
359 |
def create_fallback_oni_data(output_file):
|
360 |
"""Create minimal ONI data for testing"""
|
361 |
-
years = range(
|
362 |
months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']
|
363 |
|
364 |
# Create synthetic ONI data
|
@@ -637,7 +637,7 @@ def load_data_fixed(oni_path, typhoon_path):
|
|
637 |
def create_fallback_typhoon_data():
|
638 |
"""Create minimal fallback typhoon data - FIXED VERSION"""
|
639 |
# Use proper pandas date_range instead of numpy
|
640 |
-
dates = pd.date_range(start='
|
641 |
storm_dates = dates[np.random.choice(len(dates), size=100, replace=False)]
|
642 |
|
643 |
data = []
|
@@ -2614,13 +2614,13 @@ def get_available_years(typhoon_data):
|
|
2614 |
|
2615 |
# Ensure we have at least some years
|
2616 |
if not year_strings:
|
2617 |
-
return [str(year) for year in range(
|
2618 |
|
2619 |
return year_strings
|
2620 |
|
2621 |
except Exception as e:
|
2622 |
print(f"Error in get_available_years: {e}")
|
2623 |
-
return [str(year) for year in range(
|
2624 |
|
2625 |
def update_typhoon_options_enhanced(year, basin):
|
2626 |
"""Enhanced typhoon options with TD support and 2025 data"""
|
|
|
358 |
|
359 |
def create_fallback_oni_data(output_file):
|
360 |
"""Create minimal ONI data for testing"""
|
361 |
+
years = range(1950, 2026) # Extended to include 2025
|
362 |
months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']
|
363 |
|
364 |
# Create synthetic ONI data
|
|
|
637 |
def create_fallback_typhoon_data():
|
638 |
"""Create minimal fallback typhoon data - FIXED VERSION"""
|
639 |
# Use proper pandas date_range instead of numpy
|
640 |
+
dates = pd.date_range(start='1950-01-01', end='2025-12-31', freq='D') # Extended to 2025
|
641 |
storm_dates = dates[np.random.choice(len(dates), size=100, replace=False)]
|
642 |
|
643 |
data = []
|
|
|
2614 |
|
2615 |
# Ensure we have at least some years
|
2616 |
if not year_strings:
|
2617 |
+
return [str(year) for year in range(1950, 2026)]
|
2618 |
|
2619 |
return year_strings
|
2620 |
|
2621 |
except Exception as e:
|
2622 |
print(f"Error in get_available_years: {e}")
|
2623 |
+
return [str(year) for year in range(1950, 2026)]
|
2624 |
|
2625 |
def update_typhoon_options_enhanced(year, basin):
|
2626 |
"""Enhanced typhoon options with TD support and 2025 data"""
|