Skip to content

Commit 63dfd2f

Browse files
changed so that for the future predictions, too, the facility id is replaced with the facility name
1 parent f175254 commit 63dfd2f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/scripts/climate_change/linear_model_historical_realtionship_reporting_precipitation.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,9 @@ def get_weather_data(ssp_scenario, model_type):
700700
month_repeated_prediction = [m for _ in year_range_prediction for m in range(1, 13)]
701701
year_flattened_prediction = np.repeat(year_range_prediction, 12 * num_facilities)
702702
month_flattened_prediction = month_repeated_prediction * num_facilities
703-
facility_flattened_prediction = np.tile(range(num_facilities), len(year_flattened_prediction) // num_facilities)
703+
facility_flattened_prediction = np.tile(monthly_reporting_by_facility.columns,
704+
len(year_flattened_prediction) // len(
705+
monthly_reporting_by_facility.columns))
704706
# Encode facilities and create above/below average weather data
705707
facility_encoded_prediction = pd.get_dummies(facility_flattened_prediction, drop_first=True)
706708

0 commit comments

Comments
 (0)