Skip to content

Commit

Permalink
Merge pull request #205 from OCHA-DAP/nga-3w
Browse files Browse the repository at this point in the history
Update NGA 3w
  • Loading branch information
b-j-mills authored Dec 6, 2024
2 parents fa96482 + a498a30 commit 0578e73
Show file tree
Hide file tree
Showing 9 changed files with 7,510 additions and 32 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [0.10.26] - 2024-12-06

### Changed

- Updated 3W data for NGA

## [0.10.25] - 2024-12-05

### Fixed
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ckanapi==4.8
# via hdx-python-api
click==8.1.7
# via typer
coverage==7.6.8
coverage==7.6.9
# via pytest-cov
defopt==6.4.0
# via hdx-python-api
Expand Down Expand Up @@ -108,7 +108,7 @@ libhxl==5.2.2
# hapi-pipelines (pyproject.toml)
# hdx-python-api
# hdx-python-country
loguru==0.7.2
loguru==0.7.3
# via hdx-python-utilities
makefun==1.15.6
# via hdx-python-api
Expand Down Expand Up @@ -236,7 +236,7 @@ simpleeval==1.0.3
# via frictionless
simplejson==3.19.3
# via ckanapi
six==1.17.0
six==1.16.0
# via
# ckanapi
# pockets
Expand Down
1 change: 1 addition & 0 deletions src/hapi/pipelines/configs/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ org_type_map:
entite gouvernementale: "435"
gouvernement: "435"
gov: "435"
government agency: "435"
govt: "435"
iglesia grupo religioso: "446"
ingo: "437"
Expand Down
38 changes: 18 additions & 20 deletions src/hapi/pipelines/configs/operational_presence.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -397,33 +397,31 @@ operational_presence_admintwo:

operational_presence_nga:
dataset: "nigeria-3w"
resource: "who-is-doing-what-and-where_nga_3w_jan_mar_2024.xlsx"
format: "xlsx"
xlsx2csv: True
sheet: "NGA 3Ws Q1(Jan-Mar) 2024"
resource: "who-is-doing-what-and-where_nga_3w_apr_jun_2024.xlsx.csv"
format: "csv"
headers: 1
source_date:
start: "01/01/2024"
end: "31/03/2024"
use_hxl: False
start: "01/04/2024"
end: "30/06/2024"
use_hxl: True
admin:
- ~
- "LGA PCode"
- "#adm2 +code"
admin_exact: True
input:
- "Organisation"
- "Org. Acronym"
- "Type of Organization"
- "Project Sector"
- "States"
- "LGA"
- "#org+name"
- "#org +acronym"
- "#org +type"
- "#sector"
- "#adm1 +name"
- "#adm2 +name"
list:
- "Organisation"
- "Org. Acronym"
- "Type of Organization"
- "Project Sector"
- "States"
- "LGA"
- "#org+name"
- "#org +acronym"
- "#org +type"
- "#sector"
- "#adm1 +name"
- "#adm2 +name"

operational_presence_som:
dataset: "somalia-operational-presence"
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/input/nigeria-3w.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Binary file not shown.
12 changes: 6 additions & 6 deletions tests/org_mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,19 +188,19 @@ def check_org_mappings(pipelines) -> List[Tuple]:
used=True,
complete=True,
)
street_child = OrgInfo(
canonical_name="Street Child",
normalised_name="street child",
acronym="Street Child",
normalised_acronym="street child",
sci = OrgInfo(
canonical_name="Save the Children International",
normalised_name="save the children international",
acronym="SCI",
normalised_acronym="sci",
type_code="437",
used=True,
complete=True,
)
comparisons.extend(
[
(org_map[("AFG", "MEDAIR")], medair),
(org_map[("NGA", "Street Child")], street_child),
(org_map[("NGA", "Save The Children International")], sci),
]
)

Expand Down
4 changes: 2 additions & 2 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,13 @@ def test_operational_presence(self, configuration, folder, pipelines):
count = session.scalar(select(func.count(DBResource.hdx_id)))
check.equal(count, 3)
count = session.scalar(select(func.count(DBOrg.acronym)))
check.equal(count, 504)
check.equal(count, 483)
count = session.scalar(select(func.count(DBOrgType.code)))
check.equal(count, 18)
count = session.scalar(
select(func.count(DBOperationalPresence.resource_hdx_id))
)
check.equal(count, 13428)
check.equal(count, 13001)
# Comparison must be performed in this test method,
# otherwise error details are not logged
comparisons = check_org_mappings(pipelines)
Expand Down

0 comments on commit 0578e73

Please sign in to comment.