diff --git a/fbfmaproom/fbfmaproom-sample.yaml b/fbfmaproom/fbfmaproom-sample.yaml index 264e7af7..2dd85b0b 100644 --- a/fbfmaproom/fbfmaproom-sample.yaml +++ b/fbfmaproom/fbfmaproom-sample.yaml @@ -3771,3 +3771,55 @@ countries: length: 3.0 issue_months: [5, 6, 7, 8] start_year: 1983 + zambia: + logo: Zambia_IRI_120x48.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 + + 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 diff --git a/fbfmaproom/fbfmaproom.py b/fbfmaproom/fbfmaproom.py index 8186e73b..101f10de 100644 --- a/fbfmaproom/fbfmaproom.py +++ b/fbfmaproom/fbfmaproom.py @@ -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): @@ -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)