Giter VIP home page Giter VIP logo

wonderakwei / automated-traffic-data-etl-project Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 631 KB

Automated Traffic Data ETL: Python scripts convert, reformat, and upload traffic data to BigQuery via GCS. Terraform ensures efficient resource provisioning, and APScheduler automates daily cron jobs.

License: MIT License

Python 86.57% HCL 13.43%
apscheduler bigquery cronjob etl-automation etl-pipeline google-cloud python strorage terraform

automated-traffic-data-etl-project's Introduction

Automated Traffic Data ETL Project

Data Engineer

Overview

The Automated Traffic Data ETL Project streamlines the extraction, transformation, and loading of traffic data. It utilizes Python scripts to convert a spreadsheet (traffic_spreadsheet.xls) into .csv format, reformat the time column, and seamlessly upload the data to BigQuery through Google Cloud Storage (GCS). This project integrates Terraform for Infrastructure as Code (IaC), facilitating the provisioning of GCS and BigQuery resources. Furthermore, it employs APScheduler, a Python library, to schedule daily cron jobs, ensuring the automation of the entire process. The project also includes the creation of a Data Studio dashboard, offering a visual representation of traffic trends over time.

Interview Questions

Evaluation Criteria: The code will be assessed based on results, cleanliness, and explanatory comments. Justifiable assumptions are allowed where necessary.

Task

The objective is to upload the traffic_spreadsheet.xls to BigQuery for analysis. The provided script should cover both Python and Bash.

  • Define appropriate bucket names and tables.
  • Convert the file to .csv as BigQuery does not support .xls.
  • Reformat the time column to YY-mm-dd HH:MM.
  • Create a backup of the file in an S3 storage bucket in GCS.
  • Automate the data upload to BigQuery from GCS.
  • Optionally, generate a dashboard on Data (Looker) Studio displaying a traffic graph over time.
  • The entire process should be automated to run daily via a cronjob.

Project Structure

project_root/
│
├── data/
│   └── schema.json
│   └── traffic_spreadsheet.xls
│
├── docs/
│   └── apscheduler.md
│   └── datastudio.md
│   └── gcp.md
│   └── processing_and_upload.md
│   └── requirements.md
│   └── terraform.md
│   
├── images/
│   └── project_image.jpg
│
├── scripts/
│   ├── .env
│   ├── automated_pipeline.py
│   ├── data_transformation.py
│   ├── scheduler.py
│   └── upload_data_from__gcs_to_bigquery.py
│   └── upload_data_to_gcs.py
│
├── terraform/
│   ├── credentials.json
│   ├── main.tf
│   ├── provider.tf
│   ├── terraform.tfvars
│   └── variables.tf
│
├── README.md
│
└── requirements.txt

automated-traffic-data-etl-project's People

Contributors

wonderakwei avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.