Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update under18 filter #246

Merged
merged 2 commits into from
Sep 25, 2023
Merged
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
5 changes: 3 additions & 2 deletions app/scripts/gics.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ async def on_ready():

options.append((country, f"{service} - Wait time (months): {to_be_seen}" if pd.notna(to_be_seen) else "Unknown"))

# Filter out specific services
options = [gic for gic in options if "GIDS" not in gic[1] and "KOI" not in gic[1] and "Youth" not in gic[1]]
# Filter out under 18 services
youth_services = ["GIDS", "KOI", "Youth", "Hub"]
options = [gic for gic in options if all(service not in gic[1] for service in youth_services)]

# Sort options by months remaining
options.sort(key=lambda x: int(x[1].split(': ')[1][-2:]) if x[1].split(': ')[1] != 'nan' else 9999)
Expand Down
Loading