Publications by Name
Apply6DAT
Introduction Questions Variation ggplot(data = myData) + geom_bar(mapping = aes(x = team)) + theme(axis.text.x = element_text(angle = 90)) Visualizing distributions ggplot(data = myData) + geom_histogram(mapping = aes(x = total)) ## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`. ggplot(data = myData, mapping = aes...
398 sym R (1564 sym/15 pcs) 10 img
CodeAlong5
# Load packages # Core library(tidyverse) library(tidyquant) Goal Collect individual returns into a portfolio by assigning a weight to each stock five stocks: “SPY”, “EFA”, “IJS”, “EEM”, “AGG” from 2012-12-31 to 2017-12-31 1 Import stock prices symbols <- c("SPY", "EFA", "IJS", "EEM", "AGG") prices <- tq_get(x = symbo...
358 sym R (2979 sym/14 pcs) 3 img
Apply5Portfolio
# Load packages # Core library(tidyverse) library(tidyquant) Goal Collect individual returns into a portfolio by assigning a weight to each stock Choose your stocks. from 2012-12-31 to 2017-12-31 1 Import stock prices symbols <- c("TSLA", "AMZN", "GOOG", "JNJ", "MSFT", "AAPL") prices <- tq_get(x = symbols, from = "2012-...
515 sym R (2732 sym/12 pcs) 1 img
Apply5
Import data # excel file data <- read_excel("../00_data/myData_charts.xlsx") data ## # A tibble: 10,879 × 8 ## team team_name year total home away week weekly_attendance ## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <chr> ## 1 San Francisco 49ers 2000 1057954 541964 515990 1 54626 ...
171 sym Python (7797 sym/18 pcs)
CodeAlong5Ch5
Import data flights ## # A tibble: 336,776 × 19 ## year month day dep_time sched_de…¹ dep_d…² arr_t…³ sched…⁴ arr_d…⁵ carrier ## <int> <int> <int> <int> <int> <dbl> <int> <int> <dbl> <chr> ## 1 2013 1 1 517 515 2 830 819 11 UA ## 2 2013 1 1 ...
525 sym Python (21270 sym/51 pcs) 1 img
CodeAlong5Ch4
Coding basics R as a calculator 1000 / 10 ## [1] 100 x <- 1000 / 10 # x assignment symbol What’s in a name? Calling functions Use of TAB seq(from = 1, to = 10, by = 1) ## [1] 1 2 3 4 5 6 7 8 9 10 continuation character, + seq(from = 1, to = 10) ## [1] 1 2 3 4 5 6 7 8 9 10 Printing to screen y <- seq(from = 1, to = 10) ...
171 sym Python (231 sym/9 pcs)
Code Along 4
Welcome Ch1 Introduction The data science project workflow Prerequisites R RStudio r packages Install the tidyverse package Running R code Getting help Google Stackoverflow Ch2 Introduction to Data Exploration Ch3 Data Visualization Set up library(tidyverse) data mpg ## # A tibble: 234 × 11 ## manufacturer model displ year ...
1378 sym R (1799 sym/10 pcs) 7 img
Intro to data analytics apply 4
Import data # excel file data <- read_excel("../00_data/myData1.xlsx") data ## # A tibble: 10,878 × 2 ## team_name home ## <chr> <dbl> ## 1 49ers 550459 ## 2 Bears 497954 ## 3 Benglas 476364 ## 4 Bills 539234 ## 5 Broncos 607991 ## 6 Browns 555725 ## 7 Buccaneers 489756 ## 8 Cardinals 45...
234 sym 1 img
Codealong4FinancialAnalytics
# Load packages # Core library(tidyverse) ## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ── ## ✔ ggplot2 3.4.0 ✔ purrr 1.0.1 ## ✔ tibble 3.1.8 ✔ dplyr 1.0.10 ## ✔ tidyr 1.3.0 ✔ stringr 1.5....
217 sym R (2861 sym/8 pcs) 1 img