Skip to content

Commit

Permalink
feat: Onboard COVID-19 Vaccination Access dataset (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
adlersantos committed Jun 8, 2021
1 parent 7c0f339 commit e68b4f8
Show file tree
Hide file tree
Showing 8 changed files with 1,050 additions and 0 deletions.
@@ -0,0 +1,26 @@
/**
* 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.
*/


resource "google_bigquery_dataset" "covid19_vaccination_access" {
dataset_id = "covid19_vaccination_access"
project = var.project_id
description = "The dataset contains catchment areas surrounding COVID-19 vaccination sites (sometimes called facilities). A catchment area represents the area within which a site can be reached within a designated period of time. Each vaccination site has a number of catchment areas, each representing a combination of a typical traveling time (for example, 15 minutes or less) and mode of transport (such as, walking, driving, or public transport)."
}

output "bigquery_dataset-covid19_vaccination_access-dataset_id" {
value = google_bigquery_dataset.covid19_vaccination_access.dataset_id
}
28 changes: 28 additions & 0 deletions datasets/covid19_vaccination_access/_terraform/provider.tf
@@ -0,0 +1,28 @@
/**
* 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.
*/


provider "google" {
project = var.project_id
impersonate_service_account = var.impersonating_acct
region = var.region
}

data "google_client_openid_userinfo" "me" {}

output "impersonating-account" {
value = data.google_client_openid_userinfo.me.email
}
@@ -0,0 +1,25 @@
/**
* 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.
*/


resource "google_bigquery_dataset" "vaccination_access" {
dataset_id = "vaccination_access"
project = var.project_id
}

output "bigquery_dataset-vaccination_access-dataset_id" {
value = google_bigquery_dataset.vaccination_access.dataset_id
}
@@ -0,0 +1,96 @@
/**
* 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.
*/


resource "google_bigquery_table" "facility_boundary_us_all" {
project = var.project_id
dataset_id = "covid19_vaccination_access"
table_id = "facility_boundary_us_all"



depends_on = [
google_bigquery_dataset.covid19_vaccination_access
]
}

output "bigquery_table-facility_boundary_us_all-table_id" {
value = google_bigquery_table.facility_boundary_us_all.table_id
}

output "bigquery_table-facility_boundary_us_all-id" {
value = google_bigquery_table.facility_boundary_us_all.id
}

resource "google_bigquery_table" "facility_boundary_us_drive" {
project = var.project_id
dataset_id = "covid19_vaccination_access"
table_id = "facility_boundary_us_drive"



depends_on = [
google_bigquery_dataset.covid19_vaccination_access
]
}

output "bigquery_table-facility_boundary_us_drive-table_id" {
value = google_bigquery_table.facility_boundary_us_drive.table_id
}

output "bigquery_table-facility_boundary_us_drive-id" {
value = google_bigquery_table.facility_boundary_us_drive.id
}

resource "google_bigquery_table" "facility_boundary_us_transit" {
project = var.project_id
dataset_id = "covid19_vaccination_access"
table_id = "facility_boundary_us_transit"



depends_on = [
google_bigquery_dataset.covid19_vaccination_access
]
}

output "bigquery_table-facility_boundary_us_transit-table_id" {
value = google_bigquery_table.facility_boundary_us_transit.table_id
}

output "bigquery_table-facility_boundary_us_transit-id" {
value = google_bigquery_table.facility_boundary_us_transit.id
}

resource "google_bigquery_table" "facility_boundary_us_walk" {
project = var.project_id
dataset_id = "covid19_vaccination_access"
table_id = "facility_boundary_us_walk"



depends_on = [
google_bigquery_dataset.covid19_vaccination_access
]
}

output "bigquery_table-facility_boundary_us_walk-table_id" {
value = google_bigquery_table.facility_boundary_us_walk.table_id
}

output "bigquery_table-facility_boundary_us_walk-id" {
value = google_bigquery_table.facility_boundary_us_walk.id
}
23 changes: 23 additions & 0 deletions datasets/covid19_vaccination_access/_terraform/variables.tf
@@ -0,0 +1,23 @@
/**
* 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.
*/


variable "project_id" {}
variable "bucket_name_prefix" {}
variable "impersonating_acct" {}
variable "region" {}
variable "env" {}

58 changes: 58 additions & 0 deletions datasets/covid19_vaccination_access/dataset.yaml
@@ -0,0 +1,58 @@
# 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.

dataset:
# The `dataset` block includes properties for your dataset that will be shown
# to users of your data on the Google Cloud website.

# Must be exactly the same name as the folder name your dataset.yaml is in.
name: covid19_vaccination_access

# A friendly, human-readable name of the dataset
friendly_name: ~

# A short, descriptive summary of the dataset.
description: "The dataset contains catchment areas surrounding COVID-19 vaccination sites (sometimes called facilities). A catchment area represents the area within which a site can be reached within a designated period of time. Each vaccination site has a number of catchment areas, each representing a combination of a typical traveling time (for example, 15 minutes or less) and mode of transport (such as, walking, driving, or public transport)."

# A list of sources the dataset is derived from, using the YAML list syntax.
dataset_sources: ~

# A list of terms and conditions that users of the dataset should agree on,
# using the YAML list syntax.
terms_of_use: ~


resources:
# A list of Google Cloud resources needed by your dataset. In principle, all
# pipelines under a dataset should be able to share these resources.
#
# The currently supported resources are shown below. Use only the resources
# you need, and delete the rest as needed by your pipeline.
#
# We will keep adding to the list below to support more Google Cloud resources
# over time. If a resource you need isn't supported, please file an issue on
# the repository.

- type: bigquery_dataset
# Google BigQuery dataset to namespace all tables managed by this folder
#
# Required Properties:
# dataset_id
#
# Optional Properties:
# friendly_name (A user-friendly name of the dataset)
# description (A user-friendly description of the dataset)
# location (The geographic location where the dataset should reside)
dataset_id: covid19_vaccination_access
description: "The dataset contains catchment areas surrounding COVID-19 vaccination sites (sometimes called facilities). A catchment area represents the area within which a site can be reached within a designated period of time. Each vaccination site has a number of catchment areas, each representing a combination of a typical traveling time (for example, 15 minutes or less) and mode of transport (such as, walking, driving, or public transport)."

0 comments on commit e68b4f8

Please sign in to comment.