-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into curriculum_docs_update
- Loading branch information
Showing
210 changed files
with
8,391 additions
and
3,054 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...ags/create_external_tables/ntd_data_products/2022__annual_database_agency_information.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
operator: operators.ExternalTable | ||
bucket: gs://calitp-ntd-xlsx-products-clean | ||
prefix_bucket: false | ||
post_hook: | | ||
SELECT * | ||
FROM `{{ get_project_id() }}`.external_ntd__annual_reporting.2022__annual_database_agency_information | ||
LIMIT 1; | ||
source_objects: | ||
- "annual_database_agency_information/2022/_2022_agency_information/*.jsonl.gz" | ||
destination_project_dataset_table: "external_ntd__annual_reporting.2022__annual_database_agency_information" | ||
source_format: NEWLINE_DELIMITED_JSON | ||
use_bq_client: true | ||
hive_options: | ||
mode: AUTO | ||
require_partition_filter: false | ||
source_uri_prefix: "annual_database_agency_information/2022/_2022_agency_information/" |
16 changes: 16 additions & 0 deletions
16
...ags/create_external_tables/ntd_data_products/2023__annual_database_agency_information.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
operator: operators.ExternalTable | ||
bucket: gs://calitp-ntd-xlsx-products-clean | ||
prefix_bucket: false | ||
post_hook: | | ||
SELECT * | ||
FROM `{{ get_project_id() }}`.external_ntd__annual_reporting.2023__annual_database_agency_information | ||
LIMIT 1; | ||
source_objects: | ||
- "annual_database_agency_information/2023/agency_information/*.jsonl.gz" | ||
destination_project_dataset_table: "external_ntd__annual_reporting.2023__annual_database_agency_information" | ||
source_format: NEWLINE_DELIMITED_JSON | ||
use_bq_client: true | ||
hive_options: | ||
mode: AUTO | ||
require_partition_filter: false | ||
source_uri_prefix: "annual_database_agency_information/2023/agency_information/" |
16 changes: 16 additions & 0 deletions
16
...ate_external_tables/ntd_data_products/2023__annual_database_contractual_relationships.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
operator: operators.ExternalTable | ||
bucket: gs://calitp-ntd-xlsx-products-clean | ||
prefix_bucket: false | ||
post_hook: | | ||
SELECT * | ||
FROM `{{ get_project_id() }}`.external_ntd__annual_reporting.2023__annual_database_contractual_relationships | ||
LIMIT 1; | ||
source_objects: | ||
- "annual_database_contractual_relationship/2023/contractual_relationships/*.jsonl.gz" | ||
destination_project_dataset_table: "external_ntd__annual_reporting.2023__annual_database_contractual_relationships" | ||
source_format: NEWLINE_DELIMITED_JSON | ||
use_bq_client: true | ||
hive_options: | ||
mode: AUTO | ||
require_partition_filter: false | ||
source_uri_prefix: "annual_database_contractual_relationship/2023/contractual_relationships/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...xternal_tables/ntd_data_products/historical__fra_regulated_mode_major_security_events.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
operator: operators.ExternalTable | ||
bucket: gs://calitp-ntd-api-products | ||
source_objects: | ||
- "fra_regulated_mode_major_security_events/historical/*.jsonl.gz" | ||
source_format: NEWLINE_DELIMITED_JSON | ||
use_bq_client: true | ||
hive_options: | ||
mode: CUSTOM | ||
require_partition_filter: false | ||
source_uri_prefix: "fra_regulated_mode_major_security_events/historical/{dt:DATE}/{execution_ts:TIMESTAMP}" | ||
destination_project_dataset_table: "external_ntd__safety_and_security.historical__fra_regulated_mode_major_security_events" | ||
prefix_bucket: false | ||
post_hook: SELECT * FROM `{{ get_project_id() }}`.external_ntd__safety_and_security.historical__fra_regulated_mode_major_security_events LIMIT 1; |
13 changes: 13 additions & 0 deletions
13
airflow/dags/create_external_tables/ntd_data_products/historical__major_safety_events.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
operator: operators.ExternalTable | ||
bucket: gs://calitp-ntd-api-products | ||
source_objects: | ||
- "major_safety_events/historical/*.jsonl.gz" | ||
source_format: NEWLINE_DELIMITED_JSON | ||
use_bq_client: true | ||
hive_options: | ||
mode: CUSTOM | ||
require_partition_filter: false | ||
source_uri_prefix: "major_safety_events/historical/{dt:DATE}/{execution_ts:TIMESTAMP}" | ||
destination_project_dataset_table: "external_ntd__safety_and_security.historical__major_safety_events" | ||
prefix_bucket: false | ||
post_hook: SELECT * FROM `{{ get_project_id() }}`.external_ntd__safety_and_security.historical__major_safety_events LIMIT 1; |
13 changes: 13 additions & 0 deletions
13
...nal_tables/ntd_data_products/historical__monthly_modal_time_series_safety_and_service.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
operator: operators.ExternalTable | ||
bucket: gs://calitp-ntd-api-products | ||
source_objects: | ||
- "monthly_modal_time_series_safety_and_service/historical/*.jsonl.gz" | ||
source_format: NEWLINE_DELIMITED_JSON | ||
use_bq_client: true | ||
hive_options: | ||
mode: CUSTOM | ||
require_partition_filter: false | ||
source_uri_prefix: "monthly_modal_time_series_safety_and_service/historical/{dt:DATE}/{execution_ts:TIMESTAMP}" | ||
destination_project_dataset_table: "external_ntd__safety_and_security.historical__monthly_modal_time_series_safety_and_service" | ||
prefix_bucket: false | ||
post_hook: SELECT * FROM `{{ get_project_id() }}`.external_ntd__safety_and_security.historical__monthly_modal_time_series_safety_and_service LIMIT 1; |
13 changes: 13 additions & 0 deletions
13
...ate_external_tables/ntd_data_products/historical__nonmajor_safety_and_security_events.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
operator: operators.ExternalTable | ||
bucket: gs://calitp-ntd-api-products | ||
source_objects: | ||
- "nonmajor_safety_and_security_events/historical/*.jsonl.gz" | ||
source_format: NEWLINE_DELIMITED_JSON | ||
use_bq_client: true | ||
hive_options: | ||
mode: CUSTOM | ||
require_partition_filter: false | ||
source_uri_prefix: "nonmajor_safety_and_security_events/historical/{dt:DATE}/{execution_ts:TIMESTAMP}" | ||
destination_project_dataset_table: "external_ntd__safety_and_security.historical__nonmajor_safety_and_security_events" | ||
prefix_bucket: false | ||
post_hook: SELECT * FROM `{{ get_project_id() }}`.external_ntd__safety_and_security.historical__nonmajor_safety_and_security_events LIMIT 1; |
29 changes: 29 additions & 0 deletions
29
airflow/dags/create_external_tables/state_geoportal/state_highway_network.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
operator: operators.ExternalTable | ||
bucket: gs://calitp-state-geoportal-scrape | ||
source_objects: | ||
- "state_highway_network_geodata/*.jsonl.gz" | ||
source_format: NEWLINE_DELIMITED_JSON | ||
use_bq_client: true | ||
hive_options: | ||
mode: CUSTOM | ||
require_partition_filter: false | ||
source_uri_prefix: "state_highway_network_geodata/{dt:DATE}/{execution_ts:TIMESTAMP}/" | ||
destination_project_dataset_table: "external_state_geoportal.state_highway_network" | ||
prefix_bucket: false | ||
post_hook: | | ||
SELECT * | ||
FROM `{{ get_project_id() }}`.external_state_geoportal.state_highway_network | ||
LIMIT 1; | ||
schema_fields: | ||
- name: Route | ||
type: INTEGER | ||
- name: County | ||
type: STRING | ||
- name: District | ||
type: INTEGER | ||
- name: RouteType | ||
type: STRING | ||
- name: Direction | ||
type: STRING | ||
- name: wkt_coordinates | ||
type: GEOGRAPHY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
description: "Scrape State Highway Network from State Geoportal" | ||
schedule_interval: "0 4 1 * *" # 4am UTC first day of every month | ||
tags: | ||
- all_gusty_features | ||
default_args: | ||
owner: airflow | ||
depends_on_past: False | ||
catchup: False | ||
start_date: "2024-09-15" | ||
email: | ||
- "[email protected]" | ||
email_on_failure: True | ||
email_on_retry: False | ||
retries: 1 | ||
retry_delay: !timedelta 'minutes: 2' | ||
concurrency: 50 | ||
#sla: !timedelta 'hours: 2' | ||
wait_for_defaults: | ||
timeout: 3600 |
7 changes: 7 additions & 0 deletions
7
airflow/dags/scrape_state_geoportal/state_highway_network.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
operator: operators.StateGeoportalAPIOperator | ||
|
||
root_url: 'https://caltrans-gis.dot.ca.gov/arcgis/rest/services/' | ||
service: "CHhighway/SHN_Lines" | ||
layer: "0" | ||
product: 'state_highway_network' | ||
resultRecordCount: 2000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
...ow/dags/sync_ntd_data_xlsx/agency_information/2022_annual_database_agency_information.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
operator: operators.NtdDataProductXLSXOperator | ||
|
||
product: 'annual_database_agency_information' | ||
xlsx_file_url: 'https://www.transit.dot.gov/ntd/data-product/2022-annual-database-agency-information' # placeholder for scraped url from scrape_ntd_xlsx_urls task | ||
year: '2022' # one of: 'historical' (long history), 'mutli-year' (select history), or a specific year (ex: 2022) | ||
dependencies: | ||
- scrape_ntd_xlsx_urls |
7 changes: 7 additions & 0 deletions
7
...ow/dags/sync_ntd_data_xlsx/agency_information/2023_annual_database_agency_information.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
operator: operators.NtdDataProductXLSXOperator | ||
|
||
product: 'annual_database_agency_information' | ||
xlsx_file_url: 'https://www.transit.dot.gov/ntd/data-product/2023-annual-database-agency-information' # placeholder for scraped url from scrape_ntd_xlsx_urls task | ||
year: '2023' # one of: 'historical' (long history), 'mutli-year' (select history), or a specific year (ex: 2022) | ||
dependencies: | ||
- scrape_ntd_xlsx_urls |
Oops, something went wrong.