Code Monkey home page Code Monkey logo

yfinance_streaming_aws_kinesis's Introduction

Streaming Finance Data with AWS Lambda

Utilizing yfinance data stock data for a selection of companies and an individual day, the project demonstrates an overview of the following workflow:

1. DataCollector

Uses a lambda function to download our stock data
The call used in the function is in data_collector.py

2. DataTransformer

Uses a lambda function to transform and send data into s3

3. DataAnalyzer

Process that allows for the querying of the sample data sent to s3

Workflow

The setup process begins with creating an AWS Kinesis Firehose Delivery Stream that has the function mentioned above that can transform our data in the proper format and deliver to an s3 bucket. The next step involves setting up a simple Lambda function, the DataCollector, that takes the desired stock data and puts it into the DataTranformer stream workflow. After utilizing the Kinesis, Lambda and s3 products, we also are able to leverage Athena and Glue. In order to query our data for any analysis we have to first point a Glue Crawler at the created s3 bucket in tandem with the functionality of Athena, the DataAnalyzer.

Lambda Function url

https://qhx43zoyr2.execute-api.us-east-2.amazonaws.com/default/project-stream-producer

Documents

  1. finance_data folder - contains file sent to s3
  2. data_collector.py - lambda source code for the DataCollector
  3. query.sql - query used to generate results.csv file for highest hourly stock high per company
  4. results.csv - query results
  5. Analysis.ipynb - visualizations of results query
  6. Assets - Images of Setup in Appendix (see below)

Data Resource

yfinance: Yahoo! Finance market data downloader
Companies: Facebook (FB), Shopify (SHOP), Beyond Meat (BYND), Netflix (NFLX), Pinterest (PINS), Square (SQ), The Trade Desk (TTD), Okta (OKTA), Snap (SNAP), Datadog (DDOG)
Date: May 14, 2020
Interval: 1m

Appendix A

DataCollector Lambda Configuration Page

Appendix B

Kinesis Data Firehouse Delivery Stream Monitoring

yfinance_streaming_aws_kinesis's People

Contributors

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