Git Product home page Git Product logo

airflow_openweather_datapipeline's Introduction

Airflow OpenWeather Data Pipeline

image image

This repository contains a simple Apache Airflow DAG for fetching weather data from the OpenWeather API and storing it in AWS S3.

Setup Instructions

  1. Enable Windows Subsystem for Linux (WSL) and Virtualization:

    • Go to Control Panel/Program and Feature and enable these features.
  2. Install Ubuntu from Microsoft Store:

    • Set a username and password during installation.
  3. Set Up Ubuntu:

    • Open Ubuntu using wsl command or directly from the start menu.
    • Run the following commands:
      sudo apt update
      sudo apt install python3-pip
      sudo apt install python3.10-venv
      python3 -m venv airflow-venv
    • Activate the virtual environment:
      • For Linux:
        source airflow-venv/bin/activate
      • For Windows:
        .\airflow-venv\Scripts\activate
    • Install required Python packages:
      pip install pandas s3fs apache-airflow
  4. Start Airflow:

    airflow standalone
    • Open a new tab and go to Public IPv4 DNS:8080.
    • Navigate to Admin > Connections and add a new connection with the following details:
      • http_conn_id
      • HTTP
      • Your OpenWeather API endpoint
  5. Configure Airflow:

    • Create a dags directory in Airflow.
    • Create or import the weather_dag.py file provided in this repository.
    • Edit airflow.cfg to set the DAG directory.
  6. AWS Setup:

    • Install AWS CLI:
      sudo apt install awscli
    • Set up security credentials:
      aws configure
      Follow the prompts and enter your AWS access key ID, secret access key, and region.
    • Run the following command to get a session token:
      aws sts get-session-token

DAG Code

The DAG code weather_dag.py included in this repository fetches weather data from the OpenWeather API, transforms it, and loads it into AWS S3.

Contact Information

For any questions or concerns, please contact [email protected].

airflow_openweather_datapipeline's People

Contributors

iammqaisar 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.