Access my project files here - Kafka-Weather-Data-Engineering-Project
This project showcases a real-time streaming pipeline utilizing Kafka to integrate a Weather API for live weather data collection. A producer program efficiently gathers this data and feeds it into a Kafka cluster for seamless ingestion. The consumer program, focusing on simplicity, stores each key-value pair as a JSON file directly into Google Cloud Storage (GCS). Utilizing BigQuery, an external table is established on the GCS bucket, facilitating structured querying and analysis of the stored JSON-formatted data. This repository provides insights and a guide into building an end-to-end real-time data engineering solution for weather data.
For this project, I’m utilizing the Weather API to collect real-time data for various cities. You can explore the API and find detailed information at the provided link below:
Created an Ingress firewall rule to enable access to the Kafka server from the local machine.
Changing Kafka “ADVERTISED_LISTENERS” Properties:
config/server.properties
) to utilize the VM’s public IP address for external connectivity.Producer Program Implementation:
time.sleep(5)
) to facilitate efficient data consumption by Kafka consumers.kafka-python
package to develop the Kafka program using Python.Consumer Program for GCS:
Creating Bucket in GCS for Storage:
Creating External Table in BigQuery:
Power BI Dashboard Visualization:
In conclusion, this project successfully demonstrates the construction of a robust real-time streaming pipeline using Kafka, seamlessly integrating a Weather API for live data collection. The implementation of producer and consumer programs facilitates efficient data ingestion and storage in Google Cloud Storage (GCS), complemented by the utilization of BigQuery for structured querying and analysis. The Power BI dashboard enhances user interaction and visualization of weather data insights. Moving forward, potential enhancements could include scalability improvements and additional analytics for deeper insights into weather patterns.