Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions fbfmaproom/fbfmaproom-sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3771,3 +3771,55 @@ countries:
length: 3.0
issue_months: [5, 6, 7, 8]
start_year: 1983
zambia:
logo: Zambia_IRI_120x48.png
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nitinmagima do we have a logo file? If not, we'll use the generic IRI one.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To use the IRI one, put IRI_128x128.png

resolution: [0.05, 0.05]
center: [27, -15]
zoom: 6
rotation: 0
marker: [25, -17]
shapes:
- name: National
sql: select adm0_code as key, adm0_name as label, ST_AsBinary(the_geom) as the_geom
from iridb.g2015_2012_0 where adm0_name = 'Zambia'
vuln_sql: select adm0_code as key, year, sum(vulnerability) as vuln
from public.fbf_vulnerability where adm0_name = 'Zambia' group by 1, 2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This presumably doesn't work, because there are no rows for Zambia in the fbf_vulnerability table. That will cease to be a problem once the vulnerability layer is removed, but it would be good to merge this sooner than that. See ethiopia for a dummy query you can use instead.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The vulnerability layer has been removed, so now all we need to do is remove vuln_sql.


datasets:
defaults:
predictors:
- prcp
predictand: bad-years-v3
observations:
bad-years-v3:
label: Reported bad years v3
path: zambia/bad_years-national.zarr
var_names:
value: rank
time: T
colormap: precip
lower_is_worse: yes
format: number0
forecasts:
prcp:
label: JAS fcst
description: NextGen seasonal rainfall forecast probability of non-exceedance of the selected percentile for the July-September season
path: zambia/prcp-ndj-v1.zarr
var_names:
value: pne
lat: Y
lon: X
issue: S
pct: quantile
colormap: pne_25
is_poe: no
vuln:
colormap: vulnerability
range: [0.0, 5.0]
seasons:
season1:
label: JAS
target_month: 7.5
length: 3.0
issue_months: [0, 1, 2, 3, 4, 5]
start_year: 1991
4 changes: 2 additions & 2 deletions fbfmaproom/fbfmaproom.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
SERVER.register_error_handler(ClientSideError, pingrid.client_side_error)

month_abbrev = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec']
abbrev_to_month0 = dict((abbrev, month0) for month0, abbrev in enumerate(month_abbrev))
abbrev_to_month0: Dict[str, int] = dict((abbrev, month0) for month0, abbrev in enumerate(month_abbrev))


class FbfDash(dash.Dash):
Expand Down Expand Up @@ -1208,7 +1208,7 @@ def update_severity_color(value):
Input("map_column", "value"),
State("season", "value"),
)
def tile_url_callback(target_year, issue_month_abbrev, freq, pathname, map_col_key, season_id):
def tile_url_callback(target_year, issue_month_abbrev: str, freq, pathname, map_col_key, season_id: str):
colorscale = None # default value in case an exception is raised
try:
country_key = country(pathname)
Expand Down
Loading