-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathModelData.py
executable file
·78 lines (72 loc) · 2.25 KB
/
ModelData.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
from collections import OrderedDict
#
# define types for omop schema
#
class ModelData:
#
# Check the model matches
#
def __init__(self):
self.model_schema = self.dataSchema()
#
# define schema for various data loads being used
#
def dataSchema(self):
model_schema = OrderedDict([])
#
# Standardized vocabulary
#
model_schema['openaddress'] = OrderedDict([
('LAT', 'object'),
('LON', 'object'),
('NUMBER', 'category'),
('STREET', 'category'),
('UNIT', 'category'),
('CITY', 'category'),
('DISTRICT', 'category'),
('REGION', 'category'),
('POSTCODE', 'category'),
('ID', 'object'),
('HASH','object')
])
model_schema['fiaddress'] = OrderedDict([
('building_id', 'object'),
('region', 'category'),
('municipality', 'category'),
('street', 'category'),
('house_number', 'category'),
('postal_code', 'category'),
('latitude_wgs84', 'object'),
('longitude_wgs84', 'object'),
('building_use', 'category')
])
model_schema['postalcodes'] = OrderedDict([
('USPS', 'object'),
('ST', 'category'),
('NAME', 'object'),
('ZCTA5', 'category'),
('LAT', 'object'),
('LON', 'object')
])
model_schema['geoname'] = OrderedDict([
('geonameid', 'object'),
('name', 'object'),
('asciiname', 'object'),
('alternatenames', 'object'),
('latitude', 'object'),
('longitude', 'object'),
('feature class', 'object'),
('feature code', 'object'),
('country code', 'object'),
('cc2', 'object'),
('admin1 code', 'object'),
('admin2 code', 'object'),
('admin3 code', 'object'),
('admin4 code', 'object'),
('population', 'object'),
('elevation', 'object'),
('dem', 'object'),
('timezone', 'object'),
('modification date', 'object')
])
return model_schema