From 50021c7b0f20b6eec928b5ba4227a465f6bfb210 Mon Sep 17 00:00:00 2001 From: Larsen Vallecillo Date: Thu, 27 Jul 2023 22:47:50 -0500 Subject: [PATCH] Update forecast.py --- Channels/Forecast_Channel/forecast.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Channels/Forecast_Channel/forecast.py b/Channels/Forecast_Channel/forecast.py index 1785f70..1b05150 100644 --- a/Channels/Forecast_Channel/forecast.py +++ b/Channels/Forecast_Channel/forecast.py @@ -167,7 +167,14 @@ def check_coords(forecast_list, key, lat, lng): def get_bins(country_code): - bins = [0, 1, 2, 3, 4, 5, 6] + if country_code == 1: + bins = [0] + elif 8 <= country_code <= 52: + bins = [1, 3, 4] + elif 64 <= country_code <= 110: + bins = [1, 2, 3, 4, 5, 6] + elif country_code == 128 or country_code == 144: + bins = [0] else: log(