Dataset Description {.tabset .active}

View of dataset

About the Dataset

'data.frame':   188 obs. of  13 variables:
 $ Sl..No.                : chr  "1" "2" "3" "4" ...
 $ Region                 : chr  "Northern" "Northern" "Northern" "Northern" ...
 $ Name.of.TPS            : chr  "ADANI POWER LIMITED KAWAI TPP" "ANPARA C TPS" "ANPARA TPS" "BARKHERA TPS" ...
 $ Installed.Capacity..MW.: num  1320 1200 2630 90 1320 500 500 1820 920 540 ...
 $ Receipt...CIL          : num  329.6 324.7 1041.2 38.6 232.5 ...
 $ Receipt...SCCL         : num  0 0 0 0 148 ...
 $ Receipt...Captive      : num  0 0 0 0 0 ...
 $ Receipt...E.Auction    : num  0 0 0 0 0 0 0 0 0 0 ...
 $ Receipt...Import       : num  106 0 0 0 0 ...
 $ Receipt...Others       : num  0 0 0 0 0 0 0 0 0 0 ...
 $ Receipt...Total        : num  435.8 324.7 1041.2 38.6 380.9 ...
 $ Total.Consumption      : num  506.2 348.8 908.5 30.9 387.1 ...
 $ Closing.Stocks         : num  89.1 362.6 875.8 31.3 79.1 ...

Summary of the Dataset

   Sl..No.             Region          Name.of.TPS       
 Length:188         Length:188         Length:188        
 Class :character   Class :character   Class :character  
 Mode  :character   Mode  :character   Mode  :character  
                                                         
                                                         
                                                         
 Installed.Capacity..MW. Receipt...CIL      Receipt...SCCL   Receipt...Captive
 Min.   :    12.0        Min.   :    0.00   Min.   :   0.0   Min.   :   0.0   
 1st Qu.:   536.2        1st Qu.:   10.52   1st Qu.:   0.0   1st Qu.:   0.0   
 Median :  1050.0        Median :  200.16   Median :   0.0   Median :   0.0   
 Mean   :  3315.6        Mean   :  824.07   Mean   :  96.1   Mean   : 148.4   
 3rd Qu.:  1600.0        3rd Qu.:  434.14   3rd Qu.:   0.0   3rd Qu.:   0.0   
 Max.   :207775.5        Max.   :51641.95   Max.   :6022.2   Max.   :9300.6   
 Receipt...E.Auction Receipt...Import  Receipt...Others  Receipt...Total  
 Min.   :   0.00     Min.   :   0.00   Min.   :   0.00   Min.   :    0.0  
 1st Qu.:   0.00     1st Qu.:   0.00   1st Qu.:   0.00   1st Qu.:  193.1  
 Median :   0.00     Median :   0.00   Median :   0.00   Median :  349.4  
 Mean   :  52.23     Mean   :  97.82   Mean   :  17.02   Mean   : 1235.7  
 3rd Qu.:   0.00     3rd Qu.:  16.45   3rd Qu.:   0.00   3rd Qu.:  594.5  
 Max.   :3273.21     Max.   :6130.04   Max.   :1066.33   Max.   :77434.4  
 Total.Consumption Closing.Stocks    
 Min.   :    0.0   Min.   :    0.00  
 1st Qu.:  186.6   1st Qu.:   68.78  
 Median :  343.1   Median :  174.94  
 Mean   : 1172.5   Mean   :  629.37  
 3rd Qu.:  563.0   3rd Qu.:  333.52  
 Max.   :73474.4   Max.   :39440.35  

Head of the Dataset

  Sl..No.   Region                   Name.of.TPS Installed.Capacity..MW.
1       1 Northern ADANI POWER LIMITED KAWAI TPP                    1320
2       2 Northern                  ANPARA C TPS                    1200
3       3 Northern                    ANPARA TPS                    2630
4       4 Northern                  BARKHERA TPS                      90
5       5 Northern                CHHABRA-II TPP                    1320
6       6 Northern            CHHABRA-I PH-1 TPP                     500
  Receipt...CIL Receipt...SCCL Receipt...Captive Receipt...E.Auction
1        329.55           0.00                 0                   0
2        324.70           0.00                 0                   0
3       1041.23           0.00                 0                   0
4         38.64           0.00                 0                   0
5        232.50         148.37                 0                   0
6        346.13           0.00                 0                   0
  Receipt...Import Receipt...Others Receipt...Total Total.Consumption
1           106.21                0          435.77            506.23
2             0.00                0          324.70            348.84
3             0.00                0         1041.23            908.53
4             0.00                0           38.64             30.93
5             0.00                0          380.87            387.09
6             0.00                0          346.13            221.91
  Closing.Stocks
1          89.13
2         362.62
3         875.82
4          31.26
5          79.13
6         560.23

Univariate Analysis {.tabset}

Histogram for Installed Capacity

Histogram of Total Coal Receipt

Bivariate Analysis {.tabset}

Box Plot for Total Consumption by Region

Multivariate Analysis {.tabset}

Scatter Plot for Installed Capacity vs Total Consumption

### Scatter plot of Total Receipt vs Total Consumption

Scatter plot of Total Receipt vs Closing Stocks

---
title: "EDA for Coal Dataset"
output: 
  flexdashboard::flex_dashboard:
    orientation: columns
    vertical_layout: fill
    theme: flatly
    social: menu
    source_code: embed
    navbar:
      - { title: "Dataset Description", href: "#dataset-description" }
      - { title: "Univariate Analysis", href: "#univariate-analysis" }
      - { title: "Bivariate Analysis", href: "#bivariate-analysis" }
      - { title: "Multivariate Analysis", href: "#multivariate-analysis" }

---
```{r setup, include=FALSE}
# Load necessary libraries
library(flexdashboard)
library(rmarkdown)
library(ggplot2)
library(dplyr)
library(DT)
coal <- read.csv("Coal_Table_1.csv")
```

## Dataset Description {.tabset .active} {#dataset-description}

### View of dataset

```{r}
datatable(coal, extensions = 'Buttons', options = list(dom='Bfrtip', buttons=c('copy','csv','print','pdf')))
```

### About the Dataset

```{r}
str(coal)
```

### Summary of the Dataset

```{r}
summary(coal)
```

### Head of the Dataset

```{r}
head(coal)
```

## Univariate Analysis {.tabset} {#univariate-analysis}

### Histogram for Installed Capacity

```{r}
ggplot(coal, aes(x = `Installed.Capacity..MW.`)) +
  geom_histogram(fill = "lightblue", color = "black", bins = 30) +
  geom_vline(aes(xintercept = mean(`Installed.Capacity..MW.`, na.rm = TRUE)), color = "red", lwd = 1) +
  labs(title = "Histogram of Installed Capacity (MW)", x = "Installed Capacity (MW)")
```

### Histogram of Total Coal Receipt

```{r}
ggplot(coal, aes(x = `Receipt...Total`)) + # Replace with the actual column name
  geom_histogram(fill = "lightgreen", color = "black", bins = 30) +
  geom_vline(aes(xintercept = mean(`Receipt...Total`, na.rm = TRUE)), color = "red", lwd = 1) +
  labs(title = "Histogram of Total Coal Receipt", x = "Total Receipt (tons)")
```

## Bivariate Analysis {.tabset} {#bivariate-analysis}

### Box Plot for Total Consumption by Region

```{r}
ggplot(coal, aes(x = Region, y = `Total.Consumption`)) +
  geom_boxplot(fill = 'lightblue', color = 'black') +
  labs(title = "Box Plot of Total Consumption by Region", x = "Region", y = "Total Consumption (Tons)") +
  theme(axis.text.x = element_text(angle = 90, hjust = 1))
```

## Multivariate Analysis {.tabset} {#multivariate-analysis}

### Scatter Plot for Installed Capacity vs Total Consumption

```{r}
ggplot(coal, aes(x = `Installed.Capacity..MW.`, y = `Total.Consumption`)) +
  geom_point(color = "orange") +
  labs(title = "Scatter Plot of Installed Capacity vs Total Consumption", x = "Installed Capacity (MW)", y = "Total Consumption (Tons)")
```
### Scatter plot of Total Receipt vs Total Consumption

```{r}
# Scatter plot of Total Receipt vs Total Consumption
ggplot(coal, aes(x = `Receipt...Total`, y = `Total.Consumption`)) +
  geom_point(color = "blue") +
  labs(title = "Scatter Plot of Total Receipt vs Total Consumption", x = "Total Receipt (tons)", y = "Total Consumption")
```

### Scatter plot of Total Receipt vs Closing Stocks

```{r}
ggplot(coal, aes(x = `Receipt...Total`, y = `Closing.Stocks`)) +
  geom_point(color = "purple") +
  labs(title = "Scatter Plot of Total Receipt vs Closing Stocks", x = "Total Receipt (tons)", y = "Closing Stocks")
```