Skip to content

Commit

Permalink
remove triples where place is in itself
Browse files Browse the repository at this point in the history
  • Loading branch information
n-h-diaz committed Jan 17, 2024
1 parent 2a44a03 commit 4ecc99e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions scripts/un/sdg/geography.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ def should_include_containment(s, o):
Returns:
Whether triple should be included in containment.
'''
# Skip triples where a place is contained within itself.
if s.dcid == o.dcid:
return False

if (s.type == GEO_REGION or s.type == UN_GEO_REGION) and o.dcid == 'Earth':
return True
elif (s.type == GEO_REGION or
Expand Down
2 changes: 1 addition & 1 deletion scripts/un/sdg/sssom-mappings
Submodule sssom-mappings updated from aae4a7 to b854ba

0 comments on commit 4ecc99e

Please sign in to comment.