Data visualization

Home work 2

Antanas Kaminskas

Questions

  1. Data types
  2. Statistcs (mean, min, max, etc. depending on the data types), use box plots and other similar plots to illustrate it
  3. Create basic visualizations of your data
  4. Check for periodicity in your data, show it (if there is no seasonality, show that there is no seasonality)

Data types

We can see that in data we two types of data which is:

  1. Nominal: X, Y attributes;
  2. Interval: temperature, day, month attributes;
  3. Ratio: FFMC, DMC, DC, ISI, RH, wind, rain, area attributes;
duom <- read.csv2("C:/Users/antanas.kaminskas/Desktop/forestfires.csv",
                  header = TRUE,
                  sep = ";", dec = ".")

summary(duom)
##        X               Y          month               day           
##  Min.   :1.000   Min.   :2.0   Length:517         Length:517        
##  1st Qu.:3.000   1st Qu.:4.0   Class :character   Class :character  
##  Median :4.000   Median :4.0   Mode  :character   Mode  :character  
##  Mean   :4.669   Mean   :4.3                                        
##  3rd Qu.:7.000   3rd Qu.:5.0                                        
##  Max.   :9.000   Max.   :9.0                                        
##       FFMC            DMC              DC             ISI        
##  Min.   :18.70   Min.   :  1.1   Min.   :  7.9   Min.   : 0.000  
##  1st Qu.:90.20   1st Qu.: 68.6   1st Qu.:437.7   1st Qu.: 6.500  
##  Median :91.60   Median :108.3   Median :664.2   Median : 8.400  
##  Mean   :90.64   Mean   :110.9   Mean   :547.9   Mean   : 9.022  
##  3rd Qu.:92.90   3rd Qu.:142.4   3rd Qu.:713.9   3rd Qu.:10.800  
##  Max.   :96.20   Max.   :291.3   Max.   :860.6   Max.   :56.100  
##       temp             RH              wind            rain        
##  Min.   : 2.20   Min.   : 15.00   Min.   :0.400   Min.   :0.00000  
##  1st Qu.:15.50   1st Qu.: 33.00   1st Qu.:2.700   1st Qu.:0.00000  
##  Median :19.30   Median : 42.00   Median :4.000   Median :0.00000  
##  Mean   :18.89   Mean   : 44.29   Mean   :4.018   Mean   :0.02166  
##  3rd Qu.:22.80   3rd Qu.: 53.00   3rd Qu.:4.900   3rd Qu.:0.00000  
##  Max.   :33.30   Max.   :100.00   Max.   :9.400   Max.   :6.40000  
##       area        
##  Min.   :   0.00  
##  1st Qu.:   0.00  
##  Median :   0.52  
##  Mean   :  12.85  
##  3rd Qu.:   6.57  
##  Max.   :1090.84
par(mfrow = c(1,3))

boxplot(duom$FFMC, main = "FFMC boxplot")
boxplot(duom$DMC, main = "DMC boxplot")
boxplot(duom$DC, main = "DC boxplot")

par(mfrow = c(1,3))

boxplot(duom$ISI, main = "ISI boxplot")
boxplot(duom$temp, main = "temp boxplot")
boxplot(duom$RH, main = "RH boxplot")

par(mfrow = c(1,3))

boxplot(duom$wind, main = "wind boxplot")
boxplot(duom$rain, main = "rain boxplot")
boxplot(duom$area, main = "area boxplot")

par(mfrow = c(1,3))

plot(duom$FFMC, main = "FFMC Scaterplot")
plot(duom$DMC, main = "DMC Scaterplot")
plot(duom$DC, main = "DC Scaterplot")

par(mfrow = c(1,3))

plot(duom$ISI, main = "ISI Scaterplot")
plot(duom$temp, main = "temp Scaterplot")
plot(duom$RH, main = "RH Scaterplot")

par(mfrow = c(1,3))

plot(duom$wind, main = "wind Scaterplot")
plot(duom$rain, main = "rain Scaterplot")
plot(duom$area, main = "area Scaterplot")

par(mfrow = c(3,1))

plot.ts(duom$FFMC, col = "black",main = "Time series ")
plot.ts(duom$DMC, col = "red")
plot.ts(duom$DC, col = "blue")

par(mfrow = c(3,1))

plot.ts(duom$ISI, col = "green")
plot.ts(duom$temp, col = "yellow")
plot.ts(duom$RH, col = "blue3")

par(mfrow = c(3,1))

plot.ts(duom$wind, col = "magenta")
plot.ts(duom$rain, col = "brown")
plot.ts(duom$area, col = "burlywood")

par(mfrow = c(1, 3))

hist(duom$FFMC, main = "FFMC Scaterplot")
hist(duom$DMC, main = "DMC Scaterplot")
hist(duom$DC, main = "DC Scaterplot")

par(mfrow = c(1,3))

hist(duom$ISI, main = "ISI Scaterplot")
hist(duom$temp, main = "temp Scaterplot")
hist(duom$RH, main = "RH Scaterplot")

par(mfrow = c(1,3))

hist(duom$wind, main = "wind Scaterplot")
hist(duom$rain, main = "rain Scaterplot")
hist(duom$area, main = "area Scaterplot")