Skip to content

Commit e742e33

Browse files
committed
Total fish/shellfish landings: filter out unknown values for future
This is not ideal because the filter condition is hard-coded to remove anything after the end of Feb 2026. When/if we update this layer in the future, we will need to update the filter condition.
1 parent 03a049a commit e742e33

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

qgreenland/config/cfg-lock.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4167,7 +4167,7 @@
41674167
},
41684168
{
41694169
"layer_cfg": {
4170-
"description": "Points representing districts in Greenland and associated\nnumbers of fish and shellfish landings by month between 2012-2026.\n\nNote: to use this layer, enable the temporal controller and set a\nspecific year/month to see that year/month's statistics. Without the\ntemporal controller enabled, the earliest statistics will be shown.",
4170+
"description": "Points representing districts in Greenland and associated numbers of\nfish and shellfish landings by month between Jan. 2012- Feb. 2026.\n\nNote: to use this layer, enable the temporal controller and set a\nspecific year/month to see that year/month's statistics. Without the\ntemporal controller enabled, the earliest statistics will be shown.",
41714171
"id": "total_fish_shellfish_landings",
41724172
"in_package": true,
41734173
"inputs": [

qgreenland/config/helpers/layers/populated_places.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ def prepare_fishing_vessels(*, input_dir: str, places):
304304

305305

306306
def prepare_total_fish_shellfish_landings(*, input_dir: str, places):
307+
import datetime as dt
307308
from pathlib import Path
308309

309310
import geopandas as gpd
@@ -313,6 +314,10 @@ def prepare_total_fish_shellfish_landings(*, input_dir: str, places):
313314
# Add start/end date cols
314315
fs_landings = _start_and_end_date_cols_for_monthly_data(fs_landings)
315316

317+
# Filter out records that are in the future. This data uses 0 to indicate
318+
# null values instead of "-" found in other tables.
319+
fs_landings = fs_landings[fs_landings["start_date"] < dt.date(2026, 3, 1)]
320+
316321
# Rename count col
317322
fs_landings = fs_landings.rename(
318323
columns={

qgreenland/config/layers/Human activity/Fishing/fish_landings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
id="total_fish_shellfish_landings",
55
title="Total fish and shellfish landings in tonnes (temporal)",
66
description=(
7-
"""Points representing districts in Greenland and associated
8-
numbers of fish and shellfish landings by month between 2012-2026.
7+
"""Points representing districts in Greenland and associated numbers of
8+
fish and shellfish landings by month between Jan. 2012- Feb. 2026.
99
1010
Note: to use this layer, enable the temporal controller and set a
1111
specific year/month to see that year/month's statistics. Without the

0 commit comments

Comments
 (0)