Posts

Showing posts from February, 2021

Explanatory Data Analysis: Histogram, Kernel Density Distribution, and Cumulative Distribution Function (CDF) using ggplot2, tidyverse, and cowplot

Image
  set the library with the packages we use library (ggplot2) library (tidyverse) require (cowplot) #makes the grids Setting the Correct Directory setwd( "C:/Users/nirma/Documents/EDX courses/MicroMaster MIT/14.310x-Data Analysis for Social Scientists/Programs/" ) Loading Required Data bihar_data <- read_csv( "Bihar_sample_data.csv" ) Checkin the Data print(bihar_data) # A tibble: 39,553 x 6 personid female adult age height_cm weight_kg <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> 1 11010101 0 1 70 164. 48.9 2 11010102 0 1 32 157. 44 3 11010103 1 1 28 150. 37.7 4 11010104 0 0 12 146. 30.7 5 11010105 1 0 11 135. 30.2 6 11010201 0 1 38 174. 67.7 7 11010202 1 1 30 140. 57.3 8 11010203 0 0 15 163. 59.3 9 11010204 0 0 10 1