diff --git a/apps/nowcasting-app/data/dno_gsp_groupings.json b/apps/nowcasting-app/data/dno_gsp_groupings.json index 133af9cf..09313703 100644 --- a/apps/nowcasting-app/data/dno_gsp_groupings.json +++ b/apps/nowcasting-app/data/dno_gsp_groupings.json @@ -1,5 +1,5 @@ { - "WPD (South West)": [ + "NGED (South West)": [ 1, 8, 13, @@ -74,7 +74,7 @@ 311, 313 ], - "WPD (South Wales)": [ + "NGED (South Wales)": [ 3, 7, 55, @@ -235,7 +235,7 @@ 258, 315 ], - "WPD (East Midlands)": [ + "NGED (East Midlands)": [ 23, 24, 66, @@ -265,7 +265,7 @@ 292, 316 ], - "WPD (Midlands)": [ + "NGED (Midlands)": [ 26, 48, 49, diff --git a/apps/nowcasting-app/data/dno_license_areas_20200506.json b/apps/nowcasting-app/data/dno_license_areas_20200506.json index e2c18e49..1a7c673b 100644 --- a/apps/nowcasting-app/data/dno_license_areas_20200506.json +++ b/apps/nowcasting-app/data/dno_license_areas_20200506.json @@ -3578,7 +3578,7 @@ }, { "type": "Feature", - "properties": { "ID": 11, "Name": "_B", "LongName": "WPD (East Midlands)" }, + "properties": { "ID": 11, "Name": "_B", "LongName": "NGED (East Midlands)" }, "geometry": { "type": "MultiPolygon", "coordinates": [ @@ -14505,7 +14505,7 @@ }, { "type": "Feature", - "properties": { "ID": 14, "Name": "_E", "LongName": "WPD (Midlands)" }, + "properties": { "ID": 14, "Name": "_E", "LongName": "NGED (Midlands)" }, "geometry": { "type": "MultiPolygon", "coordinates": [ @@ -43401,7 +43401,7 @@ }, { "type": "Feature", - "properties": { "ID": 21, "Name": "_K", "LongName": "WPD (South Wales)" }, + "properties": { "ID": 21, "Name": "_K", "LongName": "NGED (South Wales)" }, "geometry": { "type": "MultiPolygon", "coordinates": [ @@ -46208,7 +46208,7 @@ }, { "type": "Feature", - "properties": { "ID": 22, "Name": "_L", "LongName": "WPD (South West)" }, + "properties": { "ID": 22, "Name": "_L", "LongName": "NGED (South West)" }, "geometry": { "type": "MultiPolygon", "coordinates": [ diff --git a/apps/nowcasting-app/data/dno_regions_lat_long_converted.json b/apps/nowcasting-app/data/dno_regions_lat_long_converted.json index 235991ba..d9aa43ee 100644 --- a/apps/nowcasting-app/data/dno_regions_lat_long_converted.json +++ b/apps/nowcasting-app/data/dno_regions_lat_long_converted.json @@ -14246,7 +14246,7 @@ "properties": { "ID": 11, "Name": "_B", - "LongName": "WPD (East Midlands)" + "LongName": "NGED (East Midlands)" }, "geometry": { "type": "MultiPolygon", @@ -57831,7 +57831,7 @@ "properties": { "ID": 14, "Name": "_E", - "LongName": "WPD (Midlands)" + "LongName": "NGED (Midlands)" }, "geometry": { "type": "MultiPolygon", @@ -171992,7 +171992,7 @@ "properties": { "ID": 21, "Name": "_K", - "LongName": "WPD (South Wales)" + "LongName": "NGED (South Wales)" }, "geometry": { "type": "MultiPolygon", @@ -183113,7 +183113,7 @@ "properties": { "ID": 22, "Name": "_L", - "LongName": "WPD (South West)" + "LongName": "NGED (South West)" }, "geometry": { "type": "MultiPolygon", diff --git a/apps/nowcasting-app/package.json b/apps/nowcasting-app/package.json index aec155a3..f3d6b85f 100644 --- a/apps/nowcasting-app/package.json +++ b/apps/nowcasting-app/package.json @@ -1,6 +1,6 @@ { "name": "@openclimatefix/nowcasting-app", - "version": "0.5.8", + "version": "0.5.9", "private": true, "scripts": { "dev": "next dev -p 3002", diff --git a/apps/nowcasting-app/pages/index.tsx b/apps/nowcasting-app/pages/index.tsx index 7cf36ab0..b3504a2b 100644 --- a/apps/nowcasting-app/pages/index.tsx +++ b/apps/nowcasting-app/pages/index.tsx @@ -75,7 +75,9 @@ export default function Home({ dashboardModeServer }: { dashboardModeServer: str const [, setSitesLoadingState] = useGlobalState("sitesLoadingState"); const [, setLoadingState] = useGlobalState("loadingState"); const [nHourForecast] = useGlobalState("nHourForecast"); - const [nationalAggregationLevel] = useGlobalState("nationalAggregationLevel"); + const [nationalAggregationLevel, setNationalAggregationLevel] = useGlobalState( + "nationalAggregationLevel" + ); const [, setClickedGspId] = useGlobalState("clickedGspId"); const [forecastLastFetch30MinISO, setForecastLastFetch30MinISO] = useState(get30MinNow(-30)); @@ -112,11 +114,15 @@ export default function Home({ dashboardModeServer }: { dashboardModeServer: str setArraySettingInCookieStorage(CookieStorageKeys.VISIBLE_LINES, visibleLines); }, [visibleLines]); - // On view change, unset the clicked "GSP" if the aggregation is not GSP + // On view change, unset the clicked region if the aggregation is not GSP, + // and set the national aggregation level to GSP if we're now on Delta view useEffect(() => { if (nationalAggregationLevel !== NationalAggregation.GSP) { setClickedGspId(undefined); } + if (view === VIEWS.DELTA) { + setNationalAggregationLevel(NationalAggregation.GSP); + } }, [view]); const currentView = (v: VIEWS) => v === view;