JSM is Largest statistical event. This report is for Data Expo 2018. There are 3 data files, locations.csv, forecast.dat, and histWeather.csv. 1- The locations.csv file is a comma separated value file that contains information on the cities for which the forecasts was made 2- The forecast.dat file is a white space separated file with about 3 years worth of forecasts. This file does not have a header row. The first column is the city number corresponding to the row in the locations.csv file, so 1 means Eastport, Maine and 113 means Honolulu, Hawaii.
3- The histWeather.csv file is a comma separated file with the historic measures of weather from the airports.
{r} [linked phrase] (http://community.amstat.org/stat-computing/data-expo/data-expo-2018)
#Imporing Forecast datafile
library(readr)
data1 <- read_csv("C:/Users/chink/Google Drive/Computational Statistics/5th Quater/Special Topics/JSM/forecast.dat", col_names = FALSE)
Parsed with column specification:
cols(
X1 = col_character()
)
| | 0%
| | 0% 1 MB
| | 1% 1 MB
|= | 1% 1 MB
|= | 1% 2 MB
|= | 2% 2 MB
|= | 2% 2 MB
|== | 2% 3 MB
|== | 3% 3 MB
|== | 3% 3 MB
|== | 3% 4 MB
|=== | 4% 4 MB
|=== | 4% 4 MB
|=== | 4% 5 MB
|=== | 5% 5 MB
|==== | 5% 6 MB
|==== | 5% 6 MB
|==== | 5% 6 MB
|==== | 6% 7 MB
|===== | 6% 7 MB
|===== | 6% 7 MB
|===== | 7% 8 MB
|===== | 7% 8 MB
|====== | 7% 8 MB
|====== | 8% 9 MB
|====== | 8% 9 MB
|====== | 8% 9 MB
|======= | 9% 10 MB
|======= | 9% 10 MB
|======= | 9% 11 MB
|======= | 10% 11 MB
|======== | 10% 11 MB
|======== | 10% 12 MB
|======== | 10% 12 MB
|======== | 11% 12 MB
|========= | 11% 13 MB
|========= | 11% 13 MB
|========= | 12% 13 MB
|========= | 12% 14 MB
|========== | 12% 14 MB
|========== | 13% 14 MB
|========== | 13% 15 MB
|========== | 13% 15 MB
|========== | 14% 15 MB
|=========== | 14% 16 MB
|=========== | 14% 16 MB
|=========== | 15% 17 MB
|=========== | 15% 17 MB
|============ | 15% 17 MB
|============ | 15% 18 MB
|============ | 16% 18 MB
|============ | 16% 18 MB
|============= | 16% 19 MB
|============= | 17% 19 MB
|============= | 17% 19 MB
|============= | 17% 20 MB
|============== | 18% 20 MB
|============== | 18% 20 MB
|============== | 18% 21 MB
|============== | 19% 21 MB
|=============== | 19% 22 MB
|=============== | 19% 22 MB
|=============== | 20% 22 MB
|=============== | 20% 23 MB
|================ | 20% 23 MB
|================ | 20% 23 MB
|================ | 21% 24 MB
|================ | 21% 24 MB
|================= | 21% 24 MB
|================= | 22% 25 MB
|================= | 22% 25 MB
|================= | 22% 25 MB
|================== | 23% 26 MB
|================== | 23% 26 MB
|================== | 23% 26 MB
|================== | 24% 27 MB
|=================== | 24% 27 MB
|=================== | 24% 28 MB
|=================== | 25% 28 MB
|=================== | 25% 28 MB
|==================== | 25% 29 MB
|==================== | 25% 29 MB
|==================== | 26% 29 MB
|==================== | 26% 30 MB
|===================== | 26% 30 MB
|===================== | 27% 30 MB
|===================== | 27% 31 MB
|===================== | 27% 31 MB
|===================== | 28% 31 MB
|====================== | 28% 32 MB
|====================== | 28% 32 MB
|====================== | 29% 33 MB
|====================== | 29% 33 MB
|======================= | 29% 33 MB
|======================= | 30% 34 MB
|======================= | 30% 34 MB
|======================= | 30% 34 MB
|======================== | 31% 35 MB
|======================== | 31% 35 MB
|======================== | 31% 35 MB
|======================== | 31% 36 MB
|========================= | 32% 36 MB
|========================= | 32% 36 MB
|========================= | 32% 37 MB
|========================= | 33% 37 MB
|========================== | 33% 37 MB
|========================== | 33% 38 MB
|========================== | 34% 38 MB
|========================== | 34% 39 MB
|=========================== | 34% 39 MB
|=========================== | 35% 39 MB
|=========================== | 35% 40 MB
|=========================== | 35% 40 MB
|============================ | 36% 40 MB
|============================ | 36% 41 MB
|============================ | 36% 41 MB
|============================ | 36% 41 MB
|============================= | 37% 42 MB
|============================= | 37% 42 MB
|============================= | 37% 42 MB
|============================= | 38% 43 MB
|============================== | 38% 43 MB
|============================== | 38% 44 MB
|============================== | 39% 44 MB
|============================== | 39% 44 MB
|=============================== | 39% 45 MB
|=============================== | 40% 45 MB
|=============================== | 40% 45 MB
|=============================== | 40% 46 MB
|================================ | 41% 46 MB
|================================ | 41% 46 MB
|================================ | 41% 47 MB
|================================ | 41% 47 MB
|================================ | 42% 47 MB
|================================= | 42% 48 MB
|================================= | 42% 48 MB
|================================= | 43% 48 MB
|================================= | 43% 49 MB
|================================== | 43% 49 MB
|================================== | 44% 50 MB
|================================== | 44% 50 MB
|================================== | 44% 50 MB
|=================================== | 45% 51 MB
|=================================== | 45% 51 MB
|=================================== | 45% 51 MB
|=================================== | 46% 52 MB
|==================================== | 46% 52 MB
|==================================== | 46% 52 MB
|==================================== | 46% 53 MB
|==================================== | 47% 53 MB
|===================================== | 47% 53 MB
|===================================== | 47% 54 MB
|===================================== | 48% 54 MB
|===================================== | 48% 55 MB
|====================================== | 48% 55 MB
|====================================== | 49% 55 MB
|====================================== | 49% 56 MB
|====================================== | 49% 56 MB
|======================================= | 50% 56 MB
|======================================= | 50% 57 MB
|======================================= | 50% 57 MB
|======================================= | 51% 57 MB
|======================================== | 51% 58 MB
|======================================== | 51% 58 MB
|======================================== | 51% 58 MB
|======================================== | 52% 59 MB
|========================================= | 52% 59 MB
|========================================= | 52% 59 MB
|========================================= | 53% 60 MB
|========================================= | 53% 60 MB
|========================================== | 53% 61 MB
|========================================== | 54% 61 MB
|========================================== | 54% 61 MB
|========================================== | 54% 62 MB
|=========================================== | 55% 62 MB
|=========================================== | 55% 62 MB
|=========================================== | 55% 63 MB
|=========================================== | 56% 63 MB
|=========================================== | 56% 63 MB
|============================================ | 56% 64 MB
|============================================ | 57% 64 MB
|============================================ | 57% 64 MB
|============================================ | 57% 65 MB
|============================================= | 57% 65 MB
|============================================= | 58% 66 MB
|============================================= | 58% 66 MB
|============================================= | 58% 66 MB
|============================================== | 59% 67 MB
|============================================== | 59% 67 MB
|============================================== | 59% 67 MB
|============================================== | 60% 68 MB
|=============================================== | 60% 68 MB
|=============================================== | 60% 68 MB
|=============================================== | 61% 69 MB
|=============================================== | 61% 69 MB
|================================================ | 61% 69 MB
|================================================ | 62% 70 MB
|================================================ | 62% 70 MB
|================================================ | 62% 70 MB
|================================================= | 62% 71 MB
|================================================= | 63% 71 MB
|================================================= | 63% 72 MB
|================================================= | 63% 72 MB
|================================================== | 64% 72 MB
|================================================== | 64% 73 MB
|================================================== | 64% 73 MB
|================================================== | 65% 73 MB
|=================================================== | 65% 74 MB
|=================================================== | 65% 74 MB
|=================================================== | 66% 74 MB
|=================================================== | 66% 75 MB
|==================================================== | 66% 75 MB
|==================================================== | 67% 75 MB
|==================================================== | 67% 76 MB
|==================================================== | 67% 76 MB
|===================================================== | 67% 77 MB
|===================================================== | 68% 77 MB
|===================================================== | 68% 77 MB
|===================================================== | 68% 78 MB
|====================================================== | 69% 78 MB
|====================================================== | 69% 78 MB
|====================================================== | 69% 79 MB
|====================================================== | 70% 79 MB
|====================================================== | 70% 79 MB
|======================================================= | 70% 80 MB
|======================================================= | 71% 80 MB
|======================================================= | 71% 80 MB
|======================================================= | 71% 81 MB
|======================================================== | 72% 81 MB
|======================================================== | 72% 82 MB
|======================================================== | 72% 82 MB
|======================================================== | 72% 82 MB
|========================================================= | 73% 83 MB
|========================================================= | 73% 83 MB
|========================================================= | 73% 83 MB
|========================================================= | 74% 84 MB
|========================================================== | 74% 84 MB
|========================================================== | 74% 84 MB
|========================================================== | 75% 85 MB
|========================================================== | 75% 85 MB
|=========================================================== | 75% 85 MB
|=========================================================== | 76% 86 MB
|=========================================================== | 76% 86 MB
|=========================================================== | 76% 86 MB
|============================================================ | 77% 87 MB
|============================================================ | 77% 87 MB
|============================================================ | 77% 88 MB
|============================================================ | 77% 88 MB
|============================================================= | 78% 88 MB
|============================================================= | 78% 89 MB
|============================================================= | 78% 89 MB
|============================================================= | 79% 89 MB
|============================================================== | 79% 90 MB
|============================================================== | 79% 90 MB
|============================================================== | 80% 90 MB
|============================================================== | 80% 91 MB
|=============================================================== | 80% 91 MB
|=============================================================== | 81% 91 MB
|=============================================================== | 81% 92 MB
|=============================================================== | 81% 92 MB
|================================================================ | 82% 92 MB
|================================================================ | 82% 93 MB
|================================================================ | 82% 93 MB
|================================================================ | 83% 94 MB
|================================================================ | 83% 94 MB
|================================================================= | 83% 94 MB
|================================================================= | 83% 95 MB
|================================================================= | 84% 95 MB
|================================================================= | 84% 95 MB
|================================================================== | 84% 96 MB
|================================================================== | 85% 96 MB
|================================================================== | 85% 96 MB
|================================================================== | 85% 97 MB
|=================================================================== | 86% 97 MB
|=================================================================== | 86% 97 MB
|=================================================================== | 86% 98 MB
|=================================================================== | 87% 98 MB
|==================================================================== | 87% 99 MB
|==================================================================== | 87% 99 MB
|==================================================================== | 88% 99 MB
|==================================================================== | 88% 100 MB
|===================================================================== | 88% 100 MB
|===================================================================== | 88% 100 MB
|===================================================================== | 89% 101 MB
|===================================================================== | 89% 101 MB
|====================================================================== | 89% 101 MB
|====================================================================== | 90% 102 MB
|====================================================================== | 90% 102 MB
|====================================================================== | 90% 102 MB
|======================================================================= | 91% 103 MB
|======================================================================= | 91% 103 MB
|======================================================================= | 91% 104 MB
|======================================================================= | 92% 104 MB
|======================================================================== | 92% 104 MB
|======================================================================== | 92% 105 MB
|======================================================================== | 93% 105 MB
|======================================================================== | 93% 105 MB
|========================================================================= | 93% 106 MB
|========================================================================= | 93% 106 MB
|========================================================================= | 94% 106 MB
|========================================================================= | 94% 107 MB
|========================================================================== | 94% 107 MB
|========================================================================== | 95% 107 MB
|========================================================================== | 95% 108 MB
|========================================================================== | 95% 108 MB
|=========================================================================== | 96% 108 MB
|=========================================================================== | 96% 109 MB
|=========================================================================== | 96% 109 MB
|=========================================================================== | 97% 110 MB
|=========================================================================== | 97% 110 MB
|============================================================================ | 97% 110 MB
|============================================================================ | 98% 111 MB
|============================================================================ | 98% 111 MB
|============================================================================ | 98% 111 MB
|=============================================================================| 98% 112 MB
|=============================================================================| 99% 112 MB
|=============================================================================| 99% 112 MB
|=============================================================================| 99% 113 MB
|==============================================================================| 100% 113 MB
#Converting datafiles into columns
data1$a <- sapply(strsplit(as.character(data1$X1), " "), "[", 1)
data1$b <- sapply(strsplit(as.character(data1$X1), " "), "[", 2)
data1$c<- sapply(strsplit(as.character(data1$X1), " "), "[", 3)
data1$d<- sapply(strsplit(as.character(data1$X1), " "), "[", 4)
data1$e<- sapply(strsplit(as.character(data1$X1), " "), "[", 5)
data1$c=as.numeric(data1$c)
NAs introduced by coercion
#Structure of dataframe
str(data1)
Classes ‘tbl_df’, ‘tbl’ and 'data.frame': 3191972 obs. of 6 variables:
$ X1: chr "1 2014-07-09 63 MinTemp 2014-07-09" "1 2014-07-10 55 MinTemp 2014-07-09" "1 2014-07-11 57 MinTemp 2014-07-09" "1 2014-07-12 56 MinTemp 2014-07-09" ...
$ a : chr "1" "1" "1" "1" ...
$ b : chr "2014-07-09" "2014-07-10" "2014-07-11" "2014-07-12" ...
$ c : num 63 55 57 56 55 76 69 77 71 0 ...
$ d : chr "MinTemp" "MinTemp" "MinTemp" "MinTemp" ...
$ e : chr "2014-07-09" "2014-07-09" "2014-07-09" "2014-07-09" ...
- attr(*, "spec")=List of 2
..$ cols :List of 1
.. ..$ X1: list()
.. .. ..- attr(*, "class")= chr "collector_character" "collector"
..$ default: list()
.. ..- attr(*, "class")= chr "collector_guess" "collector"
..- attr(*, "class")= chr "col_spec"
#Reading Histweather data
histWeather <- read_csv("C:/Users/chink/Google Drive/Computational Statistics/5th Quater/Special Topics/JSM/histWeather.csv")
Parsed with column specification:
cols(
.default = col_integer(),
Date = col_character(),
Max_Sea_Level_PressureIn = col_double(),
Mean_Sea_Level_PressureIn = col_double(),
Min_Sea_Level_PressureIn = col_double(),
PrecipitationIn = col_character(),
Events = col_character(),
AirPtCd = col_character(),
longitude = col_double(),
latitude = col_double()
)
See spec(...) for full column specifications.
| | 0%
| | 1%
|= | 1%
|= | 1%
|= | 1%
|= | 2%
|== | 2%
|== | 2%
|== | 3%
|== | 3%
|=== | 3%
|=== | 3%
|=== | 4%
|=== | 4%
|==== | 4%
|==== | 5%
|==== | 5%
|==== | 5%
|===== | 5%
|===== | 6%
|===== | 6%
|===== | 6%
|====== | 7%
|====== | 7%
|===== | 7% 1 MB
|====== | 7% 1 MB
|====== | 8% 1 MB
|====== | 8% 1 MB
|====== | 8% 1 MB
|======= | 9% 1 MB
|======= | 9% 1 MB
|======= | 9% 1 MB
|======= | 9% 1 MB
|======= | 10% 1 MB
|======== | 10% 1 MB
|======== | 10% 1 MB
|======== | 11% 1 MB
|======== | 11% 1 MB
|========= | 11% 1 MB
|========= | 11% 1 MB
|========= | 12% 1 MB
|========= | 12% 1 MB
|========= | 12% 1 MB
|========== | 13% 1 MB
|========== | 13% 1 MB
|========== | 13% 1 MB
|========== | 13% 1 MB
|=========== | 14% 1 MB
|=========== | 14% 1 MB
|=========== | 14% 1 MB
|=========== | 15% 2 MB
|=========== | 15% 2 MB
|============ | 15% 2 MB
|============ | 15% 2 MB
|============ | 16% 2 MB
|============ | 16% 2 MB
|============= | 16% 2 MB
|============= | 17% 2 MB
|============= | 17% 2 MB
|============= | 17% 2 MB
|============= | 17% 2 MB
|============== | 18% 2 MB
|============== | 18% 2 MB
|============== | 18% 2 MB
|============== | 18% 2 MB
|=============== | 19% 2 MB
|=============== | 19% 2 MB
|=============== | 19% 2 MB
|=============== | 20% 2 MB
|=============== | 20% 2 MB
|================ | 20% 2 MB
|================ | 20% 2 MB
|================ | 21% 2 MB
|================ | 21% 2 MB
|================= | 21% 2 MB
|================= | 22% 2 MB
|================= | 22% 3 MB
|================= | 22% 3 MB
|================= | 22% 3 MB
|================== | 23% 3 MB
|================== | 23% 3 MB
|================== | 23% 3 MB
|================== | 24% 3 MB
|=================== | 24% 3 MB
|=================== | 24% 3 MB
|=================== | 24% 3 MB
|=================== | 25% 3 MB
|=================== | 25% 3 MB
|==================== | 25% 3 MB
|==================== | 26% 3 MB
|==================== | 26% 3 MB
|==================== | 26% 3 MB
|==================== | 26% 3 MB
|===================== | 27% 3 MB
|===================== | 27% 3 MB
|===================== | 27% 3 MB
|===================== | 28% 3 MB
|====================== | 28% 3 MB
|====================== | 28% 3 MB
|====================== | 28% 3 MB
|====================== | 29% 3 MB
|====================== | 29% 3 MB
|======================= | 29% 4 MB
|======================= | 30% 4 MB
|======================= | 30% 4 MB
|======================= | 30% 4 MB
|======================== | 30% 4 MB
|======================== | 31% 4 MB
|======================== | 31% 4 MB
|======================== | 31% 4 MB
|======================== | 32% 4 MB
|========================= | 32% 4 MB
|========================= | 32% 4 MB
|========================= | 32% 4 MB
|========================= | 33% 4 MB
|========================== | 33% 4 MB
|========================== | 33% 4 MB
|========================== | 34% 4 MB
|========================== | 34% 4 MB
|========================== | 34% 4 MB
|=========================== | 34% 4 MB
|=========================== | 35% 4 MB
|=========================== | 35% 4 MB
|=========================== | 35% 4 MB
|============================ | 36% 4 MB
|============================ | 36% 4 MB
|============================ | 36% 4 MB
|============================ | 36% 4 MB
|============================= | 37% 5 MB
|============================= | 37% 5 MB
|============================= | 37% 5 MB
|============================= | 38% 5 MB
|============================= | 38% 5 MB
|============================== | 38% 5 MB
|============================== | 38% 5 MB
|============================== | 39% 5 MB
|============================== | 39% 5 MB
|=============================== | 39% 5 MB
|=============================== | 40% 5 MB
|=============================== | 40% 5 MB
|=============================== | 40% 5 MB
|=============================== | 40% 5 MB
|================================ | 41% 5 MB
|================================ | 41% 5 MB
|================================ | 41% 5 MB
|================================ | 42% 5 MB
|================================ | 42% 5 MB
|================================= | 42% 5 MB
|================================= | 42% 5 MB
|================================= | 43% 5 MB
|================================= | 43% 5 MB
|================================== | 43% 5 MB
|================================== | 43% 5 MB
|================================== | 44% 5 MB
|================================== | 44% 5 MB
|================================== | 44% 6 MB
|=================================== | 45% 6 MB
|=================================== | 45% 6 MB
|=================================== | 45% 6 MB
|=================================== | 45% 6 MB
|==================================== | 46% 6 MB
|==================================== | 46% 6 MB
|==================================== | 46% 6 MB
|==================================== | 47% 6 MB
|==================================== | 47% 6 MB
|===================================== | 47% 6 MB
|===================================== | 47% 6 MB
|===================================== | 48% 6 MB
|===================================== | 48% 6 MB
|====================================== | 48% 6 MB
|====================================== | 49% 6 MB
|====================================== | 49% 6 MB
|====================================== | 49% 6 MB
|====================================== | 49% 6 MB
|======================================= | 50% 6 MB
|======================================= | 50% 6 MB
|======================================= | 50% 6 MB
|======================================= | 50% 6 MB
|======================================== | 51% 6 MB
|======================================== | 51% 6 MB
|======================================== | 51% 6 MB
|======================================== | 52% 7 MB
|======================================== | 52% 7 MB
|========================================= | 52% 7 MB
|========================================= | 52% 7 MB
|========================================= | 53% 7 MB
|========================================= | 53% 7 MB
|========================================== | 53% 7 MB
|========================================== | 54% 7 MB
|========================================== | 54% 7 MB
|========================================== | 54% 7 MB
|========================================== | 54% 7 MB
|=========================================== | 55% 7 MB
|=========================================== | 55% 7 MB
|=========================================== | 55% 7 MB
|=========================================== | 56% 7 MB
|============================================ | 56% 7 MB
|============================================ | 56% 7 MB
|============================================ | 56% 7 MB
|============================================ | 57% 7 MB
|============================================ | 57% 7 MB
|============================================= | 57% 7 MB
|============================================= | 58% 7 MB
|============================================= | 58% 7 MB
|============================================= | 58% 7 MB
|============================================= | 58% 7 MB
|============================================== | 59% 7 MB
|============================================== | 59% 8 MB
|============================================== | 59% 8 MB
|============================================== | 60% 8 MB
|=============================================== | 60% 8 MB
|=============================================== | 60% 8 MB
|=============================================== | 60% 8 MB
|=============================================== | 61% 8 MB
|=============================================== | 61% 8 MB
|================================================ | 61% 8 MB
|================================================ | 62% 8 MB
|================================================ | 62% 8 MB
|================================================ | 62% 8 MB
|================================================= | 62% 8 MB
|================================================= | 63% 8 MB
|================================================= | 63% 8 MB
|================================================= | 63% 8 MB
|================================================= | 64% 8 MB
|================================================== | 64% 8 MB
|================================================== | 64% 8 MB
|================================================== | 64% 8 MB
|================================================== | 65% 8 MB
|=================================================== | 65% 8 MB
|=================================================== | 65% 8 MB
|=================================================== | 66% 8 MB
|=================================================== | 66% 8 MB
|==================================================== | 66% 8 MB
|==================================================== | 66% 9 MB
|==================================================== | 67% 9 MB
|==================================================== | 67% 9 MB
|==================================================== | 67% 9 MB
|===================================================== | 68% 9 MB
|===================================================== | 68% 9 MB
|===================================================== | 68% 9 MB
|===================================================== | 68% 9 MB
|====================================================== | 69% 9 MB
|====================================================== | 69% 9 MB
|====================================================== | 69% 9 MB
|====================================================== | 70% 9 MB
|====================================================== | 70% 9 MB
|======================================================= | 70% 9 MB
|======================================================= | 70% 9 MB
|======================================================= | 71% 9 MB
|======================================================= | 71% 9 MB
|======================================================== | 71% 9 MB
|======================================================== | 72% 9 MB
|======================================================== | 72% 9 MB
|======================================================== | 72% 9 MB
|======================================================== | 72% 9 MB
|========================================================= | 73% 9 MB
|========================================================= | 73% 9 MB
|========================================================= | 73% 9 MB
|========================================================= | 74% 9 MB
|========================================================= | 74% 9 MB
|========================================================== | 74% 10 MB
|========================================================== | 74% 10 MB
|========================================================== | 75% 10 MB
|========================================================== | 75% 10 MB
|=========================================================== | 75% 10 MB
|=========================================================== | 76% 10 MB
|=========================================================== | 76% 10 MB
|=========================================================== | 76% 10 MB
|=========================================================== | 76% 10 MB
|============================================================ | 77% 10 MB
|============================================================ | 77% 10 MB
|============================================================ | 77% 10 MB
|============================================================ | 78% 10 MB
|============================================================= | 78% 10 MB
|============================================================= | 78% 10 MB
|============================================================= | 78% 10 MB
|============================================================= | 79% 10 MB
|============================================================= | 79% 10 MB
|============================================================== | 79% 10 MB
|============================================================== | 79% 10 MB
|============================================================== | 80% 10 MB
|============================================================== | 80% 10 MB
|=============================================================== | 80% 10 MB
|=============================================================== | 81% 10 MB
|=============================================================== | 81% 10 MB
|=============================================================== | 81% 10 MB
|=============================================================== | 81% 11 MB
|================================================================ | 82% 11 MB
|================================================================ | 82% 11 MB
|================================================================ | 82% 11 MB
|================================================================ | 83% 11 MB
|================================================================= | 83% 11 MB
|================================================================= | 83% 11 MB
|================================================================= | 83% 11 MB
|================================================================= | 84% 11 MB
|================================================================= | 84% 11 MB
|================================================================== | 84% 11 MB
|================================================================== | 85% 11 MB
|================================================================== | 85% 11 MB
|================================================================== | 85% 11 MB
|=================================================================== | 85% 11 MB
|=================================================================== | 86% 11 MB
|=================================================================== | 86% 11 MB
|=================================================================== | 86% 11 MB
|=================================================================== | 87% 11 MB
|==================================================================== | 87% 11 MB
|==================================================================== | 87% 11 MB
|==================================================================== | 87% 11 MB
|==================================================================== | 88% 11 MB
|===================================================================== | 88% 11 MB
|===================================================================== | 88% 11 MB
|===================================================================== | 89% 11 MB
|===================================================================== | 89% 12 MB
|===================================================================== | 89% 12 MB
|====================================================================== | 89% 12 MB
|====================================================================== | 90% 12 MB
|====================================================================== | 90% 12 MB
|====================================================================== | 90% 12 MB
|======================================================================= | 91% 12 MB
|======================================================================= | 91% 12 MB
|======================================================================= | 91% 12 MB
|======================================================================= | 91% 12 MB
|======================================================================= | 92% 12 MB
|======================================================================== | 92% 12 MB
|======================================================================== | 92% 12 MB
|======================================================================== | 93% 12 MB
|======================================================================== | 93% 12 MB
|========================================================================= | 93% 12 MB
|========================================================================= | 93% 12 MB
|========================================================================= | 94% 12 MB
|========================================================================= | 94% 12 MB
|========================================================================= | 94% 12 MB
|========================================================================== | 95% 12 MB
|========================================================================== | 95% 12 MB
|========================================================================== | 95% 12 MB
|========================================================================== | 95% 12 MB
|=========================================================================== | 96% 12 MB
|=========================================================================== | 96% 12 MB
|=========================================================================== | 96% 13 MB
|=========================================================================== | 97% 13 MB
|=========================================================================== | 97% 13 MB
|============================================================================ | 97% 13 MB
|============================================================================ | 97% 13 MB
|============================================================================ | 98% 13 MB
|============================================================================ | 98% 13 MB
|=============================================================================| 98% 13 MB
|=============================================================================| 99% 13 MB
|=============================================================================| 99% 13 MB
|=============================================================================| 99% 13 MB
|=============================================================================| 99% 13 MB
|==============================================================================| 100% 13 MB
histWeather$CityCode=as.factor(histWeather$CityCode)
histWeather$PrecipitationIn=as.integer(histWeather$PrecipitationIn)
NAs introduced by coercion
histWeather$AirPtCd=as.factor(histWeather$AirPtCd)
#Structure of histweather data
str(histWeather)
Classes ‘tbl_df’, ‘tbl’ and 'data.frame': 130457 obs. of 27 variables:
$ Date : chr "7/1/2014" "7/2/2014" "7/3/2014" "7/4/2014" ...
$ Max_TemperatureF : int 78 77 78 77 66 80 73 78 77 80 ...
$ Mean_TemperatureF : int 70 70 70 70 60 68 65 70 70 71 ...
$ Min_TemperatureF : int 62 64 62 62 53 57 57 62 62 60 ...
$ Max_Dew_PointF : int 70 70 72 70 66 59 64 72 68 64 ...
$ MeanDew_PointF : int 65 66 66 66 57 57 61 65 65 60 ...
$ Min_DewpointF : int 63 63 61 61 52 52 55 61 63 54 ...
$ Max_Humidity : int 100 100 100 100 100 94 100 100 100 100 ...
$ Mean_Humidity : int 89 91 95 92 90 65 87 91 88 74 ...
$ Min_Humidity : int 69 78 78 78 64 39 69 78 69 39 ...
$ Max_Sea_Level_PressureIn : num 29.9 29.9 30 30 29.8 ...
$ Mean_Sea_Level_PressureIn: num 29.8 29.9 29.9 29.9 29.7 ...
$ Min_Sea_Level_PressureIn : num 29.8 29.8 29.9 29.8 29.5 ...
$ Max_VisibilityMiles : int 10 10 10 10 10 10 10 10 10 10 ...
$ Mean_VisibilityMiles : int 10 10 7 7 9 10 9 8 7 10 ...
$ Min_VisibilityMiles : int 10 6 0 0 4 10 5 1 0 5 ...
$ Max_Wind_SpeedMPH : int 16 22 14 13 25 16 20 15 20 15 ...
$ Mean_Wind_SpeedMPH : int 7 11 7 6 12 7 7 8 13 5 ...
$ Max_Gust_SpeedMPH : int 20 28 NA 21 39 24 24 24 25 17 ...
$ PrecipitationIn : int 0 0 0 0 2 0 0 0 0 0 ...
$ CloudCover : int 0 2 6 7 5 0 1 3 3 1 ...
$ Events : chr NA NA NA NA ...
$ WindDirDegrees : int 201 198 193 203 284 235 201 198 200 233 ...
$ AirPtCd : Factor w/ 113 levels "KAAO","KACY",..: 14 14 14 14 14 14 14 14 14 14 ...
$ longitude : num -67 -67 -67 -67 -67 ...
$ latitude : num 44.9 44.9 44.9 44.9 44.9 ...
$ CityCode : Factor w/ 113 levels "1","2","3","4",..: 1 1 1 1 1 1 1 1 1 1 ...
- attr(*, "spec")=List of 2
..$ cols :List of 27
.. ..$ Date : list()
.. .. ..- attr(*, "class")= chr "collector_character" "collector"
.. ..$ Max_TemperatureF : list()
.. .. ..- attr(*, "class")= chr "collector_integer" "collector"
.. ..$ Mean_TemperatureF : list()
.. .. ..- attr(*, "class")= chr "collector_integer" "collector"
.. ..$ Min_TemperatureF : list()
.. .. ..- attr(*, "class")= chr "collector_integer" "collector"
.. ..$ Max_Dew_PointF : list()
.. .. ..- attr(*, "class")= chr "collector_integer" "collector"
.. ..$ MeanDew_PointF : list()
.. .. ..- attr(*, "class")= chr "collector_integer" "collector"
.. ..$ Min_DewpointF : list()
.. .. ..- attr(*, "class")= chr "collector_integer" "collector"
.. ..$ Max_Humidity : list()
.. .. ..- attr(*, "class")= chr "collector_integer" "collector"
.. ..$ Mean_Humidity : list()
.. .. ..- attr(*, "class")= chr "collector_integer" "collector"
.. ..$ Min_Humidity : list()
.. .. ..- attr(*, "class")= chr "collector_integer" "collector"
.. ..$ Max_Sea_Level_PressureIn : list()
.. .. ..- attr(*, "class")= chr "collector_double" "collector"
.. ..$ Mean_Sea_Level_PressureIn: list()
.. .. ..- attr(*, "class")= chr "collector_double" "collector"
.. ..$ Min_Sea_Level_PressureIn : list()
.. .. ..- attr(*, "class")= chr "collector_double" "collector"
.. ..$ Max_VisibilityMiles : list()
.. .. ..- attr(*, "class")= chr "collector_integer" "collector"
.. ..$ Mean_VisibilityMiles : list()
.. .. ..- attr(*, "class")= chr "collector_integer" "collector"
.. ..$ Min_VisibilityMiles : list()
.. .. ..- attr(*, "class")= chr "collector_integer" "collector"
.. ..$ Max_Wind_SpeedMPH : list()
.. .. ..- attr(*, "class")= chr "collector_integer" "collector"
.. ..$ Mean_Wind_SpeedMPH : list()
.. .. ..- attr(*, "class")= chr "collector_integer" "collector"
.. ..$ Max_Gust_SpeedMPH : list()
.. .. ..- attr(*, "class")= chr "collector_integer" "collector"
.. ..$ PrecipitationIn : list()
.. .. ..- attr(*, "class")= chr "collector_character" "collector"
.. ..$ CloudCover : list()
.. .. ..- attr(*, "class")= chr "collector_integer" "collector"
.. ..$ Events : list()
.. .. ..- attr(*, "class")= chr "collector_character" "collector"
.. ..$ WindDirDegrees : list()
.. .. ..- attr(*, "class")= chr "collector_integer" "collector"
.. ..$ AirPtCd : list()
.. .. ..- attr(*, "class")= chr "collector_character" "collector"
.. ..$ longitude : list()
.. .. ..- attr(*, "class")= chr "collector_double" "collector"
.. ..$ latitude : list()
.. .. ..- attr(*, "class")= chr "collector_double" "collector"
.. ..$ CityCode : list()
.. .. ..- attr(*, "class")= chr "collector_integer" "collector"
..$ default: list()
.. ..- attr(*, "class")= chr "collector_guess" "collector"
..- attr(*, "class")= chr "col_spec"
#Summary of variables
summary(histWeather)
Date Max_TemperatureF Mean_TemperatureF Min_TemperatureF Max_Dew_PointF
Length:130457 Min. : -9.00 Min. :-115.00 Min. :-115.00 Min. :-18.00
Class :character 1st Qu.: 55.00 1st Qu.: 45.00 1st Qu.: 35.00 1st Qu.: 36.00
Mode :character Median : 72.00 Median : 61.00 Median : 50.00 Median : 51.00
Mean : 70.01 Mean : 58.23 Mean : 47.79 Mean : 49.12
3rd Qu.: 84.00 3rd Qu.: 73.00 3rd Qu.: 62.00 3rd Qu.: 63.00
Max. :211119.00 Max. : 109.00 Max. : 99.00 Max. : 90.00
NA's :140 NA's :149 NA's :140 NA's :200
MeanDew_PointF Min_DewpointF Max_Humidity Mean_Humidity Min_Humidity
Min. :-25.00 Min. :-105.00 Min. : 0.00 Min. : 0.00 Min. : 0.00
1st Qu.: 30.00 1st Qu.: 24.00 1st Qu.: 78.00 1st Qu.: 55.00 1st Qu.: 29.00
Median : 45.00 Median : 38.00 Median : 88.00 Median : 67.00 Median : 43.00
Mean : 43.84 Mean : 37.96 Mean : 83.86 Mean : 64.55 Mean : 43.76
3rd Qu.: 59.00 3rd Qu.: 54.00 3rd Qu.: 94.00 3rd Qu.: 76.00 3rd Qu.: 57.00
Max. : 82.00 Max. : 81.00 Max. :600.00 Max. :100.00 Max. :500.00
NA's :200 NA's :200 NA's :196 NA's :196 NA's :196
Max_Sea_Level_PressureIn Mean_Sea_Level_PressureIn Min_Sea_Level_PressureIn
Min. :28.82 Min. :28.72 Min. :28.20
1st Qu.:29.99 1st Qu.:29.90 1st Qu.:29.80
Median :30.10 Median :30.01 Median :29.93
Mean :30.11 Mean :30.02 Mean :29.92
3rd Qu.:30.23 3rd Qu.:30.13 3rd Qu.:30.05
Max. :31.15 Max. :31.02 Max. :30.90
NA's :106 NA's :106 NA's :106
Max_VisibilityMiles Mean_VisibilityMiles Min_VisibilityMiles Max_Wind_SpeedMPH
Min. : 0.00 Min. : 0.000 Min. : 0.000 Min. : 0.00
1st Qu.:10.00 1st Qu.: 9.000 1st Qu.: 3.000 1st Qu.: 13.00
Median :10.00 Median :10.000 Median : 9.000 Median : 16.00
Mean :10.02 Mean : 9.136 Mean : 6.825 Mean : 17.69
3rd Qu.:10.00 3rd Qu.:10.000 3rd Qu.:10.000 3rd Qu.: 22.00
Max. :20.00 Max. :20.000 Max. :20.000 Max. :120.00
NA's :2542 NA's :2542 NA's :2542 NA's :1282
Mean_Wind_SpeedMPH Max_Gust_SpeedMPH PrecipitationIn CloudCover Events
Min. : 0.000 Min. : 0.00 Min. : 0.000 Min. :-440.000 Length:130457
1st Qu.: 5.000 1st Qu.: 19.00 1st Qu.: 0.000 1st Qu.: 1.000 Class :character
Median : 7.000 Median : 24.00 Median : 0.000 Median : 3.000 Mode :character
Mean : 7.551 Mean : 25.09 Mean : 0.031 Mean : 3.484
3rd Qu.:10.000 3rd Qu.: 30.00 3rd Qu.: 0.000 3rd Qu.: 6.000
Max. :99.000 Max. :230.00 Max. :38.000 Max. : 8.000
NA's :1283 NA's :19022 NA's :11648 NA's :2497
WindDirDegrees AirPtCd longitude latitude CityCode
Min. : -1.0 KLWS : 1525 Min. :-157.82 Min. :21.30 97 : 1525
1st Qu.:114.0 KACY : 1159 1st Qu.:-111.66 1st Qu.:35.22 2 : 1159
Median :199.0 KAGC : 1159 Median : -93.05 Median :39.48 3 : 1159
Mean :190.6 KALB : 1159 Mean : -95.50 Mean :39.10 4 : 1159
3rd Qu.:274.0 KAMA : 1159 3rd Qu.: -81.08 3rd Qu.:43.00 5 : 1159
Max. :360.0 KANJ : 1159 Max. : -66.99 Max. :61.22 6 : 1159
NA's :73 (Other):123137 (Other):123137
Max_TemperatureF has max value 211119.00.Which seems an outlier.
#Finding the index of max variable
which(histWeather$Max_TemperatureF==211119.00)
[1] 121449
#Making month,year and day
library(lubridate)
class(histWeather$Date)
[1] "character"
histWeather$dat=mdy(histWeather$Date)
class(histWeather$dat)
[1] "Date"
histWeather$month=month(histWeather$dat)
histWeather$day=day(histWeather$dat)
histWeather$year=year(histWeather$dat)
#Ploting Min_Temp
library(ggplot2)
ggplot(aes(x=Date,y=Min_TemperatureF),data=histWeather)+geom_line(col="green", size=1)
#ggplot of Min_TeamperaturF and month
ggplot(aes(x=month,y=Min_TemperatureF),data=histWeather)+geom_point(col="green", size=1)+ylim(c(-150,150))+xlim(c(1,12))
#Summary of data1
summary(data1)
X1 a b c
Length:3191972 Length:3191972 Length:3191972 Min. :-33.00
Class :character Class :character Class :character 1st Qu.: 0.00
Mode :character Mode :character Mode :character Median : 36.00
Mean : 36.12
3rd Qu.: 62.00
Max. :127.00
NA's :80
d e
Length:3191972 Length:3191972
Class :character Class :character
Mode :character Mode :character
str(data1)
Classes ‘tbl_df’, ‘tbl’ and 'data.frame': 3191972 obs. of 6 variables:
$ X1: chr "1 2014-07-09 63 MinTemp 2014-07-09" "1 2014-07-10 55 MinTemp 2014-07-09" "1 2014-07-11 57 MinTemp 2014-07-09" "1 2014-07-12 56 MinTemp 2014-07-09" ...
$ a : chr "1" "1" "1" "1" ...
$ b : chr "2014-07-09" "2014-07-10" "2014-07-11" "2014-07-12" ...
$ c : num 63 55 57 56 55 76 69 77 71 0 ...
$ d : chr "MinTemp" "MinTemp" "MinTemp" "MinTemp" ...
$ e : chr "2014-07-09" "2014-07-09" "2014-07-09" "2014-07-09" ...
- attr(*, "spec")=List of 2
..$ cols :List of 1
.. ..$ X1: list()
.. .. ..- attr(*, "class")= chr "collector_character" "collector"
..$ default: list()
.. ..- attr(*, "class")= chr "collector_guess" "collector"
..- attr(*, "class")= chr "col_spec"
data1$b=as.factor(data1$b)
data1$d=as.factor(data1$d)
str(data1)
Classes ‘tbl_df’, ‘tbl’ and 'data.frame': 3191972 obs. of 6 variables:
$ X1: chr "1 2014-07-09 63 MinTemp 2014-07-09" "1 2014-07-10 55 MinTemp 2014-07-09" "1 2014-07-11 57 MinTemp 2014-07-09" "1 2014-07-12 56 MinTemp 2014-07-09" ...
$ a : chr "1" "1" "1" "1" ...
$ b : Factor w/ 1111 levels "2014-07-08","2014-07-09",..: 2 3 4 5 6 2 3 4 5 2 ...
$ c : num 63 55 57 56 55 76 69 77 71 0 ...
$ d : Factor w/ 3 levels "MaxTemp","MinTemp",..: 2 2 2 2 2 1 1 1 1 3 ...
$ e : chr "2014-07-09" "2014-07-09" "2014-07-09" "2014-07-09" ...
- attr(*, "spec")=List of 2
..$ cols :List of 1
.. ..$ X1: list()
.. .. ..- attr(*, "class")= chr "collector_character" "collector"
..$ default: list()
.. ..- attr(*, "class")= chr "collector_guess" "collector"
..- attr(*, "class")= chr "col_spec"
#Tidy data
library(tidyr)
data1=data[c(2,3,5,4)]
data1=as.data.frame(data1)
summary(data1$c)
Min. 1st Qu. Median Mean 3rd Qu. Max.
4.000 4.000 6.000 6.188 8.000 8.000
data1[is.na(data1)]=0
dim(data1)
[1] 32 4
summary(data1$c)
Min. 1st Qu. Median Mean 3rd Qu. Max.
4.000 4.000 6.000 6.188 8.000 8.000
library(dplyr)
Attaching package: <U+393C><U+3E31>dplyr<U+393C><U+3E32>
The following objects are masked from <U+393C><U+3E31>package:lubridate<U+393C><U+3E32>:
intersect, setdiff, union
The following objects are masked from <U+393C><U+3E31>package:plyr<U+393C><U+3E32>:
arrange, count, desc, failwith, id, mutate, rename, summarise, summarize
The following objects are masked from <U+393C><U+3E31>package:stats<U+393C><U+3E32>:
filter, lag
The following objects are masked from <U+393C><U+3E31>package:base<U+393C><U+3E32>:
intersect, setdiff, setequal, union
#Convertings row to column
data2=data1 %>% group_by(d,b,a) %>% summarise_at(.vars = names(.)[4],.funs = c(mean="mean"))
Error in grouped_df_impl(data, unname(vars), drop) :
Column `d` is unknown
#Renaming columns
names(data3)[names(data3)=='a']='CityCode'
names(data3)[names(data3)=='b']='Date'
names(data3)[names(data3)=='MinTemp']='P_MinTemp'
names(data3)[names(data3)=='MaxTemp']='P_MaxTemp'
names(data3)[names(data3)=='ProbPrecip']='P_ProbPrecip'
#Changing formate of histweather data date col
histWeather$Date=as.Date(histWeather$Date,format = "%m/%d/%Y")
#Creating final data with merging of hisweather and forcasted data
library(plyr)
final=merge(histWeather,data3,by=c("CityCode","Date"))
#Creating text file
library(readxl)
Prediction_work <- read_excel("C:/Users/chink/Google Drive/Computational Statistics/5th Quater/Special Topics/JSM/Prediction_work.xlsx")
#Dufference of Max temp actual and predicted value
dif_Max_Temp=final$P_MaxTemp-final$Max_TemperatureF
dif_Max_Temp=as.data.frame(dif_Max_Temp)
summary(dif_Max_Temp)
dif_Max_Temp
Min. :-211097.29
1st Qu.: -3.57
Median : -1.00
Mean : -2.76
3rd Qu.: 1.43
Max. : 56.14
NA's :195
#Predicted vrs Actaul
library(ggplot2)
ggplot(final,aes(x=P_MaxTemp,y=Max_TemperatureF,col="red"))+geom_point()+xlim(-25,125)+ylim(0,100)+xlab("Predicted Max Temp")+ylab("Actual Max Temp")
#ploting diff and time
final$dif11=final$Max_TemperatureF-final$P_MaxTemp
ggplot(final,aes(x=Date,y=dif11,col="red"))+geom_line()+ylim(0,75)+xlab("Date")+ylab("Difference between predicted and Actual")
#ploting diff and time
final$dif21=final$Min_TemperatureF-final$P_MinTemp
ggplot(final,aes(x=Date,y=dif21,col="red"))+geom_line()+ylim(0,50)+xlab("Date")+ylab("Difference between predicted and Actual")
#ploting diff and time
final$dif31=as.numeric(final$PrecipitationIn)-final$P_ProbPrecip
ggplot(final,aes(x=Date,y=dif31,col="red"))+geom_line()+ylim(0,10)+xlab("Date")+ylab("Difference between predicted and Actual")
#Absolute Error between predicted and actual values of Max Temp
final$dif12=abs(final$Max_TemperatureF-final$P_MaxTemp)
final$dif22=abs(final$Min_TemperatureF-final$P_MinTemp)
final$dif32=abs(as.numeric(final$PrecipitationIn)-final$P_ProbPrecip)
#Square Error between predicted and actual values of Max Temp
final$dif13=(final$Max_TemperatureF-final$P_MaxTemp)^2
final$dif23=(final$Min_TemperatureF-final$P_MinTemp)^2
final$dif33=(as.numeric(final$PrecipitationIn)-final$P_ProbPrecip)^2
#Summary Statistics
summary(final)
CityCode Date Max_TemperatureF Mean_TemperatureF
97 : 1453 Min. :2014-07-08 Min. : -9.0 Min. :-115.00
75 : 1105 1st Qu.:2015-04-10 1st Qu.: 55.0 1st Qu.: 46.00
77 : 1105 Median :2016-02-04 Median : 72.0 Median : 61.00
78 : 1105 Mean :2016-01-30 Mean : 70.2 Mean : 58.31
79 : 1105 3rd Qu.:2016-11-22 3rd Qu.: 84.0 3rd Qu.: 73.00
80 : 1105 Max. :2017-09-01 Max. :211119.0 Max. : 109.00
(Other):117332 NA's :130 NA's :137
Min_TemperatureF Max_Dew_PointF MeanDew_PointF Min_DewpointF Max_Humidity
Min. :-115.00 Min. :-18.00 Min. :-25.00 Min. :-105.00 Min. : 0.00
1st Qu.: 35.00 1st Qu.: 36.00 1st Qu.: 30.00 1st Qu.: 24.00 1st Qu.: 78.00
Median : 50.00 Median : 51.00 Median : 45.00 Median : 38.00 Median : 88.00
Mean : 47.83 Mean : 49.14 Mean : 43.84 Mean : 37.94 Mean : 83.78
3rd Qu.: 62.00 3rd Qu.: 63.00 3rd Qu.: 59.00 3rd Qu.: 54.00 3rd Qu.: 94.00
Max. : 99.00 Max. : 90.00 Max. : 82.00 Max. : 81.00 Max. :600.00
NA's :130 NA's :190 NA's :190 NA's :190 NA's :186
Mean_Humidity Min_Humidity Max_Sea_Level_PressureIn Mean_Sea_Level_PressureIn
Min. : 0.00 Min. : 0.00 Min. :28.82 Min. :28.72
1st Qu.: 55.00 1st Qu.: 29.00 1st Qu.:29.99 1st Qu.:29.89
Median : 66.00 Median : 43.00 Median :30.10 Median :30.01
Mean : 64.41 Mean : 43.56 Mean :30.11 Mean :30.01
3rd Qu.: 76.00 3rd Qu.: 57.00 3rd Qu.:30.22 3rd Qu.:30.13
Max. :100.00 Max. :500.00 Max. :31.15 Max. :31.02
NA's :186 NA's :186 NA's :101 NA's :101
Min_Sea_Level_PressureIn Max_VisibilityMiles Mean_VisibilityMiles Min_VisibilityMiles
Min. :28.20 Min. : 0.00 Min. : 0.000 Min. : 0.000
1st Qu.:29.80 1st Qu.:10.00 1st Qu.: 9.000 1st Qu.: 3.000
Median :29.93 Median :10.00 Median :10.000 Median : 9.000
Mean :29.92 Mean :10.02 Mean : 9.138 Mean : 6.827
3rd Qu.:30.04 3rd Qu.:10.00 3rd Qu.:10.000 3rd Qu.:10.000
Max. :30.90 Max. :20.00 Max. :20.000 Max. :20.000
NA's :101 NA's :2426 NA's :2426 NA's :2426
Max_Wind_SpeedMPH Mean_Wind_SpeedMPH Max_Gust_SpeedMPH PrecipitationIn CloudCover
Min. : 0.00 Min. : 0.000 Min. : 0.00 Min. : 0.000 Min. :-440.000
1st Qu.: 13.00 1st Qu.: 5.000 1st Qu.: 19.00 1st Qu.: 0.000 1st Qu.: 1.000
Median : 16.00 Median : 7.000 Median : 24.00 Median : 0.000 Median : 3.000
Mean : 17.72 Mean : 7.553 Mean : 25.14 Mean : 0.031 Mean : 3.476
3rd Qu.: 22.00 3rd Qu.:10.000 3rd Qu.: 30.00 3rd Qu.: 0.000 3rd Qu.: 6.000
Max. :120.00 Max. :99.000 Max. :230.00 Max. :38.000 Max. : 8.000
NA's :1223 NA's :1224 NA's :18122 NA's :11141 NA's :2379
Events WindDirDegrees AirPtCd longitude latitude
Length:124310 Min. : -1.0 KLWS : 1453 Min. :-157.82 Min. :21.30
Class :character 1st Qu.:115.0 KBFI : 1105 1st Qu.:-111.66 1st Qu.:35.22
Mode :character Median :199.0 KBJC : 1105 Median : -93.05 Median :39.48
Mean :190.9 KBKE : 1105 Mean : -95.51 Mean :39.10
3rd Qu.:274.0 KBOI : 1105 3rd Qu.: -81.08 3rd Qu.:43.00
Max. :360.0 KCNM : 1105 Max. : -66.99 Max. :61.22
NA's :73 (Other):117332
dat month day year P_MaxTemp
Min. :2014-07-08 Min. : 1.000 Min. : 1.00 Min. :2014 Min. : -8.571
1st Qu.:2015-04-10 1st Qu.: 4.000 1st Qu.: 8.00 1st Qu.:2015 1st Qu.: 54.000
Median :2016-02-04 Median : 7.000 Median :16.00 Median :2016 Median : 70.714
Mean :2016-01-30 Mean : 6.498 Mean :15.84 Mean :2016 Mean : 67.460
3rd Qu.:2016-11-22 3rd Qu.: 9.000 3rd Qu.:23.00 3rd Qu.:2016 3rd Qu.: 83.143
Max. :2017-09-01 Max. :12.000 Max. :31.00 Max. :2017 Max. :123.833
NA's :65
P_MinTemp P_ProbPrecip dif12 dif22 dif32
Min. :-22.71 Min. : 0.000 Min. : 0.00 Min. : 0.000 Min. : 0.000
1st Qu.: 36.67 1st Qu.: 0.000 1st Qu.: 1.25 1st Qu.: 1.333 1st Qu.: 0.000
Median : 51.00 Median : 6.429 Median : 2.71 Median : 2.857 Median : 5.714
Mean : 49.11 Mean : 13.474 Mean : 5.10 Mean : 3.829 Mean : 13.319
3rd Qu.: 62.86 3rd Qu.: 22.857 3rd Qu.: 4.75 3rd Qu.: 5.286 3rd Qu.: 22.727
Max. : 91.00 Max. :100.000 Max. :211097.29 Max. :168.429 Max. :100.000
NA's :562 NA's :195 NA's :692 NA's :11141
dif13 dif23 dif33
Min. :0.000e+00 Min. : 0.000 Min. : 0.00
1st Qu.:2.000e+00 1st Qu.: 1.778 1st Qu.: 0.00
Median :7.000e+00 Median : 8.163 Median : 32.65
Mean :3.591e+05 Mean : 27.227 Mean : 461.06
3rd Qu.:2.300e+01 3rd Qu.: 27.939 3rd Qu.: 516.53
Max. :4.456e+10 Max. :28368.184 Max. :10000.00
NA's :195 NA's :692 NA's :11141
#MAE of temp
MAE_Max_Temp=5.10
MAE_Min_Temp=3.831
MAE_prec=13.253
#MSE of temp
MSE_Max_Temp=3.589e+05
MSE_Min_Temp=27.314
MSE_prec=456.14
MAE and MSE is higher for Max Temp becauses Max Temp has outliers.
write.table(final, "C:/Users/chink/Google Drive/Computational Statistics/5th Quater/Special Topics/JSM/final.txt", sep="\t")