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

parsing: Unset admin3 for Mexico #1957

Merged
merged 1 commit into from
Jun 23, 2021
Merged
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions ingestion/functions/parsing/mexico/mexico.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def convert_location(state_code: str, municipality_code: str):
try:
query_list.append(_MUNICIPALITIES[state_code + municipality_code])
except KeyError:
print(f"Municipality code missing: {municipality_code}")
print(f"Municipality code missing: {state_code} {municipality_code}")
if state_code[0] != missing_value_prefix:
try:
query_list.append(_STATES[state_code])
Expand All @@ -51,7 +51,6 @@ def convert_location(state_code: str, municipality_code: str):
return {
"administrativeAreaLevel1": _STATES[state_code],
"administrativeAreaLevel2": _MUNICIPALITIES[municipality_code],
"administrativeAreaLevel3": _MUNICIPALITIES[municipality_code],
"geoResolution": "Admin2",
"country": "Mexico",
"name": query_string,
Expand Down
1 change: 0 additions & 1 deletion ingestion/functions/parsing/mexico/mexico_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"location": {
"administrativeAreaLevel1": "MÉXICO",
"administrativeAreaLevel2": 'ATIZAPÁN DE ZARAGOZA',
"administrativeAreaLevel3": 'ATIZAPÁN DE ZARAGOZA',
"country": "Mexico",
"geoResolution": "Admin2",
"geometry": {"latitude": 19.56480728, "longitude": -99.27404399},
Expand Down