Netflix Stocks

Attached below is my Netflix Stock Capstone slide. Any feedback is appreciated, have a great day :slight_smile:

https://docs.google.com/presentation/d/10lM3H8w5UclPFWCbJ6m_Flxii1u6owcsVgcIsvGSOvM/edit?usp=sharing

Below is my code:

from matplotlib import pyplot as plt
import pandas as pd
import seaborn as sns

netflix_stocks = pd.read_csv('NFLX.csv')
netflix_stocks.head()

dowjones_stocks = pd.read_csv('DJI.csv')
dowjones_stocks.head()

netflix_stocks_quarterly = pd.read_csv('NFLX_daily_by_quarter.csv')
netflix_stocks_quarterly.head()

netflix_stocks.rename(columns={'Adj Close': 'Price'}, inplace=True)
netflix_stocks_quarterly.rename(columns={'Adj Close': 'Price'}, inplace=True)
dowjones_stocks.rename(columns={'Adj Close': 'Price'}, inplace=True)

netflix_stocks.head()

dowjones_stocks.head()
netflix_stocks_quarterly.head()

ax = sns.violinplot(data=netflix_stocks_quarterly, x='Quarter', y='Price')
ax.set_title("Distribution of 2017 Netflix Stock Prices by Quarter")
ax.set_ylabel('Closing Stock Price')
ax.set_xlabel('Business Quarters in 2017')

plt.savefig('kiteplot2017.png')

x_positions = [1, 2, 3, 4]
chart_labels = ["1Q2017","2Q2017","3Q2017","4Q2017"]
earnings_actual =[.4, .15,.29,.41]
earnings_estimate = [.37,.15,.32,.41 ]
plt.scatter(x_positions, earnings_actual, color='red', alpha=0.5)
plt.scatter(x_positions, earnings_estimate, color='blue', alpha=0.5)
plt.legend(['Actual', 'Estimate'])
plt.xticks(x_positions, chart_labels)
plt.title("Earnings Per Share in Cents")

plt.savefig('actualvsestimate2017.png')

# The metrics below are in billions of dollars
revenue_by_quarter = [2.79, 2.98,3.29,3.7]
earnings_by_quarter = [.0656,.12959,.18552,.29012]
quarter_labels = ["2Q2017","3Q2017","4Q2017", "1Q2018"]

# Revenue
n = 1  # This is our first dataset (out of 2)
t = 2 # Number of dataset
d = 4 # Number of sets of bars
w = 0.8 # Width of each bar
bars1_x = [t*element + w*n for element
             in range(d)]

plt.bar(bars1_x, revenue_by_quarter)

# Earnings
n = 2  # This is our second dataset (out of 2)
t = 2 # Number of dataset
d = 4 # Number of sets of bars
w = 0.8 # Width of each bar
bars2_x = [t*element + w*n for element
             in range(d)]

plt.bar(bars2_x, earnings_by_quarter)
plt.legend(labels)
plt.title('Quarterly Revenue VS Quarterly Earnings')
ax28 = plt.subplot(1, 1, 1)
ax28.set_xlabel('Quarter')
ax28.set_ylabel('Amount of Money (1 tick = 1M USD)')
ax28.set_xticks([1, 2, 3, 4])
ax28.set_xticklabels(["2Q2017","3Q2017","4Q2017", "1Q2018"])







middle_x = [ (a + b) / 2.0 for a, b in zip(bars1_x, bars2_x)]
labels = ["Revenue", "Earnings"]

plt.savefig('qrevvsqearn.png')

months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Nov', 'Dec']
monthnumbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]



ax11 = plt.subplot(1, 2, 1)
plt.plot(netflix_stocks['Date'], netflix_stocks['Price'], color='red')
ax11.set_title('Netflix')
ax11.set_xlabel('Date')
ax11.set_ylabel('Price')
ax11.set_xticks(monthnumbers)
ax11.set_xticklabels(months)
plt.xticks(fontsize=6)





xa12 = plt.subplot(1, 2, 2)
plt.plot(dowjones_stocks['Date'], dowjones_stocks['Price'], color='green')
xa12.set_title('Dow Jones')
xa12.set_xlabel('Date')
xa12.set_ylabel('Stock Price')
plt.subplots_adjust(wspace=.5)
xa12.set_xticks(monthnumbers)
xa12.set_xticklabels(months)
plt.xticks(fontsize=6)


plt.show()


plt.savefig("netflixvsdowjones.png")

I thought your presentation was clear and concise. The additional data points you added into the slides are helpful. It can get too cluttered with data points within the visualizations and sometimes you don’t need to show the user all the data points…just the important ones. I will be using this tactic next time I put together a presentation.