Skip to content

Commit

Permalink
oops, little correction to filter more 3 items
Browse files Browse the repository at this point in the history
  • Loading branch information
ppKrauss committed Aug 3, 2018
1 parent e674d70 commit 89421b5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/wd_countries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ curl -o wd_countries.csv -G 'https://query.wikidata.org/sparql' \
BIND ( strafter(str(?item), str(wd:)) AS ?wd_id ).
} ORDER BY ?iso2_code
'

# Eliminate duplication (confusion with kingdoms and territories)
# in the future we can use "P31 Q417175" to eliminate doublets of kingdows, but "territory vs nation" need some check.
# so, filtering invalid doublets and saving with same name:
grep -v 'Q756617\|Q29999\|Q29999' wd_countries.csv | sponge wd_countries.csv
grep -v 'Q756617\|Q29999\|Q407199\|Q240592\|Q83286\|Q1246' wd_countries.csv | sponge wd_countries.csv
# filtering also the last two, that are not in use at ISO: Q83286=old YU, Yugoslavia; Q1246=XK, Kosovo.
# filtering wrong duplicated Q240592 Macedonia.

0 comments on commit 89421b5

Please sign in to comment.