August 2020

Effect of COVID-19 on Our Mobility

August 2, 2020 | Ibrahim Awad

I just moved to NYC in January 2020. My reason for moving was to enjoy the socially rich community and the plethora of activities that I could explore, such as museums, cute little theaters, Broadway shows, fancy stores, riding the subway and watching people, restaurants and the fun nightlife. And I ...
[Read more...]

Weathering the Storm

August 1, 2020 | R | Quantum Jitter

Covid-19 began battering the financial markets in February. Which sectors are faring best? I’ll compare each sector in the S&P 500 with the overall market. And I’ll baseline each at 100% as of February 19th, 2020 so we can see which have recovered lost ground.
symbols <-
  c(
    "EOD/SPY",
    "EOD/XLV",
    "EOD/XLK",
    "EOD/XLE",
    "EOD/XLF",
    "EOD/XLC",
    "EOD/XLI",
    "EOD/XLY",
    "EOD/XLP",
    "EOD/XLRE",
    "EOD/XLU",
    "EOD/XLB"
  )

from <- "2020-02-19"
eod_sectors <-
  tq_get(symbols, get = "quandl", from = from) %>%
  group_by(symbol) %>%
  mutate(
    norm_close = adj_close / first(adj_close),
    type = if_else(symbol == "EOD/SPY", "Market", "Sector"),
    sector = case_when(
      symbol == "EOD/SPY"  ~ "S&P 500",
      symbol == "EOD/XLB"  ~ "Materials",
      symbol == "EOD/XLE"  ~ "Energy",
      symbol == "EOD/XLU"  ~ "Utilities",
      symbol == "EOD/XLI"  ~ "Industrical",
      symbol == "EOD/XLRE" ~ "Real Estate",
      symbol == "EOD/XLV"  ~ "Health",
      symbol == "EOD/XLK"  ~ "Technology",
      symbol == "EOD/XLF"  ~ "Financial",
      symbol == "EOD/XLC"  ~ "Communication",
      symbol == "EOD/XLY"  ~ "Consumer Discretionary",
      symbol == "EOD/XLP"  ~ "Consumer Staples",
      TRUE                 ~ "Other"
    )
  ) %>%
  ungroup()
With all that ...
[Read more...]

How to manage credentials and secrets safely in R

August 1, 2020 | Bernardo Lares

Are you interested in guest posting? Publish at DataScience+ via your RStudio editor. Category Programming Tags credentials lares R Programming yaml yml If you have ever received an embarrassing message with a warning saying that you may have published your credentials or secrets when publishing your code, you know what ... [Read more...]
1 10 11 12

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)