Giter Site home page Giter Site logo

abstract's Introduction

Airflow DAG for House Price Classification

This project demonstrates using Apache Airflow to classify house prices based on predefined percentiles. The project assumes you have Docker installed and configured. To classify the houses we classify them by Suburb, Rooms, Type and YearBuilt. And the essential colums are Price, Suburb and Type.

Setup

  1. Clone the repository:

    git clone https://github.com/diegolupi93/abstract.git
    cd abstract
  2. Create Required folders

    mkdir config logs plugins
  3. Build and Run the Docker image:

    docker-compose up airflow-init
    docker-compose up
  4. Access Airflow UI:

Open http://localhost:8080 in your browser. Use the default Airflow credentials to login:

username: airflow
password: airflow
  1. Configure PostgreSQL connection:

Go to Admin -> Connections in Airflow UI. Create a new connection with the following details:

Connection Id: postgres_localhost
Host: postgres
Database: airflow
Login: airflow
Password: airflow
Port: 5432
  1. Define the config variables Go to Admin -> Variables in Airflow UI.
Key: dag_config
Val: 
{
"URL":"https://s3.amazonaws.com/external.abstractapi.com/challenges/melb_data.csv",
"download_path":"melb_data.csv",
"essential_fields": ["Price", "Suburb", "Type"]
}
  1. Linux Nodification If you are linux user you should do
sudo nano /etc/hosts

and add this line

127.0.0.1   postgres

Running the DAG

  1. Enable the DAG:
  • Go to Airflow UI.
  • Click on the toggle button to enable the melbourne_dag.
  1. Trigger the DAG:

Once enabled, the DAG will be scheduled according to its schedule_interval. You can manually trigger the DAG melbourne_dag to run immediately from the Airflow UI.

alt text

Check the Data

To Check if the data is stored you can run the SQLquery.ipynb.

abstract's People

Contributors

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