Browse Source

Created seven day sliding average data.

master
Jeffery Russell 5 years ago
parent
commit
8cf225dcf7
2 changed files with 354 additions and 6 deletions
  1. +350
    -0
      data_preparation/cleaned/slidingWorkAverageSevenDay.csv
  2. +4
    -6
      data_preparation/createWorkSequenceData.R

+ 350
- 0
data_preparation/cleaned/slidingWorkAverageSevenDay.csv View File

@ -0,0 +1,350 @@
"","TimeSinceAugFirst","slidingWorkAverage"
"1",6,3340
"2",7,4662.14285714286
"3",8,5407.85714285714
"4",9,5460.71428571429
"5",10,5780.71428571429
"6",11,6050
"7",12,6225.71428571429
"8",13,6240.71428571429
"9",14,6057.14285714286
"10",15,6055.71428571429
"11",16,6022.71428571429
"12",17,6087
"13",18,6871.28571428571
"14",19,6693.42857142857
"15",20,6793.42857142857
"16",21,6967.71428571429
"17",22,7458.71428571429
"18",23,7511.71428571429
"19",24,7507.85714285714
"20",25,7335.71428571429
"21",26,7382.85714285714
"22",27,7265.71428571429
"23",28,7190.42857142857
"24",29,6881.57142857143
"25",30,6899.71428571429
"26",31,6846.42857142857
"27",32,6438.57142857143
"28",33,6445
"29",34,6445
"30",35,6207.28571428571
"31",36,5793
"32",37,5750.42857142857
"33",38,5989.71428571429
"34",39,5710.85714285714
"35",40,6025.85714285714
"36",41,6025.85714285714
"37",42,4970.28571428571
"38",43,4164.57142857143
"39",44,4362.85714285714
"40",45,3313.57142857143
"41",46,2486.14285714286
"42",47,2147.85714285714
"43",48,2152.14285714286
"44",49,3555
"45",50,4432.85714285714
"46",51,4489
"47",52,5900.42857142857
"48",53,7505.14285714286
"49",54,7474.85714285714
"50",55,7528.42857142857
"51",56,7414
"52",57,7653.28571428571
"53",58,7512.85714285714
"54",59,7521.42857142857
"55",60,7561.14285714286
"56",61,7610.42857142857
"57",62,7625.42857142857
"58",63,7663.14285714286
"59",64,7692.71428571429
"60",65,7839.85714285714
"61",66,7538.42857142857
"62",67,7605
"63",68,7617.85714285714
"64",69,7596.42857142857
"65",70,7843.85714285714
"66",71,7791.14285714286
"67",72,7870.85714285714
"68",73,7778.71428571429
"69",74,7231.85714285714
"70",75,7234
"71",76,7219
"72",77,5686.85714285714
"73",78,4371.42857142857
"74",79,4231.42857142857
"75",80,4410.71428571429
"76",81,2970.71428571429
"77",82,4127.14285714286
"78",83,6200.71428571429
"79",84,5997.85714285714
"80",85,6781.42857142857
"81",86,6890.71428571429
"82",87,5516.42857142857
"83",88,5910
"84",89,5540.28571428571
"85",90,4386.85714285714
"86",91,4268.28571428571
"87",92,3443.28571428571
"88",93,2926.14285714286
"89",94,3994.71428571429
"90",95,4876.14285714286
"91",96,4146.57142857143
"92",97,3190
"93",98,4790.71428571429
"94",99,6302.85714285714
"95",100,6819.28571428571
"96",101,7200.42857142857
"97",102,9141.14285714286
"98",103,9159
"99",104,9160.71428571429
"100",105,9474.28571428571
"101",106,9688.57142857143
"102",107,9578.57142857143
"103",108,9861.71428571429
"104",109,9296
"105",110,9156.71428571429
"106",111,9155
"107",112,8447.85714285714
"108",113,7577.71428571429
"109",114,7523.42857142857
"110",115,5789.85714285714
"111",116,3093.42857142857
"112",117,3466.28571428571
"113",118,4122
"114",119,3564.85714285714
"115",120,2901.42857142857
"116",121,3102.14285714286
"117",122,4238.42857142857
"118",123,5762.28571428571
"119",124,5389.42857142857
"120",125,4733.71428571429
"121",126,4419.42857142857
"122",127,4468
"123",128,4361.57142857143
"124",129,4438.14285714286
"125",130,4914.28571428571
"126",131,5047.14285714286
"127",132,5047.14285714286
"128",133,6378.57142857143
"129",134,7481.14285714286
"130",135,7591.85714285714
"131",136,8210.14285714286
"132",137,8463.57142857143
"133",138,8330.71428571429
"134",139,8330.71428571429
"135",140,8509.71428571429
"136",141,7275
"137",142,8413.28571428571
"138",143,7959.28571428571
"139",144,5693
"140",145,6011.57142857143
"141",146,6583
"142",147,4646.85714285714
"143",148,4782.71428571429
"144",149,3188
"145",150,3682.28571428571
"146",151,4128
"147",152,5956.57142857143
"148",153,5705.85714285714
"149",154,5663
"150",155,7444.14285714286
"151",156,7604.14285714286
"152",157,7715.14285714286
"153",158,9527.28571428571
"154",159,7585.85714285714
"155",160,7265.14285714286
"156",161,8889.42857142857
"157",162,7732.71428571429
"158",163,7988.42857142857
"159",164,7140.28571428571
"160",165,6757.42857142857
"161",166,6711
"162",167,6711
"163",168,6420.28571428571
"164",169,5748.57142857143
"165",170,5317.85714285714
"166",171,5349
"167",172,3464.42857142857
"168",173,4225.85714285714
"169",174,4225.85714285714
"170",175,3948
"171",176,4535.14285714286
"172",177,4590.42857142857
"173",178,4127.85714285714
"174",179,5383.57142857143
"175",180,4981.14285714286
"176",181,5135.14285714286
"177",182,4152.28571428571
"178",183,3264.42857142857
"179",184,3403.85714285714
"180",185,2967.71428571429
"181",186,1939.71428571429
"182",187,1560
"183",188,1483.14285714286
"184",189,2747.42857142857
"185",190,4782.71428571429
"186",191,5047.28571428571
"187",192,6633.42857142857
"188",193,8409.57142857143
"189",194,8271
"190",195,8193.85714285714
"191",196,8674.57142857143
"192",197,8553.57142857143
"193",198,8600
"194",199,8265
"195",200,8606.42857142857
"196",201,8813.57142857143
"197",202,8826.42857142857
"198",203,8151.42857142857
"199",204,7142.14285714286
"200",205,6893.57142857143
"201",206,6028.57142857143
"202",207,4961.42857142857
"203",208,5379.57142857143
"204",209,5733.85714285714
"205",210,5548.14285714286
"206",211,5098.85714285714
"207",212,5048.42857142857
"208",213,5704.14285714286
"209",214,6343.42857142857
"210",215,5718.14285714286
"211",216,5351
"212",217,6423.85714285714
"213",218,7730.14285714286
"214",219,7950.42857142857
"215",220,7662.57142857143
"216",221,5935.42857142857
"217",222,5935.42857142857
"218",223,5935.42857142857
"219",224,6184.71428571429
"220",225,5354.85714285714
"221",226,5303.85714285714
"222",227,5856.71428571429
"223",228,7469.57142857143
"224",229,7546.71428571429
"225",230,7546.71428571429
"226",231,5315.28571428571
"227",232,5034.57142857143
"228",233,5161.57142857143
"229",234,3862.57142857143
"230",235,2151.85714285714
"231",236,2074.71428571429
"232",237,2074.71428571429
"233",238,3534
"234",239,3897.57142857143
"235",240,3782.42857142857
"236",241,5280
"237",242,6554.28571428571
"238",243,6554.28571428571
"239",244,6554.28571428571
"240",245,6860
"241",246,6680.14285714286
"242",247,6258.71428571429
"243",248,5455.14285714286
"244",249,3959.42857142857
"245",250,3959.42857142857
"246",251,4233
"247",252,3254.85714285714
"248",253,3011.14285714286
"249",254,2924.71428571429
"250",255,2393.57142857143
"251",256,3091.14285714286
"252",257,3413.14285714286
"253",258,3816.57142857143
"254",259,3117.14285714286
"255",260,2854
"256",261,3212.57142857143
"257",262,2795.14285714286
"258",263,2446.14285714286
"259",264,3239
"260",265,3208.57142857143
"261",266,3264
"262",267,3186
"263",268,2903.14285714286
"264",269,3772.42857142857
"265",270,4849.57142857143
"266",271,3756.14285714286
"267",272,3148.14285714286
"268",273,5160.28571428571
"269",274,6097.14285714286
"270",275,6633.85714285714
"271",276,6273.85714285714
"272",277,5578.57142857143
"273",278,5557.14285714286
"274",279,5518.57142857143
"275",280,3802.14285714286
"276",281,3774.85714285714
"277",282,3647.42857142857
"278",283,3279.57142857143
"279",284,3000.57142857143
"280",285,3993.71428571429
"281",286,4737.71428571429
"282",287,4279.85714285714
"283",288,3175
"284",289,3069.28571428571
"285",290,2980.71428571429
"286",291,3007.14285714286
"287",292,2093.28571428571
"288",293,1357.85714285714
"289",294,2751.57142857143
"290",295,4038
"291",296,4010.85714285714
"292",297,5494.42857142857
"293",298,6503
"294",299,6423.71428571429
"295",300,6415.14285714286
"296",301,6702.14285714286
"297",302,6057.14285714286
"298",303,6085
"299",304,5794.28571428571
"300",305,5097.42857142857
"301",306,5097.42857142857
"302",307,5097.42857142857
"303",308,3846
"304",309,4191.71428571429
"305",310,3832.28571428571
"306",311,2930.14285714286
"307",312,3070.14285714286
"308",313,3412.57142857143
"309",314,3716.14285714286
"310",315,3903.57142857143
"311",316,2925.71428571429
"312",317,3115.14285714286
"313",318,3763.71428571429
"314",319,4472
"315",320,4233.57142857143
"316",321,3997.71428571429
"317",322,4926.71428571429
"318",323,6248.14285714286
"319",324,6036
"320",325,6124.57142857143
"321",326,6522.42857142857
"322",327,6418.42857142857
"323",328,6350.71428571429
"324",329,6802.14285714286
"325",330,6798.57142857143
"326",331,6805
"327",332,6575.28571428571
"328",333,5883.14285714286
"329",334,6155.28571428571
"330",335,6258.14285714286
"331",336,5507.57142857143
"332",337,5044
"333",338,5049.71428571429
"334",339,4775.14285714286
"335",340,4217.28571428571
"336",341,3945.14285714286
"337",342,3879.42857142857
"338",343,3874.28571428571
"339",344,3343.28571428571
"340",345,3329
"341",346,3255.42857142857
"342",347,2469.71428571429
"343",348,2478.28571428571
"344",349,2441.14285714286
"345",350,1511.85714285714
"346",351,1720
"347",352,1720
"348",353,1363.57142857143
"349",354,1483.57142857143

+ 4
- 6
data_preparation/createWorkSequenceData.R View File

@ -31,12 +31,10 @@ plot(dayList, workLoad, main="Daily Total Work Load")
slidingAverage <- c()
window <- 21 - 1
window <- 7 - 1
for(day in window:numDays)
{
print(length(workLoad[c((day-window):day)]))
windowAverage <- mean(workLoad[c((day-window):day)])
slidingAverage <- c(slidingAverage, windowAverage)
}
@ -52,10 +50,10 @@ dataTibble <- tibble(TimeSinceAugFirst = window:numDays, slidingWorkAverage = sl
ggplot(data = dataTibble) +
theme(plot.title = element_text(hjust = 0.5)) +
ggtitle("Team's Total Daily Load Moving Average") +
ggtitle("Team's 7 Day Moving Average") +
geom_point(mapping = aes(x=TimeSinceAugFirst, y=slidingWorkAverage)) +
labs(x = "Days Since August Twenty First 2017", y = "Teams Total Daily Load")+
labs(x = "Days Since August Seventh 2017", y = "Teams Total Daily Load")+
theme_bw()
write.csv(dataTibble, "cleaned/slidingWorkAverage.csv")
write.csv(dataTibble, "cleaned/slidingWorkAverageSevenDay.csv")

Loading…
Cancel
Save