This assignment is a part of my Course (Python Project for Data Science) provided by IBM SKILL NETWORK . In this project, I'll extract essential data from a dataset and display it in a graph. The goal is to provide a clear visualization of stock data and revenue data for two companies, Tesla and GameStop.
- Define a Function that Makes a Graph
- Question 1: Use yfinance to Extract Stock Data
- Question 2: Use Webscraping to Extract Tesla Revenue Data
- Question 3: Use yfinance to Extract Stock Data
- Question 4: Use Webscraping to Extract GME Revenue Data
- Question 5: Plot Tesla Stock Graph
- Question 6: Plot GameStop Stock Graph
These instructions will help you get started with the assignment and understand how to complete each question step by step.
- Python
- Jupyter Notebook
- Required Python libraries (e.g., pandas, requests, yfinance, BeautifulSoup, plotly)
In this section, we define the function make_graph
that is used for creating the stock data graph. You don't need to understand the internal workings of the function; you should focus on the inputs it requires.
Here, we use the yfinance
library to extract stock data for Tesla and GameStop and save it as dataframes. The data is used for subsequent visualizations.
We use the requests
library and BeautifulSoup to scrape Tesla's revenue data from a web page. This data is used in the graph.
Similar to Question 1, we extract stock data for GameStop using the yfinance
library.
Using web scraping techniques, we extract revenue data for GameStop from a web page, which is required for the visualization.
This is where we create the graph for Tesla's stock data using the make_graph
function. The graph displays historical share prices and revenue.
Similar to Question 5, we create a graph for GameStop's stock data.
Aniket Bembale