-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/permanently-show-last-analysed-date-tooltip' in…
…to aa-strom-feature/revisit-landfall-popup-display
- Loading branch information
Showing
15 changed files
with
247 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...View/Layers/AnticipatoryActionStormLayer/AAStormLandfallPopup/PopupContent/index.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...s/MapView/Layers/AnticipatoryActionStormLayer/AAStormLandfallPopup/PopupContent/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...src/components/MapView/Layers/AnticipatoryActionStormLayer/AAStormLandfallPopup/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 6 additions & 1 deletion
7
frontend/src/components/MapView/Layers/AnticipatoryActionStormLayer/types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...Panel/AnticipatoryActionPanel/AnticipatoryActionStormPanel/ActivationTriggerView/types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { AACategory } from 'context/anticipatoryAction/AAStormStateSlice/parsedStromDataTypes'; | ||
|
||
export const AAPanelCategories: AACategory[] = [ | ||
AACategory.Severe, | ||
AACategory.Moderate, | ||
]; | ||
|
||
export const AADisplayCategory: { | ||
[key in AACategory]?: string; | ||
} = { | ||
[AACategory.Severe]: ' >118 KM/H', | ||
[AACategory.Moderate]: ' >89 KM/H', | ||
}; |
6 changes: 2 additions & 4 deletions
6
...mponents/MapView/LeftPanel/AnticipatoryActionPanel/AnticipatoryActionStormPanel/utils.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
frontend/src/context/anticipatoryAction/AAStormStateSlice/parsedStromDataTypes.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import { ForecastDetails, TimeSeries } from './rawStormDataTypes'; | ||
|
||
export enum AACategory { | ||
Severe = 'Severe', | ||
Moderate = 'Moderate', | ||
Risk = 'Risk', | ||
} | ||
|
||
export enum AACategoryKey { | ||
Severe = 'exposed_area_64kt', | ||
Moderate = 'exposed_area_48kt', | ||
Proba = 'proba_48kt_20_5d', | ||
} | ||
|
||
export enum AACategoryLandfall { | ||
Severe = 'severe tropical storm', | ||
Moderate = 'moderate tropical storm', | ||
} | ||
|
||
export interface AAData { | ||
districtNames: string[]; | ||
polygon: any; | ||
} | ||
|
||
export type DistrictDataType = { | ||
[key in AACategory]?: AAData; | ||
}; | ||
|
||
export interface LandfallInfo { | ||
district: string; | ||
time: string[]; | ||
severity: AACategory[]; | ||
} | ||
|
||
interface FeatureProperties { | ||
time: string; | ||
[key: string]: any; | ||
} | ||
|
||
export const AACategoryDataToLandfallMap: { | ||
[key in AACategoryLandfall]: AACategory; | ||
} = { | ||
[AACategoryLandfall.Severe]: AACategory.Severe, | ||
[AACategoryLandfall.Moderate]: AACategory.Moderate, | ||
}; | ||
|
||
export const AACategoryKeyToCategoryMap: { | ||
[key in AACategoryKey]: AACategory; | ||
} = { | ||
[AACategoryKey.Severe]: AACategory.Severe, | ||
[AACategoryKey.Moderate]: AACategory.Moderate, | ||
[AACategoryKey.Proba]: AACategory.Risk, | ||
}; | ||
|
||
/* parsed storm data type */ | ||
export type ParsedStormData = { | ||
activeDistricts?: DistrictDataType; | ||
naDistricts?: DistrictDataType; | ||
landfall?: LandfallInfo; | ||
timeSeries?: TimeSeries; | ||
landfallDetected?: boolean; | ||
forecastDetails?: ForecastDetails; | ||
uncertaintyCone?: FeatureProperties; | ||
}; | ||
|
||
export type ResultType = { | ||
data: ParsedStormData; | ||
}; |
Oops, something went wrong.