-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfixes.py
105 lines (100 loc) · 3.54 KB
/
fixes.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
riocuarto_data = {
'csv': {
'crater_name': 'Rio Cuarto',
'state': '',
'country': 'Argentina',
'latitude': -32.87,
'longitude': -64.23,
'diameter_km': 4.5,
'age_millions_years_ago': '<0.1',
'exposed': True,
'drilled': False,
'target_rock': 'Mixed',
'bolid_type': 'Chondrite (H)',
'url': 'http://www.passc.net/EarthImpactDatabase/New%20website_05-2018/Riocuarto.html' # noqa
},
'feature': {
'type': 'Feature',
'properties': {
'crater_name': 'Rio Cuarto',
'state': '',
'country': 'Argentina',
'diameter_km': 4.5,
'age_millions_years_ago': '<0.1',
'exposed': True,
'drilled': False,
'target_rock': 'Mixed',
'bolid_type': 'Chondrite (H)',
'url': 'http://www.passc.net/EarthImpactDatabase/New%20website_05-2018/Riocuarto.html' # noqa
},
'geometry': {
'type': 'Point',
'coordinates': [-64.23, -32.87]
}
}
}
target_rock_labels = {
'C': 'Crystalline',
'C-Ms': 'Metasedimentary',
'M': 'Mixed',
'S': 'Sedimentary'
}
countries_with_states = {
'Alabama, U.S.A.': ('Alabama', 'United States'),
'Alaska, U.S.A.': ('Alaska', 'United States'),
'Alberta, Canada': ('Alberta', 'Canada'),
'Arizona, U.S.A.': ('Arizona', 'United States'),
'Illinois, U.S.A.': ('Illinois', 'United States'),
'Indiana, U.S.A.': ('Indiana', 'United States'),
'Iowa, U.S.A.': ('Iowa', 'United States'),
'Kansas, U.S.A.': ('Kansas', 'United States'),
'Kentucky, U.S.A.': ('Kentucky', 'United States'),
'Manitoba, Canada': ('Manitoba', 'Canada'),
'Michigan, USA': ('Michigan', 'United States'),
'Missouri, U.S.A.': ('Missouri', 'United States'),
'Montana, U.S.A.': ('Montana', 'United States'),
'New Mexico , U.S.A.': ('New Mexico', 'United States'),
'Newfoundland-Labrador, CA': ('Newfoundland and Labrador', 'Canada'),
'North Dakota, U.S.A.': ('North Dakota', 'United States'),
'Northern Territory': ('Northern Territory', 'Australia'),
'Northern Territory, AU': ('Northern Territory', 'Australia'),
'Northern Territory,AU': ('Northern Territory', 'Australia'),
'Northwest Territories, Canada': ('Northwest Territories', 'Canada'),
'Nova Scotia, Canada': ('Nova Scotia', 'Canada'),
'Nunavut, Canada': ('Nunavut', 'Canada'),
'Ohio, U.S.A.': ('Ohio', 'United States'),
'Oklahoma, U.S.A.': ('Oklahoma', 'United States'),
'Ontario, Canada': ('Ontario', 'Canada'),
'Quebec, Canada': ('Quebec', 'Canada'),
'Queensland': ('Queensland', 'Australia'),
'Saskatchewan, Canada': ('Saskatchewan', 'Canada'),
'South Australia': ('South Australia', 'Australia'),
'Tennessee, U.S.A.': ('Tennessee', 'United States'),
'Texas, U.S.A.': ('Texas', 'United States'),
'Utah, U.S.A.': ('Utah', 'United States'),
'Victoria Island, Arctic Canada': ('Victoria Island', 'Canada'),
'Virginia, U.S.A.': ('Virginia', 'United States'),
'Western Australia': ('Western Australia', 'Australia'),
'Wisconsin, U.S.A.': ('Wisconsin', 'United States'),
'Wyoming, USA': ('Wyoming', 'United States'),
'Yucatan, Mexico': ('Yucatán', 'Mexico')
}
unicode_replacements = [
('ä', 'ä'),
('ø', 'ø'),
('Ã¥', 'å'),
('ã', 'ã'),
('ô', 'ô'),
('ö', 'ö')
]
replace_age = [
('Â', ''),
('*', ''),
('+/-', '±'),
('~ ', '~'),
('< ', '<')
]
boolean_map = {
'N': False,
'Y': True
}