Correlation between Indian and US Stock Markets

I invest (modestly) in both US and Indian stock markets. For the last few days I observed that on the days when US market was down, the Indian market was not necessarily down. This is somewhat unexpected given my past experience (I used to work in the financial sector back in India). When I posted my observation on Facebook, people asked me for more concrete evidence for a lack of this correlation.

Color Palettes

The colors are from WSJ article I will use the colors extracted from the solid bar at the bottom of the image. How did I do that? I used ColorZilla addon for Firefox: Here are the hex codes for 7 colors I extracted:

Create a color palette from WSJ article wsjPal <- c('#65C1E8', '#D85B63', '#D680AD', '#5C5C5C', '#C0BA80', '#FDC47D', '#EA3B46') Try out a graph using the new color palette

Some ggplot2 Features

In this post, I am covering a few things that I didn’t touch upon in the class previously. For this we will use mpg data from ggplot2 package. If you want to know more about the data and the variables, run the following command in your R console: ?ggplot2::mpg Get structure of the mpg data head(mpg) ## # A tibble: 6 x 11 ## manufacturer model displ year cyl trans drv cty hwy fl class ## <chr> <chr> <dbl> <int> <int> <chr> <chr> <int> <int> <chr> <chr> ## 1 audi a4 1.

Extending ggplot2

There are numerous ways in which you can extend ggplot2 package. In this post, I am going to talk about 3 packages that are relevant to us immediately. Extrafont The first package is extrafont, which enables importing font files from your computer to R. You will have to do this only once after you install the package and then in future whenever you want to use different fonts, you can simply call them by name in ggplot2.

Celebrating India's Decriminalization of Homosexuality

I woke up to great news today! Five judges of the Supreme Court of India have unanimously decrimialized homosexuality. A few months back, I made a simple t-shirt design using R. That time, it was an R exercise for me and I didn’t share it with many people. This is my small gift to LGBTQ Indians. Although I have made this using “Om”, many religious symbol are possible if you know the correct character in Wingdings font.