GithubHelp home page GithubHelp logo

web-scrapper-etl-project's Introduction

Jazzy Investment Data Pipeline

This is a Python web scraper that extracts the daily stock exchange data of listed companies/securities from https://afx.kwayisi.org/ngx/ and loads it into a Postgresql database. The data pipeline consists of three stages:

Extract: Web scraping the data from the website Transform: Cleaning and formatting the data into a format suitable for loading into the database Load: Inserting the data into the Postgresql database

Prerequisites

Python 3.x pip package manager Postgresql database

Installation

Clone this repository to your local machine: git clone https://github.com/10Alytics/Jazzy-Investment-Data-Pipeline.git

Install the required Python libraries using pip: pip install -r requirements.txt

Create a Postgresql database with a table to store the stock exchange data. You can use the following SQL statement to create the table:

CREATE TABLE stocks ( id SERIAL PRIMARY KEY, symbol VARCHAR(50) NOT NULL, name VARCHAR(255) NOT NULL, open FLOAT NOT NULL, high FLOAT NOT NULL, low FLOAT NOT NULL, close FLOAT NOT NULL, volume INTEGER NOT NULL, date DATE NOT NULL );

Create a .env file in the root directory of the project and set the database connection details: DATABASE_URL=postgresql://user:password@host:port/database_name

Replace the user, password, host, port, and database_name placeholders with your own database connection details.

Usage

To run the data pipeline, execute the following command in the terminal:

python main.py

This will extract the stock exchange data from the website, transform it into a suitable format, and load it into the database.

By default, the pipeline will load data for the current day. You can specify a different date using the --date command-line argument. For example:

css Copy code python main.py --date 2022-03-07 This will load data for March 7th, 2022.

Conclusion

With this data pipeline, you can easily extract, transform, and load the daily stock exchange data of listed companies/securities from https://afx.kwayisi.org/ngx/ into a Postgresql database. This data can be used for stock trading analytics by Jazzy Investment or any other stockbroking firm.

web-scrapper-etl-project's People

Contributors

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