Commit b65db5e5 authored by Le Roux Erwan's avatar Le Roux Erwan
Browse files

[STATIONS] modify sheetname used for comparisons

parent 63532a88
No related merge requests found
Showing with 14 additions and 4 deletions
+14 -4
......@@ -51,7 +51,8 @@ class ComparisonAnalysis(object):
##################### STATION ATTRIBUTES ############################
def load_main_df(self):
df = pd.read_excel(DATA_PATH, sheet_name='max alpes 2500m presentes')
# this sheet name: Mean metrics 24.666666666666668 for the sheet name it was worse Mean metrics 36.022222222222226
df = pd.read_excel(DATA_PATH, sheet_name='max alpes')
df = df.iloc[:78]
ind_altitude = self.altitude - self.margin < df[ALTITUDE_COLUMN_NAME]
......
......@@ -66,6 +66,14 @@ I should find the "optimal" years to remove
Then I should find a way to remove the same years in the study
"""
def test_data():
s = ComparisonAnalysis(altitude=900)
df = s.load_main_df()
print(df)
print(df.columns)
print(len(df))
if __name__ == '__main__':
run_comparison_for_optimal_parameters_for_altitude_900()
test_data()
# run_comparison_for_optimal_parameters_for_altitude_900()
# choice_of_altitude_and_nb_border_data_to_remove_to_get_data_without_nan()
......@@ -44,8 +44,8 @@ def wrong_example2():
if __name__ == '__main__':
# visualize_fast_comparison()
# visualize_all_stations()
wrong_example2()
visualize_all_stations()
# wrong_example2()
# visualize_non_nan_station()
# example()
......@@ -67,6 +67,7 @@ class ComparisonsVisualization(VisualizationParameters):
massif_and_altitude_and_metric.append((massif, c.altitude, metric))
ax_idx += 1
metrics = [t[-1] for t in massif_and_altitude_and_metric]
print('Mean metrics', np.mean(metrics))
print('max', [t for t in massif_and_altitude_and_metric if t[-1] == max(metrics)])
print('min', [t for t in massif_and_altitude_and_metric if t[-1] == min(metrics)])
plt.suptitle(title)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment