Intro

Column

###OVERVIEW

Due to the inherent growth in the electronic production and storage of information, there is often a feeling of “information overload” or inundation when facing the process of quantitative decision making. As an analyst your job will often be to conduct analyses or create tools to support quantitative decision making.

A principle tool used in industry, goverment, non-profits, and academic fields to compensate for the information overload is the information dashboard. Functionally, a dashboard is meant to provide a user with a central resource to present in a clear and concise manner all the information neccessary to support day-to-day decision making and support operations.

###OBJECTIVE

The objective of this laboratory is to plan, design, and create an information dashboard to support quantitative decision making. To accomplish this task you will have to complete a number of steps:

Delineate the necessary decision (I will do that below). Identify what information will be relevant to decision making. Find and collect the data necessary to create your visualization plan. Organize and summarize the collected data. Design and create the best visualizations to present that information. Finally organize the layout of those visualizations in a way that conforms to the theory of dashboarding. Write a summary about what decisions you made based on the visualizations that you developed.

###DECISION & RULES

You make investments for an organization, your objective is to purchase securities/commodities for the key objective of maximizing profits. You want to make an investment in securities/commodities to make some short term gains. You are considering investing in one of any four companies, for example: Twitter (TWTR), Microsoft (MSFT), or Apple (AAPL) (don’t use these). Choose 4 companies or commodities and determine which one of the four will produce the most short term gains. Use your imagination.

Key Financial Indicators

Column

Metrics

Closing Prices

Market Capitalization

P-E Ratio

Summary

Column

###Conclusion

After reviewing these graphs, I believe that Amazon shares the best P-E ratio and earnings per share. Out of the 4 stock available, they have the most expensive stock price but they have the best returns. Over the last year, their stock price has been increasing steadly. They have an upward trend.

---
title: "Lab 1 - Dashboarding"
author: "Flor Guillen"
date: "`r Sys.Date()`"
output: 
  flexdashboard::flex_dashboard:
    orientation: columns
    vertical_layout: fill
    social: scroll
    source_code: embed
---

```{r setup, include=FALSE, message=FALSE}
library(flexdashboard)
library(dygraphs)
library(lubridate)
library(quantmod)
library(plyr)
library(ggplot2)


```


# Intro

Column 
-----------------------------------------------------------------------
###OVERVIEW

Due to the inherent growth in the electronic production and storage of information, there is often a feeling of “information overload” or inundation when facing the process of quantitative decision making. As an analyst your job will often be to conduct analyses or create tools to support quantitative decision making.

A principle tool used in industry, goverment, non-profits, and academic fields to compensate for the information overload is the information dashboard. Functionally, a dashboard is meant to provide a user with a central resource to present in a clear and concise manner all the information neccessary to support day-to-day decision making and support operations.

###OBJECTIVE

The objective of this laboratory is to plan, design, and create an information dashboard to support quantitative decision making. To accomplish this task you will have to complete a number of steps:

Delineate the necessary decision (I will do that below).
Identify what information will be relevant to decision making.
Find and collect the data necessary to create your visualization plan.
Organize and summarize the collected data.
Design and create the best visualizations to present that information.
Finally organize the layout of those visualizations in a way that conforms to the theory of dashboarding.
Write a summary about what decisions you made based on the visualizations that you developed.


###DECISION & RULES

You make investments for an organization, your objective is to purchase securities/commodities for the key objective of maximizing profits. You want to make an investment in securities/commodities to make some short term gains. You are considering investing in one of any four companies, for example: Twitter (TWTR), Microsoft (MSFT), or Apple (AAPL) (don’t use these). Choose 4 companies or commodities and determine which one of the four will produce the most short term gains. Use your imagination.


# Key Financial Indicators

Column {.tabset data-width=500}
-----------------------------------------------------------


### Metrics 
```{r}
what_metrics<-yahooQF(c("Price/Sales", 
                          "P/E Ratio",
                          "Price/EPS Estimate Next Year",
                          "PEG Ratio",
                          "Dividend Yield", 
                          "Market Capitalization"))

tickers<-c("PYPL","DIS","AMZN","NFLX")

metrics<-getQuote(paste(tickers, sep="", collapse=";"), what=what_metrics)


metrics<-data.frame(Symbol=tickers, metrics[,2:length(metrics)]) 


colnames(metrics)<-c("Symbol", "P-E Ratio", "Price EPS Estimate Next Year", "Div Yield", "Market Cap")

DT::datatable(metrics)

```


### Closing Prices
```{r}
ticker1<-c("PYPL","DIS","AMZN","NFLX")
invisible(getSymbols(ticker1,from="2019-07-01"))
ClosingPrices<-do.call(merge,lapply(ticker1,function(x)Cl(get(x))))


dygraph(ClosingPrices,main="Closing Price (USD)",group="Stock") %>%
  dyAxis("y", label="Closing Price (USD)") %>%
  dyOptions(axisLineWidth = 2.0,  colors = RColorBrewer::brewer.pal(5, "Set1")) %>%
  dyHighlight(highlightSeriesBackgroundAlpha = 1.0,
              highlightSeriesOpts=list(strokeWidth = 4)) %>%
  dyRangeSelector(height = 60)

```


### Market Capitalization
```{r}
metrics<-data.frame(na.fill(metrics,0))
metrics$Market.Cap<-as.numeric(metrics$Market.Cap)
ggplot(metrics,aes(x=Symbol,y=Market.Cap,fill=Symbol))+
  geom_bar(stat="identity")+
  labs(x="Companies",y="Market Capitalization")+
  scale_fill_manual(name = "Companies", 
                    labels = c("AMZN","DIS","NFLX","PYPL"),
                    values = c("#009E73","#CC79A7","#E69F00","#56B4E9"))  
```


### P-E Ratio
```{r}
ggplot(metrics,aes(x=Symbol,y=P.E.Ratio,fill=Symbol))+
  geom_bar(stat="identity")+
  labs(x="Companies",y="P/E Ratio")+
  scale_fill_manual(name="Company", 
                    labels=c("AMZN","DIS","NFLX","PYPL"),
                    values=c("#009E73","#CC79A7","#E69F00","#56B4E9")) 

```


# Stock Price Trends

Column {.tabset data-width=500}
-----------------------------------------------------------


### Amazon

```{r}
AMZN%>%Ad()%>%chartSeries(theme=chartTheme("white"),color.vol=TRUE, multi.col=FALSE) 
```


### Disney

```{r}
DIS%>%Ad()%>%chartSeries(theme=chartTheme("white"),color.vol=TRUE, multi.col=FALSE) 
```


### Netflix

```{r}
NFLX%>%Ad()%>%chartSeries(theme=chartTheme("white"),color.vol=TRUE, multi.col=FALSE) 
```


### Paypal

```{r}
PYPL%>%Ad()%>%chartSeries(theme=chartTheme("white"),color.vol=TRUE, multi.col=FALSE)
```


# Summary

Column 
-----------------------------------------------------------------------
###Conclusion

After reviewing these graphs, I believe that Amazon shares the best P-E ratio and earnings per share. Out of the 4 stock available, they have the most expensive stock price but they have the best returns. 
Over the last year, their stock price has been increasing steadly. They have an upward trend.