-
Notifications
You must be signed in to change notification settings - Fork 3
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
common: added countries mapping #191
Closed
Closed
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
9c48acb
common: added countries mapping
ErnestaP aa9f46d
example for parsing
ErnestaP 73947e8
rest of Elsvier country prase
ErnestaP 26e65da
pycountry==22.3.5 (because of constrains)
ErnestaP 7270ee2
IOP, OUP, Springer, Hindawi countries mapping
ErnestaP 8da4d91
Added one more value
ErnestaP 1373ce6
added South Korea mapping
ErnestaP File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,175 @@ | ||
COUNTRIES_DEFAULT_MAPPING = { | ||
"INFN": "Italy", | ||
"Democratic People's Republic of Korea": "North Korea", | ||
"Korea, Democratic People's Republic of": "North Korea", | ||
"DPR Korea": "North Korea", | ||
"DPR. Korea": "North Korea", | ||
"CERN": "CERN", | ||
"European Organization for Nuclear Research": "CERN", | ||
"KEK": "Japan", | ||
"DESY": "Germany", | ||
"FERMILAB": "USA", | ||
"FNAL": "USA", | ||
"SLACK": "USA", | ||
"Stanford Linear Accelerator Center": "USA", | ||
"Joint Institute for Nuclear Research": "JINR", | ||
"JINR": "JINR", | ||
"Northern Cyprus": "Turkey", | ||
"North Cyprus": "Turkey", | ||
"New Mexico": "USA", | ||
"South China Normal University": "China", | ||
"Hong Kong China": "Hong Kong", | ||
"Hong-Kong China": "Hong Kong", | ||
"Hong Kong, China": "Hong Kong", | ||
"Hong Kong": "Hong Kong", | ||
"Hong-Kong": "Hong Kong", | ||
"Algeria": "Algeria", | ||
"Argentina": "Argentina", | ||
"Armenia": "Armenia", | ||
"Australia": "Australia", | ||
"Austria": "Austria", | ||
"Azerbaijan": "Azerbaijan", | ||
"Belarus": "Belarus", | ||
"Belgium": "Belgium", | ||
"Belgique": "Belgium", | ||
"Bangladesh": "Bangladesh", | ||
"Brazil": "Brazil", | ||
"Brasil": "Brazil", | ||
"Benin": "Benin", | ||
"Bulgaria": "Bulgaria", | ||
"Bosnia and Herzegovina": "Bosnia and Herzegovina", | ||
"Canada": "Canada", | ||
"Chile": "Chile", | ||
"ROC": "Taiwan", | ||
"R.O.C": "Taiwan", | ||
"Republic of China": "Taiwan", | ||
"China (PRC)": "China", | ||
"PR China": "China", | ||
"China": "China", | ||
"People's Republic of China": "China", | ||
"Republic of China": "China", | ||
"Colombia": "Colombia", | ||
"Costa Rica": "Costa Rica", | ||
"Cuba": "Cuba", | ||
"Croatia": "Croatia", | ||
"Cyprus": "Cyprus", | ||
"Czech Republic": "Czech Republic", | ||
"Czech": "Czech Republic", | ||
"Czechia": "Czech Republic", | ||
"Denmark": "Denmark", | ||
"Egypt": "Egypt", | ||
"Estonia": "Estonia", | ||
"Ecuador": "Ecuador", | ||
"Finland": "Finland", | ||
"France": "France", | ||
"Germany": "Germany", | ||
"Deutschland": "Germany", | ||
"Greece": "Greece", | ||
"Hungary": "Hungary", | ||
"Iceland": "Iceland", | ||
"India": "India", | ||
"Indonesia": "Indonesia", | ||
"Iran": "Iran", | ||
"Ireland": "Ireland", | ||
"Israel": "Israel", | ||
"Italy": "Italy", | ||
"Italia": "Italy", | ||
"Japan": "Japan", | ||
"Jamaica": "Jamaica", | ||
"Korea": "South Korea", | ||
"Republic of Korea": "South Korea", | ||
"South Korea": "South Korea", | ||
"Latvia": "Latvia", | ||
"Lebanon": "Lebanon", | ||
"Lithuania": "Lithuania", | ||
"Luxembourg": "Luxembourg", | ||
"Macedonia": "Macedonia", | ||
"Mexico": "Mexico", | ||
"Monaco": "Monaco", | ||
"Montenegro": "Montenegro", | ||
"Morocco": "Morocco", | ||
"Niger": "Niger", | ||
"Nigeria": "Nigeria", | ||
"Netherlands": "Netherlands", | ||
"The Netherlands": "Netherlands", | ||
"New Zealand": "New Zealand", | ||
"Zealand": "New Zealand", | ||
"Norway": "Norway", | ||
"Oman": "Oman", | ||
"Sultanate of Oman": "Oman", | ||
"Pakistan": "Pakistan", | ||
"Panama": "Panama", | ||
"Philipines": "Philipines", | ||
"Poland": "Poland", | ||
"Portugalo": "Portugal", | ||
"Portugal": "Portugal", | ||
"P.R.China": "China", | ||
"People’s Republic of China": "China", | ||
"Republic of Belarus": "Belarus", | ||
"Republic of Benin": "Benin", | ||
"Republic of Korea": "South Korea", | ||
"Republic of San Marino": "San Marino", | ||
"Republic of South Africa": "South Africa", | ||
"Romania": "Romania", | ||
"Russia": "Russia", | ||
"Russian Federation": "Russia", | ||
"Saudi Arabia": "Saudi Arabia", | ||
"Kingdom of Saudi Arabia": "Saudi Arabia", | ||
"Arabia": "Saudi Arabia", | ||
"Serbia": "Serbia", | ||
"Singapore": "Singapore", | ||
"Slovak Republic": "Slovakia", | ||
"Slovak": "Slovakia", | ||
"Slovakia": "Slovakia", | ||
"Slovenia": "Slovenia", | ||
"South Africa": "South Africa", | ||
"Africa": "South Africa", | ||
"España": "Spain", | ||
"Spain": "Spain", | ||
"Sudan": "Sudan", | ||
"Sweden": "Sweden", | ||
"Switzerland": "Switzerland", | ||
"Syria": "Syria", | ||
"Taiwan": "Taiwan", | ||
"Thailand": "Thailand", | ||
"Tunisia": "Tunisia", | ||
"Turkey": "Turkey", | ||
"Ukraine": "Ukraine", | ||
"United Kingdom": "UK", | ||
"Kingdom": "UK", | ||
"United Kingdom of Great Britain and Northern Ireland": "UK", | ||
"UK": "UK", | ||
"England": "UK", | ||
"Scotland": "UK", | ||
"Wales": "UK", | ||
"New South Wales": "Australia", | ||
"U.K": "UK", | ||
"United States of America": "USA", | ||
"United States": "USA", | ||
"USA": "USA", | ||
"U.S.A": "USA", | ||
"America": "USA", | ||
"Uruguay": "Uruguay", | ||
"Uzbekistan": "Uzbekistan", | ||
"Venezuela": "Venezuela", | ||
"Vietnam": "Vietnam", | ||
"Viet Nam": "Vietnam", | ||
"Yemen": "Yemen", | ||
"Peru": "Peru", | ||
"Kuwait": "Kuwait", | ||
"Sri Lanka": "Sri Lanka", | ||
"Lanka": "Sri Lanka", | ||
"Kazakhstan": "Kazakhstan", | ||
"Mongolia": "Mongolia", | ||
"United Arab Emirates": "United Arab Emirates", | ||
"Emirates": "United Arab Emirates", | ||
"Malaysia": "Malaysia", | ||
"Qatar": "Qatar", | ||
"Kyrgyz Republic": "Kyrgyz Republic", | ||
"Jordan": "Jordan", | ||
"Belgrade": "Serbia", | ||
"Istanbul": "Turkey", | ||
"Ankara": "Turkey", | ||
"Rome": "Italy", | ||
"Georgia": "Georgia", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
import re | ||
from datetime import date | ||
|
||
|
||
def take_first(arr): | ||
try: | ||
return next(filter(None, arr)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ busypie==0.4.5 | |
pydantic==1.10.7 | ||
jsonschema==4.17.3 | ||
plyvel==1.5.0 | ||
pycountry==22.3.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -236,9 +236,9 @@ def test_dag_validate_file_pass(article): | |
"email": "[email protected]", | ||
"affiliations": [ | ||
{ | ||
"value": "School of Physics, Korea Institute for Advanced Study, Dongdaemun-gu, Seoul, 02455, Korea", | ||
"value": "School of Physics, Korea Institute for Advanced Study, Dongdaemun-gu, Seoul, 02455, South Korea", | ||
"organization": "School of Physics, Korea Institute for Advanced Study", | ||
"country": "Korea", | ||
"country": "South Korea", | ||
} | ||
], | ||
"full_name": "Nosaka, Tomoki", | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need the
COUNTRIES_DEFAULT_MAPPING
if we use pycountry?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, because pycountry there are cases when it gives more than one country, for example: