/
pipeline.yaml
337 lines (329 loc) · 17.8 KB
/
pipeline.yaml
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
resources:
- type: bigquery_table
table_id: facility_boundary_us_all
description: "This table is formed by combining the data from the individual US tables of drive, transit and walk. It represents the boundaries of areas surrounding vaccination facilities from which people can reach the facility within certain duration. It is computed for 3 travel modes of drive, transit and walk and for predetermined time periods."
- type: bigquery_table
table_id: facility_boundary_us_drive
description: "This table represents the boundaries of areas surrounding vaccination facilities from which people can reach the facility by driving within predetermined time periods."
- type: bigquery_table
table_id: facility_boundary_us_transit
description: "This table represents the boundaries of areas surrounding vaccination facilities from which people can reach the facility by public transit within predetermined time periods."
- type: bigquery_table
table_id: facility_boundary_us_walk
description: "This table represents the boundaries of areas surrounding vaccination facilities from which people can reach the facility by walking within predetermined time periods."
dag:
airflow_version: 1
initialize:
dag_id: vaccination_access_to_bq
default_args:
owner: "Google"
depends_on_past: False
start_date: '2021-05-01'
max_active_runs: 1
schedule_interval: "@daily"
catchup: False
default_view: graph
tasks:
- operator: "GoogleCloudStorageToBigQueryOperator"
description: "Task to load CSV file from covid19-open-data bucket to facility_boundary_us_all"
args:
task_id: "gcs_to_bq_table_us_all"
bucket: "{{ var.json.covid19_vaccination_access.source_bucket }}"
source_objects: ["{{ var.json.covid19_vaccination_access.source_prefix }}/facility-boundary-us-all.csv"]
source_format: "CSV"
destination_project_dataset_table: "covid19_vaccination_access.facility_boundary_us_all"
skip_leading_rows: 1
write_disposition: "WRITE_TRUNCATE"
schema_fields:
- name: "facility_place_id"
type: "STRING"
mode: "REQUIRED"
description: "The Google Place ID of the vaccination site. For example, ChIJV3woGFkSK4cRWP9s3-kIFGk."
- name: "facility_provider_id"
type: "STRING"
mode: "NULLABLE"
description: "An identifier imported from the provider of the vaccination site information. In the US, we use the ID provided by VaccineFinder when available. For example, 7ede5bd5-44da-4a59-b4d9-b3a49c53472c."
- name: "facility_name"
type: "STRING"
mode: "NULLABLE"
description: "The name of the vaccination site. For example, St. Joseph's Hospital."
- name: "facility_latitude"
type: "FLOAT"
mode: "REQUIRED"
description: "The latitude of the vaccination site. For example, 36.0507"
- name: "facility_longitude"
type: "FLOAT"
mode: "REQUIRED"
description: "The longitude of the vaccination site. For example, 41.4356"
- name: "facility_country_region"
type: "STRING"
mode: "NULLABLE"
description: "The name of the country or region in English. For example, United States."
- name: "facility_country_region_code"
type: "STRING"
mode: "NULLABLE"
description: "The ISO 3166-1 code for the country or region. For example, US."
- name: "facility_sub_region_1"
type: "STRING"
mode: "NULLABLE"
description: "The name of a region in the country. For example, California."
- name: "facility_sub_region_1_code"
type: "STRING"
mode: "NULLABLE"
description: "A country-specific ISO 3166-2 code for the region. For example, US-CA."
- name: "facility_sub_region_2"
type: "STRING"
mode: "NULLABLE"
description: "The name (or type) of a region in the country. Typically a subdivision of sub_region_1. For example, Santa Clara County or municipal_borough."
- name: "facility_sub_region_2_code"
type: "STRING"
mode: "NULLABLE"
description: "In the US, the FIPS code for a US county (or equivalent). For example, 06085."
- name: "facility_region_place_id"
type: "STRING"
mode: "NULLABLE"
description: "The Google place ID for the most-specific region, used in Google Places API and on Google Maps. For example, ChIJd_Y0eVIvkIARuQyDN0F1LBA."
- name: "mode_of_transportation"
type: "STRING"
mode: "NULLABLE"
description: "The mode of transport used to calculate the catchment boundary. For example, driving."
- name: "travel_time_threshold_minutes"
type: "INTEGER"
mode: "NULLABLE"
description: "The maximum travel time, in minutes, used to calculate the catchment boundary. For example, 30."
- name: "facility_catchment_boundary"
type: "GEOGRAPHY"
mode: "NULLABLE"
description: "A GeoJSON representation of the catchment area boundary of the site, for a particular mode of transportation and travel time threshold. Consists of multiple latitude and longitude points."
- operator: "GoogleCloudStorageToBigQueryOperator"
description: "Task to load CSV file from covid19-open-data bucket to facility_boundary_us_drive"
args:
task_id: "gcs_to_bq_table_us_drive"
bucket: "{{ var.json.covid19_vaccination_access.source_bucket }}"
source_objects: ["{{ var.json.covid19_vaccination_access.source_prefix }}/facility-boundary-us-drive.csv"]
source_format: "CSV"
destination_project_dataset_table: "covid19_vaccination_access.facility_boundary_us_drive"
skip_leading_rows: 1
write_disposition: "WRITE_TRUNCATE"
schema_fields:
- name: "facility_place_id"
type: "STRING"
mode: "REQUIRED"
description: "The Google Place ID of the vaccination site. For example, ChIJV3woGFkSK4cRWP9s3-kIFGk."
- name: "facility_provider_id"
type: "STRING"
mode: "NULLABLE"
description: "An identifier imported from the provider of the vaccination site information. In the US, we use the ID provided by VaccineFinder when available. For example, 7ede5bd5-44da-4a59-b4d9-b3a49c53472c."
- name: "facility_name"
type: "STRING"
mode: "NULLABLE"
description: "The name of the vaccination site. For example, St. Joseph's Hospital."
- name: "facility_latitude"
type: "FLOAT"
mode: "REQUIRED"
description: "The latitude of the vaccination site. For example, 36.0507"
- name: "facility_longitude"
type: "FLOAT"
mode: "REQUIRED"
description: "The longitude of the vaccination site. For example, 41.4356"
- name: "facility_country_region"
type: "STRING"
mode: "NULLABLE"
description: "The name of the country or region in English. For example, United States."
- name: "facility_country_region_code"
type: "STRING"
mode: "NULLABLE"
description: "The ISO 3166-1 code for the country or region. For example, US."
- name: "facility_sub_region_1"
type: "STRING"
mode: "NULLABLE"
description: "The name of a region in the country. For example, California."
- name: "facility_sub_region_1_code"
type: "STRING"
mode: "NULLABLE"
description: "A country-specific ISO 3166-2 code for the region. For example, US-CA."
- name: "facility_sub_region_2"
type: "STRING"
mode: "NULLABLE"
description: "The name (or type) of a region in the country. Typically a subdivision of sub_region_1. For example, Santa Clara County or municipal_borough."
- name: "facility_sub_region_2_code"
type: "STRING"
mode: "NULLABLE"
description: "In the US, the FIPS code for a US county (or equivalent). For example, 06085."
- name: "facility_region_place_id"
type: "STRING"
mode: "NULLABLE"
description: "The Google place ID for the most-specific region, used in Google Places API and on Google Maps. For example, ChIJd_Y0eVIvkIARuQyDN0F1LBA."
- name: "mode_of_transportation"
type: "STRING"
mode: "NULLABLE"
description: "The mode of transport used to calculate the catchment boundary. For example, driving."
- name: "travel_time_threshold_minutes"
type: "INTEGER"
mode: "NULLABLE"
description: "The maximum travel time, in minutes, used to calculate the catchment boundary. For example, 30."
- name: "facility_catchment_boundary"
type: "GEOGRAPHY"
mode: "NULLABLE"
description: "A GeoJSON representation of the catchment area boundary of the site, for a particular mode of transportation and travel time threshold. Consists of multiple latitude and longitude points."
- operator: "GoogleCloudStorageToBigQueryOperator"
description: "Task to load CSV file from covid19-open-data bucket to facility_boundary_us_transit"
args:
task_id: "gcs_to_bq_table_us_transit"
bucket: "{{ var.json.covid19_vaccination_access.source_bucket }}"
source_objects: ["{{ var.json.covid19_vaccination_access.source_prefix }}/facility-boundary-us-transit.csv"]
source_format: "CSV"
destination_project_dataset_table: "covid19_vaccination_access.facility_boundary_us_transit"
skip_leading_rows: 1
write_disposition: "WRITE_TRUNCATE"
schema_fields:
- name: "facility_place_id"
type: "STRING"
mode: "REQUIRED"
description: "The Google Place ID of the vaccination site. For example, ChIJV3woGFkSK4cRWP9s3-kIFGk."
- name: "facility_provider_id"
type: "STRING"
mode: "NULLABLE"
description: "An identifier imported from the provider of the vaccination site information. In the US, we use the ID provided by VaccineFinder when available. For example, 7ede5bd5-44da-4a59-b4d9-b3a49c53472c."
- name: "facility_name"
type: "STRING"
mode: "NULLABLE"
description: "The name of the vaccination site. For example, St. Joseph's Hospital."
- name: "facility_latitude"
type: "FLOAT"
mode: "REQUIRED"
description: "The latitude of the vaccination site. For example, 36.0507"
- name: "facility_longitude"
type: "FLOAT"
mode: "REQUIRED"
description: "The longitude of the vaccination site. For example, 41.4356"
- name: "facility_country_region"
type: "STRING"
mode: "NULLABLE"
description: "The name of the country or region in English. For example, United States."
- name: "facility_country_region_code"
type: "STRING"
mode: "NULLABLE"
description: "The ISO 3166-1 code for the country or region. For example, US."
- name: "facility_sub_region_1"
type: "STRING"
mode: "NULLABLE"
description: "The name of a region in the country. For example, California."
- name: "facility_sub_region_1_code"
type: "STRING"
mode: "NULLABLE"
description: "A country-specific ISO 3166-2 code for the region. For example, US-CA."
- name: "facility_sub_region_2"
type: "STRING"
mode: "NULLABLE"
description: "The name (or type) of a region in the country. Typically a subdivision of sub_region_1. For example, Santa Clara County or municipal_borough."
- name: "facility_sub_region_2_code"
type: "STRING"
mode: "NULLABLE"
description: "In the US, the FIPS code for a US county (or equivalent). For example, 06085."
- name: "facility_region_place_id"
type: "STRING"
mode: "NULLABLE"
description: "The Google place ID for the most-specific region, used in Google Places API and on Google Maps. For example, ChIJd_Y0eVIvkIARuQyDN0F1LBA."
- name: "mode_of_transportation"
type: "STRING"
mode: "NULLABLE"
description: "The mode of transport used to calculate the catchment boundary. For example, driving."
- name: "travel_time_threshold_minutes"
type: "INTEGER"
mode: "NULLABLE"
description: "The maximum travel time, in minutes, used to calculate the catchment boundary. For example, 30."
- name: "facility_catchment_boundary"
type: "GEOGRAPHY"
mode: "NULLABLE"
description: "A GeoJSON representation of the catchment area boundary of the site, for a particular mode of transportation and travel time threshold. Consists of multiple latitude and longitude points."
- operator: "GoogleCloudStorageToBigQueryOperator"
description: "Task to load CSV file from covid19-open-data bucket to facility_boundary_us_walk"
args:
task_id: "gcs_to_bq_table_us_walk"
bucket: "{{ var.json.covid19_vaccination_access.source_bucket }}"
source_objects: ["{{ var.json.covid19_vaccination_access.source_prefix }}/facility-boundary-us-walk.csv"]
source_format: "CSV"
destination_project_dataset_table: "covid19_vaccination_access.facility_boundary_us_walk"
skip_leading_rows: 1
write_disposition: "WRITE_TRUNCATE"
schema_fields:
- name: "facility_place_id"
type: "STRING"
mode: "REQUIRED"
description: "The Google Place ID of the vaccination site. For example, ChIJV3woGFkSK4cRWP9s3-kIFGk."
- name: "facility_provider_id"
type: "STRING"
mode: "NULLABLE"
description: "An identifier imported from the provider of the vaccination site information. In the US, we use the ID provided by VaccineFinder when available. For example, 7ede5bd5-44da-4a59-b4d9-b3a49c53472c."
- name: "facility_name"
type: "STRING"
mode: "NULLABLE"
description: "The name of the vaccination site. For example, St. Joseph's Hospital."
- name: "facility_latitude"
type: "FLOAT"
mode: "REQUIRED"
description: "The latitude of the vaccination site. For example, 36.0507"
- name: "facility_longitude"
type: "FLOAT"
mode: "REQUIRED"
description: "The longitude of the vaccination site. For example, 41.4356"
- name: "facility_country_region"
type: "STRING"
mode: "NULLABLE"
description: "The name of the country or region in English. For example, United States."
- name: "facility_country_region_code"
type: "STRING"
mode: "NULLABLE"
description: "The ISO 3166-1 code for the country or region. For example, US."
- name: "facility_sub_region_1"
type: "STRING"
mode: "NULLABLE"
description: "The name of a region in the country. For example, California."
- name: "facility_sub_region_1_code"
type: "STRING"
mode: "NULLABLE"
description: "A country-specific ISO 3166-2 code for the region. For example, US-CA."
- name: "facility_sub_region_2"
type: "STRING"
mode: "NULLABLE"
description: "The name (or type) of a region in the country. Typically a subdivision of sub_region_1. For example, Santa Clara County or municipal_borough."
- name: "facility_sub_region_2_code"
type: "STRING"
mode: "NULLABLE"
description: "In the US, the FIPS code for a US county (or equivalent). For example, 06085."
- name: "facility_region_place_id"
type: "STRING"
mode: "NULLABLE"
description: "The Google place ID for the most-specific region, used in Google Places API and on Google Maps. For example, ChIJd_Y0eVIvkIARuQyDN0F1LBA."
- name: "mode_of_transportation"
type: "STRING"
mode: "NULLABLE"
description: "The mode of transport used to calculate the catchment boundary. For example, driving."
- name: "travel_time_threshold_minutes"
type: "INTEGER"
mode: "NULLABLE"
description: "The maximum travel time, in minutes, used to calculate the catchment boundary. For example, 30."
- name: "facility_catchment_boundary"
type: "GEOGRAPHY"
mode: "NULLABLE"
description: "A GeoJSON representation of the catchment area boundary of the site, for a particular mode of transportation and travel time threshold. Consists of multiple latitude and longitude points."
graph_paths:
- "gcs_to_bq_table_us_all"
- "gcs_to_bq_table_us_drive"
- "gcs_to_bq_table_us_transit"
- "gcs_to_bq_table_us_walk"