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

fix taiwan ingestion 2 #2900

Merged
merged 2 commits into from
Oct 10, 2022
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
24 changes: 22 additions & 2 deletions ingestion/functions/parsing/taiwan/geocodes.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"country": "Taiwan",
"geoResolution": "Admin1",
"geometry": {
"latitude": 23.90235,
"longitude": 120.6909167
"latitude": 23.84053335,
"longitude": 120.93291098389277
},
"name": "Nantou County"
},
Expand Down Expand Up @@ -159,6 +159,16 @@
},
"name": "Penghu"
},
"空值": {
"administrativeAreaLevel1": "CPC Corporation, Taiwan",
"country": "Taiwan",
"geoResolution": "Admin1",
"geometry": {
"latitude": 23.11435375,
"longitude": 121.38840342297793
},
"name": "CPC Corporation, Taiwan"
},
"花蓮縣": {
"administrativeAreaLevel1": "Hualien County",
"country": "Taiwan",
Expand Down Expand Up @@ -189,6 +199,16 @@
},
"name": "Lienchiang County"
},
"金門縣": {
"administrativeAreaLevel1": "Kinmen",
"country": "Taiwan",
"geoResolution": "Admin1",
"geometry": {
"latitude": 24.4480637,
"longitude": 118.3856331
},
"name": "Kinmen"
},
"雲林縣": {
"administrativeAreaLevel1": "Yunlin County",
"country": "Taiwan",
Expand Down
2 changes: 2 additions & 0 deletions ingestion/functions/parsing/taiwan/get_geocodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
OSM = "https://nominatim.openstreetmap.org/search?"

_LOCATIONS = [
"空值",
"金門縣",
"新北市",
"基隆市",
"新竹市",
Expand Down
2 changes: 2 additions & 0 deletions ingestion/functions/parsing/taiwan/taiwan.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ def convert_gender(raw_gender: str):
return "Female"
elif raw_gender == "第三性":
return "Non-binary/Third gender"
elif raw_gender == "性別不詳":
return None
else:
raise ValueError(f'Unhandled gender: {raw_gender}')

Expand Down