From 00be6ced6773bd62a349f7c5aab2be6872d5674b Mon Sep 17 00:00:00 2001 From: Kim Siegmund Date: Mon, 24 Jul 2023 17:17:38 -0700 Subject: [PATCH] add ChatGPT.Rmd introduction and lab --- google-drive/week06/4Thurs/CalCOFI_2016.csv | 376 ++++++++++++++++++++ google-drive/week06/4Thurs/ChatGPT.Rmd | 293 +++++++++++++++ google-drive/week06/4Thurs/ChatGPT_Lab.Rmd | 171 +++++++++ 3 files changed, 840 insertions(+) create mode 100644 google-drive/week06/4Thurs/CalCOFI_2016.csv create mode 100644 google-drive/week06/4Thurs/ChatGPT.Rmd create mode 100644 google-drive/week06/4Thurs/ChatGPT_Lab.Rmd diff --git a/google-drive/week06/4Thurs/CalCOFI_2016.csv b/google-drive/week06/4Thurs/CalCOFI_2016.csv new file mode 100644 index 0000000..b3eba62 --- /dev/null +++ b/google-drive/week06/4Thurs/CalCOFI_2016.csv @@ -0,0 +1,376 @@ +"","Cst_Cnt","Sta_ID","Depthm","T_degC","Salnty","O2ml_L","O2Sat","Oxy_µmol.Kg","ChlorA","Phaeop","PO4uM","SiO3uM","NO2uM","NO3uM","NH3uM","C14A1q","C14A2q" +"108577",3756,"136.7 030.0",0,20.97,34.6,4.91,96.5,214.0996,NA,NA,NA,NA,NA,NA,NA,9,9 +"176475",6816,"120.0 150.0",0,18.3,33.84,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,9,9 +"193561",7489,"096.0 142.0",1600,2.5,34.625,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,9,9 +"197874",7626,"019.0 242.0",1600,2.41,34.577,0.79,10.4,34.33349,NA,NA,NA,NA,NA,NA,NA,9,9 +"197924",7627,"034.0 282.0",1600,2.39,34.571,1.2,15.8,52.15234,NA,NA,NA,NA,NA,NA,NA,9,9 +"199001",7653,"040.0 072.0",1600,2.38,34.576,1.08,14.2,46.93687,NA,NA,NA,NA,NA,NA,NA,9,9 +"200819",7695,"118.0 232.0",1600,2.66,34.62,1.49,19.7,64.75475,NA,NA,3.1,NA,NA,NA,NA,9,9 +"202070",7723,"049.0 422.0",1600,2.53,34.578,1.62,21.4,70.40607,NA,NA,NA,NA,NA,NA,NA,9,9 +"204618",7810,"110.0 122.0",1600,2.71,34.633,1.36,18,59.10466,NA,NA,NA,NA,NA,NA,NA,9,9 +"226267",8639,"148.0 072.0",1600,2.97,34.615,0.9,12,39.11478,NA,NA,NA,NA,NA,NA,NA,9,9 +"242863",9304,"076.0 049.0",0,13.24,33.48,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,9,9 +"369397",13776,"096.0 082.0",1600,2.61,34.579,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,9,9 +"369454",13777,"096.0 082.0",1600,2.58,34.574,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,9,9 +"369508",13778,"096.0 082.0",1600,2.63,34.586,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,9,9 +"388898",14596,"136.7 030.0",0,21.88,33.95,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,9,9 +"388910",14597,"136.7 030.0",0,21.86,33.935,5.66,112.6,246.9841,NA,NA,0.2,1,0,NA,NA,9,9 +"390134",14651,"100.0 040.0",0,14.7,33.425,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,9,9 +"445270",17534,"080.0 080.0",0,10.85,33.23,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,9,9 +"468111",18601,"028.7 182.0",1600,2.38,34.558,0.98,12.9,42.59145,NA,NA,3.18,170,0.03,43.3,NA,9,9 +"472956",18829,"156.7 100.0",0,27.6,34.6,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,9,9 +"476619",19073,"131.0 002.0",1600,3.02,34.614,0.65,8.7,28.2497,NA,NA,3.26,167.4,0.01,42.2,NA,9,9 +"476767",19077,"132.0 002.0",1600,3.03,34.61,0.65,8.7,28.24981,NA,NA,NA,NA,NA,NA,NA,9,9 +"509318",20725,"095.0 072.0",1600,2.62,34.585,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,9,9 +"570560",23320,"063.3 060.0",0,11.48,32.95,6.44,103.9,280.5698,1.25,0.32,0.67,4.5,0.1,4,NA,9,9 +"590386",24113,"092.0 050.0",10,13.48,33.615,6.15,103.9,267.9012,1.67,0.41,0.6,7.3,0.15,2.4,NA,9,9 +"605545",24752,"057.5 050.7",0,10.93,33.083,7.59,121.1,330.6064,14.77,1.49,0.44,3.7,0.07,1.4,NA,9,9 +"669157",27338,"086.7 100.0",0,15.77,33.18,5.69,100.5,248.0627,0.15,0.06,0.33,2,0,0,NA,9,9 +"855928",34057,"060.0 053.0",0,13.342,32.7369,6.189,103.72,270.25,1.366,0.449,NA,NA,NA,NA,NA,9,9 +"855939",34058,"060.0 060.0",0,13.1,33.0162,6.121,102.24,267.23,1.13,0.45,NA,NA,NA,NA,NA,9,9 +"855961",34059,"060.0 070.0",0,14.024,33.2137,6.092,103.85,265.94,1.617,0.1,NA,NA,NA,NA,NA,9,9 +"855985",34060,"060.0 080.0",0,15.139,32.9014,5.833,101.52,254.73,0.226,0.049,NA,NA,NA,NA,NA,9,9 +"856009",34061,"060.0 090.0",0,14.41,32.9129,5.922,101.56,258.59,0.242,0.09,NA,NA,NA,NA,NA,9,9 +"856034",34062,"063.3 052.0",0,13.902,33.2802,5.873,99.91,256.36,0.486,0.111,NA,NA,NA,NA,NA,9,9 +"856044",34063,"063.3 055.0",0,13.976,33.2664,6.095,103.83,266.02,1.43,0.464,NA,NA,NA,NA,NA,9,9 +"856062",34064,"063.3 060.0",0,13.657,33.0376,6.088,102.89,265.79,0.852,0.037,NA,NA,NA,NA,NA,9,9 +"856086",34065,"063.3 070.0",0,13.651,33.1656,6.062,102.52,264.64,0.751,0.382,NA,NA,NA,NA,NA,9,9 +"856108",34066,"063.3 080.0",0,13.408,33.044,6.075,102.14,265.21,0.583,0.234,NA,NA,NA,NA,NA,9,9 +"856131",34067,"063.3 090.0",0,14.228,32.9586,5.928,101.32,258.85,0.44,0.137,NA,NA,NA,NA,NA,9,9 +"856155",34068,"066.7 050.0",0,13.944,33.2718,5.967,101.59,260.45,0.926,0.441,NA,NA,NA,NA,NA,9,9 +"856175",34069,"066.7 055.0",0,13.826,33.2783,5.966,101.33,263.58,1.14,0.486,NA,NA,NA,NA,NA,9,9 +"856200",34070,"066.7 060.0",0,13.415,32.8726,6.058,101.76,264.52,0.403,0.192,NA,NA,NA,NA,NA,9,9 +"856223",34071,"066.7 070.0",0,14.038,32.9107,5.921,100.78,258.52,0.378,0.114,NA,NA,NA,NA,NA,9,9 +"856245",34072,"066.7 080.0",0,13.699,32.8756,6.088,102.87,265.83,0.72,0.151,NA,NA,NA,NA,NA,9,9 +"856270",34073,"066.7 090.0",0,14.547,32.9193,5.89,101.3,257.15,0.39,0.079,NA,NA,NA,NA,NA,9,9 +"856293",34074,"070.0 051.0",0,13.941,33.2484,5.923,100.82,258.52,0.85,0.343,NA,NA,NA,NA,NA,9,9 +"856313",34075,"070.0 055.0",0,13.789,33.16,6.007,101.87,262.2,0.7,0.103,0.36,2.32,0.032,0,0.05,9,9 +"856334",34076,"070.0 060.0",0,13.904,33.3144,5.997,102.04,261.73,1.458,0.38,0.47,3.65,0.127,0.69,0.12,9,9 +"856355",34077,"070.0 070.0",0,13.934,32.8548,6.001,101.88,262.01,0.345,0.067,0.31,2.11,0.01,0.02,0.16,9,9 +"856378",34078,"070.0 080.0",0,14.344,32.9252,5.917,101.35,258.35,0.279,0.104,0.46,1.96,0.021,0.04,0.67,9,9 +"856402",34079,"070.0 090.0",0,14.718,33.0284,5.836,100.79,254.83,0.268,0.048,0.33,2.06,0.006,0.01,0.4,9,9 +"856428",34080,"073.3 050.0",0,13.929,33.1566,5.895,100.26,257.4,0.931,0.413,0.79,6.64,0.415,3.71,0.5,9,9 +"856435",34081,"073.3 055.0",0,14.281,33.454,5.906,101.36,257.86,0.977,0.575,0.51,2.97,0.163,1.02,0.14,9,9 +"856458",34082,"073.3 060.0",0,14.368,33.1934,5.947,102.08,259.71,0.457,0.139,0.34,2.05,0.015,0,0,9,9 +"856482",34083,"073.3 070.0",0,13.946,32.8242,5.99,101.7,261.58,0.328,0.122,0.32,2.07,0.017,0.02,0.06,9,9 +"856505",34084,"073.3 080.0",0,15.142,33.0958,5.783,100.78,252.51,0.193,0.048,0.31,2.09,0.009,0,0.02,9,9 +"856529",34085,"073.3 090.0",0,15.253,33.0337,5.773,100.79,252.05,0.179,0.054,0.28,1.99,0.012,0,0,9,9 +"856553",34086,"076.7 049.0",0,14.156,33.5046,5.913,101.25,258.12,1.447,0.605,0.58,5.35,0.188,2.41,0.19,9,9 +"856566",34087,"076.7 051.0",0,14.219,33.4553,5.962,102.19,260.27,1.397,0.523,0.52,4.12,0.151,1.53,0.18,9,9 +"856591",34088,"076.7 055.0",0,14.266,33.2164,6.001,102.81,262.02,0.547,0.209,0.38,2.48,0.018,0.03,0.27,9,9 +"856622",34089,"076.7 060.0",0,14.246,33.4841,5.891,101.05,257.16,1.02,0.487,NA,4.16,0.154,1.66,0.5,NA,NA +"856656",34090,"076.7 070.0",0,13.872,32.9164,6.092,103.34,266.04,0.279,0.108,0.33,2.45,0.018,0,0.09,9,9 +"856687",34091,"076.7 080.0",0,14.786,33.1621,5.903,102.17,257.77,0.19,0.066,0.41,2.09,0.022,0.03,0.9,9,9 +"856718",34092,"076.7 090.0",0,15.78,33.0129,5.737,101.21,250.55,0.131,0.041,0.31,1.92,0.007,0,0.02,9,9 +"856748",34093,"076.7 100.0",0,16.233,33.0732,5.643,100.49,246.46,0.101,0.034,0.25,1.89,0.017,0,0,NA,NA +"856784",34094,"080.0 050.5",0,14.767,33.5665,6.252,108.44,272.88,1.287,0.587,0.99,7.43,0.459,3.1,0.53,9,9 +"856791",34095,"080.0 051.0",0,14.632,33.5714,5.531,95.67,241.45,1.491,0.503,0.64,5.05,0.334,2.58,0.14,9,9 +"856802",34096,"080.0 055.0",0,14.437,33.4287,6.156,105.97,268.76,1.669,0.68,0.41,3.88,0.035,0.31,0.08,9,9 +"856835",34097,"080.0 060.0",0,14.524,33.2486,5.935,102.23,259.17,0.252,0.094,0.32,1.99,0.039,0,0,9,9 +"856867",34098,"080.0 070.0",0,15.083,33.1659,5.764,100.37,251.73,0.195,0.065,0.31,2.04,0.014,0,0.12,NA,NA +"856902",34099,"080.0 080.0",0,15.666,33.1366,5.724,100.83,249.97,0.134,0.039,0.32,2.04,0.013,0,0.03,9,9 +"856934",34100,"080.0 090.0",0,15.879,33.1462,5.702,100.87,249.01,0.142,0.056,0.28,2,0.015,0,0.02,9,9 +"856966",34101,"080.0 100.0",0,16.413,33.1809,5.631,100.7,245.93,0.107,0.039,0.26,1.95,0.016,0,0.01,9,9 +"856998",34102,"081.7 043.5",0,15.093,33.5768,5.841,101.99,255.01,2.716,0.846,0.51,3.75,0.096,0.58,0.09,9,9 +"857003",34103,"081.8 046.9",0,14.835,33.5707,5.834,101.33,254.66,1.9,0.675,0.56,4.46,0.173,1.6,0.09,9,9 +"857036",34104,"083.3 039.4",0,15.316,33.5966,5.758,101,251.37,2.22,0.671,0.45,2.78,0.066,0.41,0.02,9,9 +"857043",34105,"083.3 040.6",0,15.28,33.5949,5.709,100.07,249.22,2.108,0.625,0.47,2.72,0.085,0.6,0,NA,NA +"857054",34106,"083.3 042.0",0,15.063,33.5656,5.831,101.74,254.58,2.585,0.738,0.48,3.27,0.045,0.36,0.26,9,9 +"857068",34107,"083.3 051.0",0,14.355,33.5562,5.545,95.37,242.11,1.433,0.518,0.68,5.8,0.185,3.37,0.19,9,9 +"857082",34108,"083.3 055.0",0,14.533,33.4171,5.878,101.38,256.6,1.207,0.459,0.44,3.55,0.084,0.82,0.15,9,9 +"857114",34109,"083.3 060.0",0,14.703,33.4228,5.951,102.99,259.77,1.219,0.424,0.44,2.99,0.067,0.32,0.15,9,9 +"857146",34110,"083.3 070.0",0,14.703,33.2517,5.884,101.73,256.92,0.447,0.155,0.33,2.08,0.015,0,0.03,NA,NA +"857180",34111,"083.3 080.0",0,14.873,33.4067,5.929,102.96,258.85,0.774,0.339,0.36,2.42,0.026,0,0.02,9,9 +"857211",34112,"083.3 090.0",0,15.991,33.1961,5.667,100.51,247.49,0.133,0.039,0.29,2.01,0.009,0.05,0,9,9 +"857242",34113,"083.3 100.0",0,16.089,33.1039,5.703,101.29,249.06,0.117,0.033,0.28,1.97,0.011,0,0.02,9,9 +"857271",34114,"083.3 110.0",0,15.951,33.1242,5.687,100.74,248.43,0.136,0.046,0.28,1.9,0.01,0,0.01,NA,NA +"857308",34115,"085.4 035.8",0,15.299,33.5145,5.797,101.6,253.04,0.86,0.375,NA,NA,NA,NA,NA,9,9 +"857315",34116,"086.7 033.0",0,15.195,33.5487,5.583,97.66,243.7,1.071,0.226,0.51,2.59,0.143,1.16,1.18,9,9 +"857324",34117,"086.7 035.0",0,15.683,33.6132,5.578,98.57,243.45,1.099,0.424,0.43,2.81,0.083,0.5,0.12,9,9 +"857354",34118,"086.7 040.0",0,15.542,33.5476,5.704,100.48,248.96,0.749,0.271,0.37,2.74,0.023,0.09,0.06,9,9 +"857389",34119,"086.7 045.0",0,14.942,33.5339,5.704,99.27,248.96,0.958,0.359,0.47,3.12,0.088,0.95,0.12,NA,NA +"857423",34120,"086.7 050.0",0,14.458,33.4319,5.709,98.32,249.16,1.019,0.341,0.58,4.13,0.122,1.99,0.24,9,9 +"857435",34121,"086.7 055.0",0,14.949,33.3702,5.732,99.67,250.21,0.488,0.244,0.38,2.65,0.06,0.41,0.12,9,9 +"857465",34122,"086.7 060.0",0,15.132,33.3579,5.736,100.1,250.41,0.436,0.242,0.32,2.48,0.023,0.08,0.04,9,9 +"857497",34123,"086.7 070.0",0,15.496,33.3404,5.727,100.66,250.09,0.266,0.09,0.34,2.04,0.017,0.07,0.16,9,9 +"857532",34124,"086.7 080.0",0,15.153,33.3165,5.765,100.62,251.8,0.279,0.087,0.31,1.98,0.018,0,0,NA,NA +"857569",34125,"086.7 090.0",0,16.136,33.2057,5.663,100.73,247.3,0.124,0.043,0.28,1.82,0.01,0.04,0.13,9,9 +"857599",34126,"086.7 100.0",0,16.447,33.231,5.606,100.35,244.82,0.117,0.037,0.3,1.91,0.013,0.07,0.08,9,9 +"857630",34127,"086.7 110.0",0,16.208,33.184,5.68,101.16,248.11,0.1,0.027,0.4,2.52,0.036,0.06,0.07,9,9 +"857661",34128,"086.8 032.5",0,15.275,33.5391,5.827,102.09,254.38,2.374,0.583,0.55,2.61,0.186,1.41,0.86,9,9 +"857666",34129,"088.5 030.1",0,15.168,33.281,5.986,104.49,261.37,3.178,0.517,0.44,2.3,0.102,0.53,0.12,9,9 +"857672",34130,"090.0 027.7",0,15.835,33.576,5.673,100.53,247.63,1.257,0.297,0.43,3.14,0.119,0.5,0.26,9,9 +"857677",34131,"090.0 028.0",0,15.868,33.5686,5.664,100.44,247.23,1.274,0.237,0.44,3.26,0.105,0.33,0.05,9,9 +"857686",34132,"090.0 030.0",0,15.934,33.6071,5.597,99.4,244.35,0.973,0.427,0.41,3.04,0.054,0.15,0.04,NA,NA +"857724",34133,"090.0 035.0",0,16.226,33.6116,5.55,99.14,242.3,0.787,0.274,0.39,3.11,0.04,0.17,0,9,9 +"857751",34134,"090.0 037.0",0,15.842,33.5659,5.662,100.35,247.18,0.839,0.254,0.39,3.19,0.043,0.28,0.09,9,9 +"857786",34135,"090.0 045.0",0,15.702,33.5282,5.778,102.1,251.83,0.773,0.275,0.37,2.57,0.014,0.03,0.06,9,9 +"857818",34136,"090.0 053.0",0,15.114,33.4547,5.838,101.9,254.93,0.843,0.256,0.62,2.24,0.06,0.44,11.29,9,9 +"857849",34137,"090.0 060.0",0,15.19,33.3456,5.764,100.7,251.7,0.426,0.136,0.34,2.17,0.02,0.06,0.09,NA,NA +"857885",34138,"090.0 070.0",0,15.769,33.3486,5.667,100.16,247.36,0.219,0.064,0.32,2,0.012,0.06,0.04,9,9 +"857919",34139,"090.0 080.0",0,15.824,33.3294,5.685,100.57,248.18,0.188,0.052,0.32,1.87,0.007,0.05,0.08,9,9 +"857949",34140,"090.0 090.0",0,16.062,33.3326,5.654,100.5,246.89,0.139,0.032,0.29,1.87,0.01,0,0,9,9 +"857980",34141,"090.0 100.0",0,16.331,33.3601,5.586,99.84,243.91,0.148,0.043,0.28,1.92,0.01,0.02,0,NA,NA +"858016",34142,"090.0 110.0",0,16.52,33.2869,5.595,100.33,244.3,0.107,0.044,0.28,1.92,0.011,0.05,0,9,9 +"858046",34143,"090.0 120.0",0,16.788,33.265,5.565,100.3,243.01,0.111,0.034,0.3,1.83,0.013,0.04,0.2,9,9 +"858080",34144,"091.7 026.4",0,16.133,33.6041,5.476,97.63,238.98,0.639,0.263,0.44,3.9,0.078,0.41,0.51,9,9 +"858087",34145,"093.3 026.7",0,16.247,33.5152,5.48,97.87,239.16,0.603,0.197,0.42,3.42,0.054,0.19,0.56,NA,NA +"858101",34146,"093.3 028.0",0,16.336,33.6163,5.504,98.54,240.11,0.533,0.243,0.4,3.3,0.057,0.27,0.7,9,9 +"858133",34147,"093.3 030.0",0,16.186,33.5948,5.468,97.59,238.55,0.51,0.21,0.42,3.02,0.08,0.35,0.3,9,9 +"858164",34148,"093.3 035.0",0,16.57,33.6505,5.426,97.61,236.71,0.433,0.207,0.43,3.6,0.094,0.49,0.14,9,9 +"858193",34149,"093.3 040.0",0,16.775,33.6934,5.297,95.7,231.12,0.523,0.302,0.47,3.96,0.187,0.74,0.08,9,9 +"858226",34150,"093.3 045.0",0,16.631,33.6719,5.474,98.6,238.83,0.602,0.308,0.38,3.24,0.081,0.09,0.04,NA,NA +"858261",34151,"093.3 050.0",0,16.394,33.6214,5.471,98.06,238.72,0.588,0.275,0.43,3.51,0.07,0.41,0.25,9,9 +"858292",34152,"093.3 055.0",0,15.671,33.4071,5.663,99.93,247.16,0.627,0.264,0.34,2.35,0.033,0.1,0.05,9,9 +"858323",34153,"093.3 060.0",0,15.695,33.3444,5.646,99.64,246.56,0.36,0.156,NA,2.11,0.027,0.04,0.07,9,9 +"858355",34154,"093.3 070.0",0,15.802,33.3548,5.664,100.17,247.32,0.22,0.065,0.3,1.96,0.011,0,0,9,9 +"858386",34155,"093.3 080.0",0,16.767,33.4159,5.544,99.97,242.07,0.173,0.053,0.39,1.99,0.02,0.07,3.14,NA,NA +"858421",34156,"093.3 090.0",0,16.188,33.3574,5.646,100.62,246.53,0.13,0.037,0.31,1.94,0.013,0,0.1,9,9 +"858451",34157,"093.3 100.0",0,16.97,33.4301,5.532,100.16,241.56,0.142,0.047,0.26,2.06,0.013,0.03,0,9,9 +"858482",34158,"093.3 110.0",0,16.655,33.3085,5.561,100,242.86,0.148,0.05,0.27,1.89,0.012,0.02,0.05,9,9 +"858513",34159,"093.3 120.0",0,17.628,33.6056,5.463,100.29,238.56,0.103,0.034,0.26,2.1,0.013,0.04,0.05,NA,NA +"858549",34160,"093.4 026.4",0,16.046,32.4654,5.863,103.64,256.06,1.027,0.464,1.11,8.17,0.446,1.61,2.17,9,9 +"858554",34161,"060.0 053.0",0,14.342,32.422,6.27,107.06,273.91,0.455,0.401,NA,NA,NA,NA,NA,9,9 +"858563",34162,"060.0 060.0",0,14.917,32.3625,6.019,103.95,262.87,0.147,0.035,NA,NA,NA,NA,NA,9,9 +"858588",34163,"060.0 070.0",0,14.887,32.716,5.971,103.28,260.74,0.131,0.026,NA,NA,NA,NA,NA,9,9 +"858613",34164,"060.0 080.0",0,14.693,32.7366,5.999,103.37,261.98,0.151,0.025,NA,NA,NA,NA,NA,9,9 +"858638",34165,"063.3 052.0",0,13.58,33.0351,7.323,123.56,319.75,1.709,0.572,NA,NA,NA,NA,NA,9,9 +"858648",34166,"063.3 055.0",0,13.328,33.033,7.112,119.37,310.56,0.074,0.023,NA,NA,NA,NA,NA,9,9 +"858664",34167,"063.3 060.0",0,13.544,33.0132,6.903,116.4,301.43,0.065,0.024,NA,NA,NA,NA,NA,9,9 +"858686",34168,"063.3 070.0",0,15.547,32.5768,5.972,104.59,260.93,0.097,0.036,NA,NA,NA,NA,NA,9,9 +"858709",34169,"063.3 080.0",0,15.787,32.7537,5.907,104.06,258.07,0.085,0.025,NA,NA,NA,NA,NA,9,9 +"858733",34170,"063.3 090.0",0,15.965,32.9637,5.811,102.86,253.39,0.077,0.019,NA,NA,NA,NA,NA,9,9 +"858758",34171,"066.7 050.0",0,12.48,33.2165,7.542,124.5,328.57,7.873,2.234,NA,NA,NA,NA,NA,9,9 +"858774",34172,"066.7 055.0",0,14.141,32.8255,6.439,109.77,281.28,0.09,0.028,NA,NA,NA,NA,NA,9,9 +"858799",34173,"066.7 060.0",0,14.128,32.38,6.231,105.9,272.32,0.124,0.033,NA,NA,NA,NA,NA,9,9 +"858822",34174,"066.7 070.0",0,16.104,32.9077,5.87,104.16,256.47,0.136,0.014,NA,NA,NA,NA,NA,9,9 +"858844",34175,"066.7 080.0",0,15.741,32.9809,5.806,102.33,253.16,0.09,0.022,NA,NA,NA,NA,NA,9,9 +"858867",34176,"066.7 090.0",0,15.453,32.9452,5.875,102.93,256.16,0.126,0.023,NA,NA,NA,NA,NA,9,9 +"858892",34177,"070.0 051.0",0,12.194,33.4586,5.803,95.36,252.75,2.305,0.481,NA,NA,NA,NA,NA,9,9 +"858913",34178,"070.0 055.0",0,13.508,32.8587,6.365,107.12,277.92,0.617,0.017,NA,NA,NA,NA,NA,9,9 +"858934",34179,"070.0 060.0",0,14.999,32.5261,6.185,107.1,270.13,0.151,0.055,NA,NA,NA,NA,NA,9,9 +"858955",34180,"070.0 070.0",0,15.563,32.9358,5.849,102.69,255.38,0.083,0.015,NA,NA,NA,NA,NA,9,9 +"858980",34181,"070.0 080.0",0,15.781,33.0307,5.785,102.07,252.69,0.065,0.014,NA,NA,NA,NA,NA,9,9 +"859001",34182,"070.0 090.0",0,15.517,33.0228,5.815,102.05,254,0.063,0.013,NA,NA,NA,NA,NA,9,9 +"859024",34183,"073.3 050.0",0,10.6,33.6558,4.578,72.79,199.69,1.202,0.456,NA,NA,NA,NA,NA,9,9 +"859029",34184,"073.3 055.0",0,12.483,33.4341,6.746,111.52,294.3,5.974,0.994,NA,NA,NA,NA,NA,9,9 +"859052",34185,"073.3 060.0",0,12.387,33.4584,6.626,109.33,289.19,4.339,1.267,NA,NA,NA,NA,NA,9,9 +"859075",34186,"073.3 070.0",0,14.534,32.912,5.95,102.3,259.79,0.151,0.054,NA,NA,NA,NA,NA,9,9 +"859098",34187,"073.3 080.0",0,15.312,32.9175,5.92,103.4,258.58,0.108,0.027,NA,NA,NA,NA,NA,9,9 +"859122",34188,"073.3 090.0",0,16.3,33.0604,5.764,102.77,251.71,0.051,0.012,NA,NA,NA,NA,NA,9,9 +"859147",34189,"076.7 049.0",0,11.978,33.5776,6.208,101.63,270.82,8.264,1.873,0.73,3.52,0.148,5.71,0.36,9,9 +"859159",34190,"076.7 051.0",0,12.443,33.251,5.728,94.51,249.98,1.845,0.561,0.81,8.08,0.352,6.78,0.44,9,9 +"859182",34191,"076.7 055.0",0,14.796,33.3128,5.959,103.26,260.05,0.347,0.157,0.37,1.62,0.008,0,0.01,9,9 +"859213",34192,"076.7 060.0",0,14.542,32.9013,6.093,104.77,266.01,0.344,0.084,NA,NA,NA,NA,NA,NA,NA +"859249",34193,"076.7 070.0",0,14.767,32.8615,5.959,102.91,260.24,0.123,0.042,0.29,1.73,0.012,0,0.28,9,9 +"859277",34194,"076.7 080.0",0,15.075,32.9138,5.915,102.82,258.3,0.122,0.01,0.3,1.79,0.005,0,0,9,9 +"859307",34195,"076.7 090.0",0,15.934,33.1266,5.77,102.17,252.01,0.114,0.007,0.28,1.95,0,0,0,9,9 +"859338",34196,"076.7 100.0",0,16.362,33.2319,5.664,101.22,246.95,0.062,0.023,0.22,1.64,0.01,0,0.06,NA,NA +"859375",34197,"080.0 050.5",0,13.083,33.6303,5.08,85.15,221.57,0.515,0.18,1.11,5.2,0.253,8.45,1.55,9,9 +"859381",34198,"080.0 051.0",0,12.92,33.6405,4.883,81.57,212.99,0.47,0.198,1.11,5.88,0.242,8.92,1.7,9,9 +"859392",34199,"080.0 055.0",0,12.412,33.3452,5.8,95.69,253.05,2.756,0.925,NA,NA,NA,NA,NA,9,9 +"859426",34200,"080.0 060.0",0,14.503,33.3252,5.881,101.31,256.69,0.675,0.219,0.41,2.1,0.071,0.48,0.17,9,9 +"859456",34201,"080.0 090.0",0,15.549,33.1671,5.895,103.62,257.35,0.204,0.039,0.31,2.08,0.003,0,0.01,9,9 +"859487",34202,"080.0 100.0",0,15.812,33.0434,5.778,102.02,252.24,0.073,0.014,0.33,1.74,0.014,0,1.57,9,9 +"859517",34203,"081.7 043.5",0,15.13,33.5721,6.578,114.94,286.91,0.871,0.167,0.44,1.23,0.047,0.8,0.58,9,9 +"859524",34204,"081.8 046.9",0,13.433,33.4774,6.942,117.1,303.21,2.799,0.922,0.32,0.72,0.07,0.57,0.24,NA,NA +"859559",34205,"083.3 039.4",0,15.111,33.5908,7.62,133.11,332.68,1.582,0.405,0.13,0.03,0.012,0,0.03,9,9 +"859566",34206,"083.3 040.6",0,15.372,33.5765,6.679,117.27,291.62,0.611,0.19,0.31,0.23,0.02,0,0.13,9,9 +"859575",34207,"083.3 042.0",0,14.178,33.5493,5.843,100.13,255.13,0.778,0.308,0.62,3.85,0.113,2.95,0.83,9,9 +"859588",34208,"083.3 051.0",0,13.404,33.5818,5.337,90.03,233.07,1.724,0.515,0.87,7.67,0.159,6.97,0.18,9,9 +"859602",34209,"083.3 055.0",0,14.701,33.3261,6.379,110.33,278.6,0.525,0.097,0.33,0.45,0.027,0.12,0.19,9,9 +"859634",34210,"083.3 060.0",0,14.134,33.4431,6.888,117.85,300.7,1.458,0.206,0.33,0.63,0.036,0.34,0.2,9,9 +"859664",34211,"083.3 070.0",0,16.438,33.1357,5.686,101.7,248.26,0.092,0.007,0.39,2.24,0.015,0.05,0.11,9,9 +"859693",34212,"083.3 080.0",0,16.069,33.2057,5.762,102.36,251.73,0.213,0.037,0.31,1.89,0,0,0,NA,NA +"859729",34213,"083.3 090.0",0,16.503,33.1374,5.689,101.89,248.52,0.065,0.01,0.29,2.24,0.018,0.09,0.01,9,9 +"859762",34214,"083.3 100.0",0,16.578,33.1173,5.713,102.46,249.56,0.08,0.018,0.29,3.07,0.01,0,0.21,9,9 +"859793",34215,"083.3 110.0",0,16.847,33.2991,5.609,101.23,244.96,0.066,0.011,0.24,2.24,0.007,0.11,0.08,9,9 +"859822",34216,"085.4 035.8",0,15.405,33.5405,6.398,112.39,279.34,1.139,0.411,0.38,1.34,0.026,0.01,0.23,9,9 +"859829",34217,"086.7 033.0",0,15.855,33.5624,6.519,115.56,284.55,1.427,0.332,0.38,2.13,0.012,0,0,9,9 +"859839",34218,"086.7 035.0",0,15.15,33.5687,6.335,110.73,276.53,0.677,0.272,0.49,4.37,0.058,0.47,0.35,9,9 +"859869",34219,"086.7 040.0",0,15.969,33.5355,6.123,108.77,267.31,0.477,0.118,0.27,0.23,0.01,0,0.03,NA,NA +"859906",34220,"086.7 045.0",0,14.333,33.4501,7.844,134.76,341.8,3.083,1.147,0.3,0.33,0.042,0.07,0.16,9,9 +"859936",34221,"086.7 050.0",0,14.565,33.401,7.071,122.02,308.74,2.216,0.847,0.28,0.46,0.041,0.12,0.05,9,9 +"859948",34222,"086.7 055.0",0,15.836,33.2502,5.907,104.48,257.51,0.242,0.059,0.32,1.28,0.013,0,0,9,9 +"859977",34223,"086.7 060.0",0,15.008,33.3087,6.066,105.56,264.93,0.452,0.107,0.35,1.79,0.026,0.1,0.13,9,9 +"860007",34224,"086.7 070.0",0,15.776,33.1373,5.78,102.04,252.45,0.183,0.028,0.3,2.08,0.006,0,0.01,NA,NA +"860043",34225,"086.7 080.0",0,15.627,33.205,5.793,102.01,252.96,0.234,0.034,0.32,1.77,0.027,0,0.03,9,9 +"860072",34226,"086.7 090.0",0,16.071,33.0944,5.692,101.05,248.61,0.091,0.016,0.29,1.93,0.007,0,0.01,9,9 +"860103",34227,"086.7 100.0",0,16.421,33.0824,5.691,101.72,248.61,0.092,0.025,0.29,2.18,0.02,0.09,0.13,9,9 +"860137",34228,"086.7 110.0",0,16.605,33.2738,5.627,101.06,245.81,0.07,0.012,0.28,1.93,0.006,0,0.02,NA,NA +"860173",34229,"086.8 032.5",0,15.339,33.5396,6.451,113.17,281.59,1.056,0.198,0.41,1.7,0.02,0.01,0.27,9,9 +"860180",34230,"088.5 030.1",0,15.834,33.5266,6.403,113.43,279.45,1.305,0.374,0.32,3.73,0.025,0,0.04,9,9 +"860185",34231,"090.0 027.7",0,16.457,33.5458,6.21,111.39,271.12,1.395,0.377,0.36,3.65,0.04,0.21,0,9,9 +"860190",34232,"090.0 028.0",0,16.453,33.5423,6.263,112.33,273.45,0.923,0.208,0.31,3.13,0.056,0,0,NA,NA +"860217",34233,"090.0 030.0",0,16.544,33.5513,6.273,112.72,273.87,0.655,0.129,0.31,3.4,0.024,0,0.01,9,9 +"860249",34234,"090.0 035.0",0,16.125,33.5312,5.898,105.1,257.48,0.338,0.12,0.33,1.97,0.014,0,0,9,9 +"860273",34235,"090.0 037.0",0,16.451,33.5349,5.928,106.31,258.81,0.23,0.067,0.4,0.85,0.024,0.04,1.33,9,9 +"860303",34236,"090.0 045.0",0,16.544,33.5331,5.831,104.76,254.58,0.348,0.066,0.36,1.97,0.018,0,0.02,9,9 +"860335",34237,"090.0 053.0",0,15.868,33.4149,5.718,101.3,249.61,0.146,0.037,0.33,2.38,0.019,0,0.03,NA,NA +"860372",34238,"090.0 060.0",0,15.685,33.4257,5.774,101.92,251.67,0.257,0.075,0.32,2.46,0.018,0,0.03,9,9 +"860403",34239,"090.0 070.0",0,15.744,33.3968,5.764,101.85,251.59,0.179,0.047,0.33,2.41,0.016,0,0.04,9,9 +"860435",34240,"090.0 080.0",0,15.982,33.2916,5.742,101.88,250.66,0.112,0.028,0.31,2.09,0.014,0,0.09,9,9 +"860467",34241,"090.0 090.0",0,15.64,33.2823,5.764,101.57,251.61,0.16,0.041,0.32,2.16,0.014,0,0.05,NA,NA +"860502",34242,"090.0 100.0",0,16.145,33.1722,5.72,101.74,249.93,0.076,0.014,0.27,1.93,0.017,0,0.08,9,9 +"860532",34243,"090.0 110.0",0,16.859,33.2967,5.591,100.93,244.25,0.058,0.012,0.24,1.97,0.017,0,0,9,9 +"860565",34244,"090.0 120.0",0,17.42,33.4651,5.585,102.03,243.86,0.056,0.015,0.25,1.95,0.019,0,0.15,9,9 +"860600",34245,"091.7 026.4",0,16.053,33.5314,6.072,108.04,265.13,1.294,0.372,0.39,2.59,0.027,0,0.98,9,9 +"860606",34246,"093.3 026.7",0,16.286,33.551,5.947,106.32,259.66,0.629,0.136,0.35,2.66,0.024,0,0.79,NA,NA +"860620",34247,"093.3 028.0",0,16.453,33.5286,6.06,108.68,264.57,0.486,0.122,0.29,2.13,0.025,0.02,0.09,9,9 +"860648",34248,"093.3 030.0",0,16.314,33.5159,5.808,103.87,253.61,0.235,0.05,0.39,2.14,0.019,0.04,1.61,9,9 +"860676",34249,"093.3 035.0",0,16.716,33.5177,5.67,102.21,247.58,0.145,0.035,0.3,2.29,0,0,0,9,9 +"860704",34250,"093.3 040.0",0,16.856,33.524,5.614,101.48,245.16,0.155,0.034,0.29,1.86,0.009,0,0.02,9,9 +"860736",34251,"093.3 045.0",0,16.298,33.5456,5.731,102.47,249.81,0.251,0.05,0.3,1.77,0.025,0,0,NA,NA +"860773",34252,"093.3 050.0",0,15.856,33.4821,5.812,102.98,253.58,0.415,0.073,0.33,1.44,0.02,0,0.03,9,9 +"860802",34253,"093.3 055.0",0,15.814,33.5044,5.866,103.87,255.93,0.377,0.097,0.37,1.05,0.012,0,1.16,9,9 +"860833",34254,"093.3 060.0",0,15.169,33.3511,5.851,102.18,255.36,0.335,0.132,0.34,2.16,0.015,0.02,0.02,9,9 +"860864",34255,"093.3 070.0",0,15.816,33.3845,5.726,101.32,249.9,0.116,0.031,0.31,2.28,0.017,0,0.02,9,9 +"860898",34256,"093.3 080.0",0,16.22,33.3342,5.66,100.92,247.07,0.078,0.017,0.29,2,0.025,0,0,NA,NA +"860933",34257,"093.3 090.0",0,16.273,33.2166,5.688,101.46,248.32,0.077,0.011,0.29,1.81,0.015,0,0.04,9,9 +"860964",34258,"093.3 100.0",0,16.736,33.2705,5.605,100.92,244.76,0.051,0.013,0.26,2.65,0.016,0,0.01,9,9 +"860996",34259,"093.3 110.0",0,16.636,33.2393,5.668,101.84,247.54,0.056,0.011,0.24,2.05,0.013,0,0,9,9 +"861030",34260,"093.3 120.0",0,17.52,33.572,5.551,101.67,242.35,0.066,0.013,0.25,1.95,0.015,0,0,NA,NA +"861068",34261,"093.4 026.4",0,16.788,33.5489,6.012,108.55,262.5,0.617,0.138,0.35,2.51,0.031,0.06,2.1,9,9 +"861075",34262,"076.7 080.0",0,16.781,32.903,5.695,102.41,248.71,0.142,0.018,0.24,0.94,0.011,0,0,9,9 +"861107",34263,"076.7 090.0",0,16.443,33.0039,5.768,103.1,251.9,0.221,0.049,0.28,1.3,0.02,0.05,0.01,NA,NA +"861143",34264,"080.0 050.5",0,14.877,33.5511,5.5,95.6,240.09,1.12,0.371,0.64,5.95,0.192,4.8,0.11,9,9 +"861150",34265,"080.0 051.0",0,13.932,33.5173,5.128,87.42,223.89,1.636,0.263,0.87,8.28,0.245,8.02,0.14,9,9 +"861161",34266,"080.0 055.0",0,13.131,33.5432,4.965,83.26,216.75,1.613,0.521,1.06,10.87,0.199,10.89,0.07,NA,NA +"861198",34267,"080.0 060.0",0,14.9,33.5731,5.878,102.23,256.53,2.584,0.885,0.56,6.16,0.148,3.2,0.52,9,9 +"861229",34268,"080.0 070.0",0,16.415,32.9252,5.717,102.08,249.67,0.146,0.058,0.52,1.22,0.013,0.01,0.05,9,9 +"861260",34269,"080.0 080.0",0,16.923,32.8922,5.626,101.44,245.73,0.118,0.026,0.27,1.27,0.017,0,0,NA,NA +"861296",34270,"080.0 090.0",0,17.084,32.9484,5.623,101.74,245.57,0.115,0.033,0.27,1.5,0.023,0.1,0,9,9 +"861327",34271,"080.0 100.0",0,17.692,32.9748,5.534,101.33,241.67,0.078,0.023,0.3,1.64,0.008,0,0.03,9,9 +"861360",34272,"081.7 043.5",0,19.439,33.5911,6.228,118.33,271.96,1.455,0.261,0.14,0.44,0.023,0,0,9,9 +"861367",34273,"081.8 046.9",0,19.136,33.6012,6.029,113.9,263.24,1.265,0.275,0.12,0.18,0.027,0,0.03,NA,NA +"861404",34274,"083.3 039.4",0,19.083,33.5575,6.12,115.48,267.27,2.267,0.591,0.19,1.91,0.048,0,0.08,9,9 +"861409",34275,"083.3 040.6",0,19.982,33.5922,5.848,112.24,255.37,0.611,0.116,0.16,0.75,0.007,0.02,0.08,9,9 +"861417",34276,"083.3 042.0",0,19.138,33.5831,5.827,110.08,254.44,1.777,0.399,0.19,1.45,0.018,0.03,0,9,9 +"861434",34277,"083.3 051.0",0,18.223,33.558,5.89,109.34,257.23,0.799,0.188,0.27,2.11,0.024,0,0,9,9 +"861445",34278,"083.3 055.0",0,16.283,33.5618,5.458,97.58,238.35,2.403,0.22,0.58,5.48,0.102,3.81,1.09,NA,NA +"861481",34279,"083.3 060.0",0,16.807,33.5926,5.637,101.84,246.15,1.863,0.335,0.4,3.61,0.081,1.58,0,9,9 +"861511",34280,"083.3 070.0",0,15.816,33.2779,5.842,103.3,255.08,0.492,0.173,0.32,1.15,0.035,0.2,0,9,9 +"861544",34281,"083.3 080.0",0,16.066,33.1321,5.845,103.78,255.25,0.426,0.098,0.31,1.02,0.043,0.23,0,9,9 +"861577",34282,"083.3 090.0",0,16.607,32.8911,5.664,101.5,247.45,0.115,0.034,0.26,0.82,0.016,0,0,NA,NA +"861615",34283,"083.3 100.0",0,17.597,32.965,5.54,101.25,241.92,0.078,0.016,0.31,1.43,0,0,0.04,9,9 +"861645",34284,"083.3 110.0",0,18.436,33.2221,5.456,101.49,238.19,0.073,0.015,0.25,1.73,0,0,0,9,9 +"861676",34285,"086.7 033.0",0,21.014,33.6155,5.736,112.21,250.45,0.596,0.134,0.13,1.65,0.024,0,0.05,9,9 +"861685",34286,"086.7 035.0",0,21.16,33.6169,5.663,111.08,247.27,0.307,0.084,0.11,1.02,0.009,0,0,9,9 +"861714",34287,"086.7 040.0",0,21.447,33.6494,5.444,107.36,237.71,0.283,0.071,0.2,1.42,0.023,0,0,NA,NA +"861752",34288,"086.7 045.0",0,20.294,33.6848,5.553,107.25,242.4,0.404,0.095,0.14,1.48,0.022,0,0,9,9 +"861782",34289,"086.7 050.0",0,16.475,33.5605,5.832,104.66,254.66,0.94,0.222,0.44,4.23,0.071,1.45,0.06,9,9 +"861795",34290,"086.7 055.0",0,16.408,33.6169,5.849,104.86,255.38,0.895,0.159,0.36,2.97,0.057,0.63,0.14,9,9 +"861824",34291,"086.7 060.0",0,15.644,33.3508,5.844,103.03,255.21,0.645,0.22,0.36,1.09,0.067,0.53,0.18,9,9 +"861854",34292,"086.7 070.0",0,16.44,33.2088,5.733,102.59,250.41,0.343,0.073,0.32,1.01,0.023,0.06,0.14,NA,NA +"861889",34293,"086.7 080.0",0,15.725,33.1067,5.903,104.08,257.86,0.413,0.124,0.32,1.1,0.051,0.09,0.12,9,9 +"861919",34294,"086.7 090.0",0,18.267,33.2707,5.445,100.99,237.84,0.092,0.022,0.31,1.91,0.004,0,0,9,9 +"861948",34295,"086.7 100.0",0,17.596,33.0228,5.547,101.41,242.36,0.095,0.025,0.26,1.43,0.012,0,0,NA,NA +"861983",34296,"086.7 110.0",0,17.648,32.9966,5.538,101.33,241.95,0.083,0.021,0.25,1.38,0.014,0,0,9,9 +"862014",34297,"086.8 032.5",0,21.973,33.649,5.532,110.14,241.5,0.75,0.153,0.09,1.55,0.017,0,0,9,9 +"862019",34298,"088.5 030.1",0,19.12,33.5544,5.81,109.7,253.67,0.978,0.289,0.29,4.04,0.017,0,0.01,9,9 +"862024",34299,"090.0 027.7",0,22.337,33.6428,5.581,111.84,243.6,0.708,0.187,0.15,1.96,0.013,0,0,9,9 +"862030",34300,"090.0 028.0",0,22.286,33.636,5.547,111.05,242.12,0.507,0.124,0.12,1.85,0.019,0,0,9,9 +"862040",34301,"090.0 030.0",0,23.225,33.7065,5.748,117.05,250.92,1.58,0.162,0.11,1.09,0.028,0.12,0.07,9,9 +"862070",34302,"090.0 035.0",0,19.326,33.5349,5.542,105.03,242.05,0.313,0.076,0.26,1.09,0.024,0,0.02,9,9 +"862095",34303,"090.0 037.0",0,19.478,33.5506,5.507,104.68,240.52,0.328,0.074,0.23,0.79,0.132,0,0.04,NA,NA +"862130",34304,"090.0 045.0",0,18.516,33.594,5.636,105.23,246.13,0.373,0.149,0.24,1.65,0.02,0.01,0.05,9,9 +"862160",34305,"090.0 053.0",0,17.118,33.6284,5.864,106.61,256.06,0.9,0.188,0.2,1.13,0.014,0,0,9,9 +"862189",34306,"090.0 060.0",0,16.383,33.1859,5.782,103.34,252.6,0.268,0.084,0.31,1.07,0.015,0,0,9,9 +"862219",34307,"090.0 070.0",0,17.916,33.125,5.498,101.2,240.21,0.091,0.015,0.27,1.9,0.011,0,0.01,NA,NA +"862254",34308,"090.0 080.0",0,18.458,33.2271,5.461,101.63,238.57,0.084,0.024,0.27,2.19,0.028,0.05,0.04,9,9 +"862283",34309,"090.0 090.0",0,18.606,33.2648,5.459,101.9,238.44,0.085,0.018,0.29,1.89,0.019,0,0.34,9,9 +"862317",34310,"090.0 100.0",0,19.039,33.3717,5.384,101.39,235.13,0.076,0.013,0.28,2.08,0.022,0,0,9,9 +"862345",34311,"090.0 110.0",0,18.929,33.3451,5.417,101.79,236.64,0.08,0.019,0.27,1.6,0.021,0,0.01,NA,NA +"862382",34312,"090.0 120.0",0,19.015,33.3343,5.44,102.38,237.59,0.068,0.014,0.24,2.06,0.016,0,0.19,9,9 +"862412",34313,"091.7 026.4",0,23.261,33.6953,5.773,117.63,252.17,0.692,0.102,0.17,0.03,0.033,0,0.5,9,9 +"862419",34314,"093.3 026.7",0,22.834,33.6898,5.808,117.45,253.69,0.795,0.156,0.1,0.44,0.036,0,0.04,NA,NA +"862434",34315,"093.3 028.0",0,22.607,33.672,5.818,117.17,254.05,0.626,0.156,0.54,0.68,0.031,0.14,1.34,9,9 +"862462",34316,"093.3 030.0",0,22.162,33.6549,5.933,118.53,259.16,0.733,0.127,0.13,0.31,0.031,0.1,0.63,9,9 +"862492",34317,"093.3 035.0",0,21.016,33.6813,5.891,115.29,257.36,0.692,0.159,0.08,1.1,0.021,0,0.09,9,9 +"862520",34318,"093.3 040.0",0,18.755,33.6042,5.582,104.7,243.89,0.38,0.106,0.22,1.3,0.022,0,0.13,9,9 +"862550",34319,"093.3 045.0",0,19.95,33.6328,5.619,107.8,245.47,0.377,0.091,0.27,1.81,0,0.07,1.35,NA,NA +"862586",34320,"093.3 050.0",0,19.163,33.6074,5.515,104.25,240.89,0.416,0.111,0.24,2.39,0,0,0.01,9,9 +"862618",34321,"093.3 055.0",0,16.789,33.6395,5.871,106.06,256.45,1.645,0.343,0.26,1.09,0.021,0,0.32,9,9 +"862649",34322,"093.3 060.0",0,16.577,33.5687,5.878,105.7,256.73,1.565,0.583,0.29,0.59,0.011,0,0.02,9,9 +"862678",34323,"093.3 070.0",0,16.267,33.3317,5.873,104.82,256.66,0.367,0.116,0.29,0.8,0.027,0,0.05,NA,NA +"862713",34324,"093.3 080.0",0,17.072,33.0177,5.673,102.66,247.88,0.111,0.03,0.28,1.52,0.021,0,0.06,9,9 +"862743",34325,"093.3 090.0",0,18.79,33.3262,5.418,101.53,236.61,0.067,0.015,0.3,1.87,0.014,0.07,0.53,9,9 +"862772",34326,"093.3 100.0",0,19.42,33.5317,5.344,101.46,233.52,0.077,0.023,0.22,2.23,0.004,0.18,0,9,9 +"862803",34327,"093.3 110.0",0,19.184,33.364,5.375,101.49,234.85,0.059,0.013,0.27,1.94,0.033,0.14,0.19,NA,NA +"862838",34328,"093.3 120.0",0,19.669,33.5736,5.329,101.67,232.71,0.061,0.019,0.2,1.83,0.029,0.19,0.02,9,9 +"862871",34329,"093.4 026.4",0,21.591,33.6925,6.095,120.54,266.27,3.53,0.631,0.21,2.67,0.055,0.06,0.1,9,9 +"862875",34330,"076.7 049.0",0,13.949,33.2789,5.613,95.58,245.17,4.98,0.925,0.53,4.8,0.191,3.86,0.28,9,9 +"862885",34331,"076.7 051.0",0,14.793,33.2758,6.29,108.96,274.72,7.037,0.535,0.34,0.86,0.031,0.13,0.06,9,9 +"862906",34332,"076.7 055.0",0,16.034,33.2674,5.86,104.06,255.97,2.188,0.271,0.3,1.7,0.047,0.34,0.6,9,9 +"862935",34333,"076.7 060.0",0,15.765,33.3531,5.871,103.76,256.48,3.028,0.326,0.27,0.98,0.04,0.17,0.02,9,9 +"862965",34334,"076.7 070.0",0,16.475,33.1253,5.662,101.34,247.32,0.295,0.089,0.26,0.98,0.014,0.03,0.08,NA,NA +"863002",34335,"076.7 080.0",0,16.779,32.8196,5.657,101.67,247.13,0.265,0.082,0.23,1.56,0.021,0.1,0,9,9 +"863031",34336,"076.7 090.0",0,17.513,32.811,5.521,100.65,241.19,0.179,0.04,0.21,1.35,0.008,0.02,0,9,9 +"863062",34337,"076.7 100.0",0,18.647,33.2522,5.383,100.55,235.08,0.13,0.024,0.18,1.78,0.019,0.03,0,9,9 +"863090",34338,"080.0 050.5",0,14.94,33.3735,5.386,93.64,235.26,1.439,0.311,0.58,4.7,0.141,3.12,0.1,9,9 +"863096",34339,"080.0 051.0",0,15.122,33.3685,5.406,94.33,236.08,1.789,0.071,0.54,4.19,0.161,2.62,0.03,9,9 +"863106",34340,"080.0 055.0",0,15.032,33.4011,5.509,95.97,240.57,3.129,0.508,0.5,3.31,0.128,2.3,0.05,9,9 +"863136",34341,"080.0 060.0",0,14.916,33.3973,5.569,96.78,243.18,3.202,0.608,0.49,3.13,0.135,2.63,0.28,NA,NA +"863172",34342,"080.0 070.0",0,16.182,33.4021,5.691,101.44,248.51,1.385,0.204,0.27,0.42,0.061,0.12,0,9,9 +"863202",34343,"080.0 080.0",0,16.411,33.2259,5.693,101.83,248.63,0.347,0.079,0.25,0.84,0.018,0.01,0.01,9,9 +"863233",34344,"080.0 090.0",0,17.046,33.0509,5.607,101.44,244.89,0.196,0.056,0.22,0.68,0.019,0,0.01,9,9 +"863263",34345,"080.0 100.0",0,17.698,33.0107,5.511,100.95,240.73,0.155,0.042,0.23,1.45,0.042,0.04,0.04,NA,NA +"863298",34346,"081.7 043.5",0,17.038,33.3956,5.814,105.39,253.96,1.228,0.242,0.27,2.29,0.033,0.21,0.06,9,9 +"863303",34347,"081.8 046.9",0,17.515,33.4245,5.635,103.11,246.12,1.238,0.047,0.27,1.82,0.017,0.05,0.01,9,9 +"863335",34348,"083.3 039.4",0,16.913,33.3949,5.854,105.85,255.65,4.672,0.714,0.45,3.46,0.073,0.09,0,9,9 +"863341",34349,"083.3 040.6",0,17.066,33.3943,5.786,104.94,252.72,1.535,0.279,0.3,2.2,0.04,0,0.05,9,9 +"863348",34350,"083.3 042.0",0,17.093,33.4151,5.613,101.86,245.1,1.175,0.297,0.32,2.83,0.068,0.91,0.08,NA,NA +"863367",34351,"083.3 051.0",0,14.442,33.4196,5.075,87.37,221.6,1.128,0.377,0.75,6.79,0.169,6.29,0.24,9,9 +"863382",34352,"083.3 055.0",0,16.237,33.4054,5.512,98.36,240.69,0.868,0.204,0.38,1.73,0.139,1.43,0.08,9,9 +"863413",34353,"083.3 060.0",0,16.11,33.4138,5.715,101.73,249.62,1.585,0.322,0.35,1.08,0.066,0.77,0.1,9,9 +"863448",34354,"083.3 070.0",0,16.705,33.4112,5.606,100.97,244.85,0.632,0.141,0.24,0.76,0.04,0.17,0.22,NA,NA +"863484",34355,"083.3 080.0",0,17.883,33.2284,5.486,100.98,239.58,0.19,0.023,0.2,1.39,0.009,0.08,0.03,9,9 +"863514",34356,"083.3 090.0",0,17.875,33.301,5.486,101.01,239.59,0.235,0.05,0.26,1.08,0.012,0.01,0.02,9,9 +"863545",34357,"083.3 100.0",0,17.467,33.0797,5.586,101.91,244,0.2,0.054,0.22,0.48,0.013,0,0.02,9,9 +"863574",34358,"083.3 110.0",0,18.192,33.0803,5.477,101.32,238.93,0.141,0.03,0.22,1.36,0.005,0,0,NA,NA +"863610",34359,"085.4 035.8",0,15.857,33.307,5.537,98.01,241.78,0.959,0.408,0.45,4.26,0.19,1.16,0.78,9,9 +"863616",34360,"086.7 033.0",0,19.068,33.4466,5.521,104.08,241.09,0.323,0.068,0.22,1.68,0.014,0.01,0,9,9 +"863626",34361,"086.7 035.0",0,19.388,33.4584,5.431,103,237.16,0.2,0.041,0.24,1.81,0.019,0.04,0,9,9 +"863656",34362,"086.7 040.0",0,18.433,33.3812,5.631,104.84,245.91,0.448,0.1,0.21,1.39,0.018,0,0.14,9,9 +"863685",34363,"086.7 045.0",0,17.997,33.4319,5.542,102.36,241.95,0.357,0.05,0.26,1.37,0.017,0.05,0.02,NA,NA +"863721",34364,"086.7 050.0",0,18.303,33.4433,5.523,102.61,241.13,0.329,0.08,0.26,1.34,0.018,0.01,0.03,9,9 +"863734",34365,"086.7 055.0",0,18.675,33.3509,5.435,101.64,237.32,0.184,0.032,0.26,1.33,0.018,0.25,0.13,9,9 +"863765",34366,"086.7 060.0",0,19.393,33.4379,5.335,101.18,232.9,0.155,0.03,0.24,1.63,0.007,0.01,0,9,9 +"863795",34367,"086.7 070.0",0,17.788,33.2551,5.508,101.21,240.53,0.193,0.048,0.24,0.64,0.016,0,0,9,9 +"863830",34368,"086.7 080.0",0,17.897,33.2035,5.496,101.17,239.99,0.21,0.034,0.25,1.16,0.034,0.05,0,NA,NA +"863865",34369,"086.7 090.0",0,17.869,33.3661,5.517,101.61,240.91,0.248,0.055,0.28,0.97,0.017,0,0,9,9 +"863895",34370,"086.7 100.0",0,17.785,33.0965,5.537,101.64,241.83,0.167,0.053,0.25,1.01,0.012,0.01,0.01,9,9 +"863924",34371,"086.7 110.0",0,19.102,33.2215,5.345,100.69,233.41,0.101,0.02,0.23,1.91,0.023,0.14,0.03,9,9 +"863953",34372,"086.8 032.5",0,19.087,33.4355,5.537,104.41,241.77,0.569,0.115,0.22,1.79,0.018,0.07,0.05,9,9 +"863959",34373,"088.5 030.1",0,18.087,33.37,5.994,110.86,261.76,1.034,0.243,0.19,1.77,0.03,0,0,9,9 +"863964",34374,"090.0 027.7",0,18.984,33.404,5.75,108.19,251.09,0.668,0.125,0.17,1.23,0.029,0,0.01,9,9 +"863969",34375,"090.0 028.0",0,19.166,33.3808,5.548,104.74,242.28,0.289,0.054,0.2,1.44,0.023,0,0.03,9,9 +"863980",34376,"090.0 030.0",0,19.593,33.4921,6.019,114.62,262.82,1.269,0.062,0.21,1.66,0.016,0.04,0,NA,NA +"864016",34377,"090.0 035.0",0,19.2,33.3951,5.776,109.12,252.26,0.484,0.079,0.1,0.81,0.021,0,0,9,9 +"864040",34378,"090.0 037.0",0,19.299,33.4259,5.471,103.57,238.92,0.228,0.044,0.2,1.58,0.022,0,0,9,9 +"864072",34379,"090.0 045.0",0,19.722,33.4543,5.373,102.54,234.63,0.215,0.039,0.23,1.63,0.019,0.03,0,9,9 +"864102",34380,"090.0 053.0",0,19.18,33.3431,5.359,101.17,233.99,0.133,0.025,0.23,1.41,0.017,0.01,0.01,9,9 +"864133",34381,"090.0 060.0",0,18.486,33.4318,5.438,101.38,237.45,0.183,0.037,0.27,1.44,0.03,0.08,0.01,NA,NA +"864168",34382,"090.0 070.0",0,18.377,33.3648,5.446,101.28,237.82,0.186,0.036,0.28,1.18,0.024,0,0,9,9 +"864204",34383,"090.0 080.0",0,17.838,33.3757,5.513,101.48,240.75,0.191,0.049,0.29,0.87,0.004,0,0,9,9 +"864232",34384,"090.0 090.0",0,18.037,33.282,5.471,101.03,238.93,0.191,0.035,0.26,1.01,0.02,0.03,0.09,9,9 +"864286",34385,"090.0 100.0",0,19.132,33.1957,5.374,101.28,234.66,0.123,0.022,0.23,1.69,0.017,0.1,0.12,NA,NA +"864322",34386,"090.0 110.0",0,19.478,33.3129,5.295,100.51,231.22,0.097,0.018,0.22,1.71,0.018,0.01,0,9,9 +"864353",34387,"090.0 120.0",0,19.197,33.1344,5.379,101.46,234.9,0.099,0.021,0.25,1.59,0.018,0.13,1.05,9,9 +"864386",34388,"091.7 026.4",0,19.176,33.4142,5.651,106.72,246.7,0.447,0.09,0.19,1.32,0.022,0.02,0.15,9,9 +"864391",34389,"093.3 026.7",0,19.078,33.4167,5.677,107.02,247.88,0.35,0.062,0.19,1.99,0.025,0.22,0.04,NA,NA +"864410",34390,"093.3 028.0",0,19.775,33.4484,5.438,103.88,237.44,0.216,0.026,0.2,1.11,0.019,0.01,0.07,9,9 +"864440",34391,"093.3 030.0",0,19.503,33.4704,5.537,105.25,241.75,0.306,0.057,0.2,1.57,0.016,0,0.07,9,9 +"864475",34392,"093.3 035.0",0,19.067,33.4278,5.439,102.52,237.5,0.221,0.032,0.23,1.08,0.017,0,0,9,9 +"864505",34393,"093.3 040.0",0,19.158,33.4875,5.427,102.5,236.98,0.3,0.029,0.27,2.52,0.025,0.43,0.19,9,9 +"864539",34394,"093.3 045.0",0,19.398,33.5087,5.387,102.22,235.23,0.251,0.02,0.25,2.16,0.016,0.16,0.2,NA,NA +"864576",34395,"093.3 050.0",0,19.156,33.3548,5.372,101.38,234.58,0.147,0.029,0.26,1.93,0.024,0.19,0.07,9,9 +"864605",34396,"093.3 055.0",0,20.182,33.5335,5.231,100.73,228.4,0.143,0.026,0.26,2.01,0.018,0.12,0.79,9,9 +"864636",34397,"093.3 060.0",0,19.56,33.3797,5.321,101.2,232.34,0.192,0.039,0.25,1.58,0.02,0,0.03,9,9 +"864668",34398,"093.3 070.0",0,17.958,33.3798,5.492,101.33,239.82,0.269,0.064,0.3,1.33,0.02,0.01,0.17,NA,NA +"864703",34399,"093.3 080.0",0,18.457,33.1162,5.439,101.15,237.54,0.163,0.003,0.24,1.17,0.02,0,0.04,9,9 +"864732",34400,"093.3 090.0",0,17.923,33.2135,5.526,101.78,241.29,0.219,0.049,0.26,1.06,0.025,0.17,0.06,9,9 +"864763",34401,"093.3 100.0",0,17.92,33.1401,5.487,101.02,239.63,0.169,0.041,0.23,0.82,0.017,0,0.01,9,9 +"864796",34402,"093.3 110.0",0,19.39,33.3005,5.316,100.73,232.15,0.105,0.024,0.21,1.63,0.008,0.03,0,9,9 +"864828",34403,"093.3 120.0",0,19.556,33.2875,5.29,100.54,230.97,0.089,0.02,0.21,2.25,0.023,0.27,0.05,9,9 +"864859",34404,"093.4 026.4",0,18.744,33.4083,5.805,108.74,253.47,0.905,0.176,0.22,1.77,0.029,0.1,0.02,9,9 diff --git a/google-drive/week06/4Thurs/ChatGPT.Rmd b/google-drive/week06/4Thurs/ChatGPT.Rmd new file mode 100644 index 0000000..945655c --- /dev/null +++ b/google-drive/week06/4Thurs/ChatGPT.Rmd @@ -0,0 +1,293 @@ +--- +title: "ChatGPT & R" +author: "Katelyn Queen" +date: "2023-07-17" +output: html_document +--- + +```{r setup, include=FALSE} +knitr::opts_chunk$set(echo = TRUE) +``` + +## ChatGPT + +ChatGPT is an artificial intelligence model by OpenAI. Here's what they have to say about it: "We’ve trained a model called ChatGPT which interacts in a conversational way. The dialogue format makes it possible for ChatGPT to answer followup questions, admit its mistakes, challenge incorrect premises, and reject inappropriate requests." + +Many other chat bots already exist and more are being released, however, according to an analysis by Swiss bank UBS, ChatGPT is the fastest-growing app of all time, reaching 100 million users just two months after it's release. + +There are many ways to interface chatGPT with R. Today we will use the "gptstudio" package to use it as an RStudio addin. + +```{r} + +if (!require(gptstudio)) {install.packages("gptstudio"); library(gptstudio)} + +``` + +Once the package is installed click the "Addins" button and option "ChatGPT". The console will then prompt you with the following: +! OPENAI_API_KEY is not set. +Do you want to set the OPENAI_API_KEY for this session? +Type the number to set the OPENAI and you will be asked to enter your ChatGPT API key. + +To get an API key, create a ChatGPT account at https://beta.openai.com/signup. Then go to your account settings, "View API Keys" and click "Create new secret key". Paste your created key into the console. Then the ChatGPT window should launch in the Viewer pane. + +This version of ChatGPT does not have real-time information available. It will only assist with R programming. + +## Titanic + +Let's use ChatGPT to do an analysis on the survival of passengers from the Titanic. There is an example dataset "Titanic", which contains "information on the fate of passengers on the fatal maiden voyage of the ocean liner ‘Titanic’, summarized according to economic status (class), sex, age and survival." + +The package "titanic" has this data in a long format, making it easier to use for modelling. + +First, let's download and look at the structure of the training data. + +```{r} + +if (!require(titanic)) {install.packages("titanic"); library(titanic)} + +str(titanic_train) + +``` + +Say now that we want to look at the distribution of these classes of the passengers but don't know how. Let's ask ChatGPT. Start simple - "How do I look at the frequencies of passenger classes on the titanic?" + +```{r} + +class_freq <- table(titanic_train$Pclass) +class_freq + + +``` + +Now let's do a visualization of the same data! - "How do I look at the distribution of passenger classes on the titanic?" + +```{r} + +library(ggplot2) + +# Create the bar plot +ggplot(data = titanic_train, aes(x = Pclass)) + + geom_bar(fill = "steelblue") + + labs(title = "Distribution of Passenger Classes on the Titanic", + x = "Passenger Class", + y = "Frequency") + +``` + +What if I want to add the counts from the table to bars? - "How do I add the class counts to the graph?" + +```{r} + +# Create a summary table of passenger class frequencies +class_freq <- table(titanic_train$Pclass) + +# Create a bar plot with class counts +ggplot(titanic_train, aes(x = Pclass)) + + geom_bar() + + geom_text(stat = "count", aes(label = after_stat(count)), vjust = -0.5) + + labs(x = "Passenger Class", y = "Count") + +``` + + + +Now let's look at if passenger class is related to survival. Let's start with a visualization. - "How do I look at the distribution of passenger classes on the titanic by survival status?" + +```{r} + +titanic_train$Survived <- as.factor(titanic_train$Survived) + +# Create a stacked bar plot of passenger class distribution by survival status +ggplot(titanic_train, aes(x = Pclass, fill = Survived)) + + geom_bar() + + labs(x = "Passenger Class", y = "Count", fill = "Survived") + + scale_fill_manual(values = c("red", "green"), labels = c("No", "Yes")) + +``` + +Those colors are a little bright. Let's change the colors to something a little darker and add a title. - "Change the fill colors to dark red and dark green and add a title." + +```{r} + +# Create a stacked bar plot of passenger class distribution by survival status with title +ggplot(titanic_train, aes(x = Pclass, fill = Survived)) + + geom_bar() + + labs(x = "Passenger Class", y = "Count", fill = "Survived") + + scale_fill_manual(values = c("#8B0000", "#006400"), labels = c("No", "Yes")) + + ggtitle("Distribution of Passenger Classes on the Titanic by Survival Status") + +``` + +Finally, let's add the count values for each class and survival status. - "Add count values to the plot" + +```{r} +# Create a summary table of passenger class and survival status frequencies +class_survival_freq <- table(titanic_train$Pclass, titanic_train$Survived) + +# Convert the summary table to a data frame +class_survival_df <- as.data.frame(class_survival_freq) + +# Rename the columns for clarity +colnames(class_survival_df) <- c("Pclass", "Survived", "Count") + +# Create a stacked bar plot of passenger class distribution by survival status with count values +ggplot(class_survival_df, aes(x = Pclass, y = Count, fill = Survived)) + + geom_bar(stat = "identity", position = "stack") + + geom_text(aes(label = Count), position = position_stack(vjust = 0.5), color = "black", size = 3) + + labs(x = "Passenger Class", y = "Count", fill = "Survived") + + scale_fill_manual(values = c("#8B0000", "#006400"), labels = c("No", "Yes")) + + ggtitle("Distribution of Passenger Classes on the Titanic by Survival Status") + + +``` + + +Now let's test if there is a statistically significant difference in survival rates by passenger class - "How do I test for a difference in survival rates on the Titanic by passenger class?" + +```{r} + +# Perform the chi-square test +chi_square_test <- chisq.test(titanic_train$Survived, titanic_train$Pclass) + +# Display the test results +chi_square_test + +``` + +There is a difference! But a chi-square test doesn't identify directionality, just that there is a difference. Let's write a model for this relationship - "How do I model the difference in survival rates on the Titanic by passenger class?" + +```{r} + +# Fit the logistic regression model +model <- glm(Survived ~ Pclass, data = titanic_train, family = binomial()) + +# Print the model summary +summary(model) + +``` + +Since the estimate for passenger class is negative, we can say that odds of survival decrease as a passenger's class increases. + +Now, let's focus on predicting survival. How can I make the best model at predicting passenger survival based on the variables I have? - "How can I write a predictive model passenger survival on the titanic using the titanic_train data from the titanic package?" + +```{r} + +set.seed(123) # Set random seed for reproducibility +train_indices <- sample(1:nrow(titanic_train), nrow(titanic_train)*0.7) # 70% for training +train_data <- titanic_train[train_indices, ] +test_data <- titanic_train[-train_indices, ] + +# Fit a logistic regression model +model <- glm(Survived ~ Pclass + Sex + Age + Fare, + data = train_data, + family = binomial) + +# Make predictions on the test set +pred <- predict(model, newdata = test_data, type = "response") + +# Convert probabilities to binary (1 for survival, 0 for non-survival) +pred_binary <- ifelse(pred > 0.5, 1, 0) + +# Evaluate the model performance +accuracy <- sum(pred_binary == test_data$Survived) / length(test_data$Survived) + +### OWN CODE +pred_binary.v2 <- pred_binary[which(!is.na(pred_binary))] +true_survived <- test_data$Survived[which(!is.na(pred_binary))] +accuracy <- sum(pred_binary.v2 == true_survived) / length(true_survived) + +summary(model) +accuracy + +``` + +That is one model, but now I want to do variable selection so that I have the most predictive model possible. - "How to do variable selection for modelling passenger survival on the titanic using the titanic_train data from the titanic package?" + +Step 1: Univariate analysis +Step 2: Correlation analysis +Step 3: Step-wise selection + +Let's do step one for numeric variables - "How do I test for a statistical association between a numeric and a binary variable?" + +```{r} + +str(titanic_train) + +t.test(titanic_train$Age ~ titanic_train$Survived) +wilcox.test(titanic_train$SibSp ~ titanic_train$Survived) +wilcox.test(titanic_train$Parch ~ titanic_train$Survived) +t.test(titanic_train$Fare ~ titanic_train$Survived) + +``` + +Now let's look at our categorical variables. "How do I test for a statistical association between two categorical variables?" + +```{r} + +str(titanic_train) + +chisq.test(table(titanic_train$Survived, as.factor(titanic_train$Pclass))) +chisq.test(table(titanic_train$Survived, as.factor(titanic_train$Sex))) +chisq.test(table(titanic_train$Survived, as.factor(titanic_train$Embarked))) + +``` + +Great, let's move on to step 2: correlation analysis. - "How do I check for correlation between predictor variables for logistic regression?" + +```{r} + +cor(titanic_train[complete.cases(titanic_train), c("Age", "SibSp", "Parch", "Fare")]) + +``` + +Now that we have a list of possible predictors, we are ready to move on to actually selecting variables and creating a final model. - "How do I do stepwise logistic regression?" + +```{r} + +# Create a logistic regression model using all predictor variables +full_model <- glm(Survived ~ as.factor(Pclass) + as.factor(Sex) + Age + SibSp + Parch + Fare + as.factor(Embarked), + data = titanic_train, family = "binomial") + +# Perform stepwise logistic regression +stepwise_model <- step(full_model, direction = "both") + +summary(stepwise_model) + +``` + +Finally, lets create a table showing the odds ratios and 95% confidence intervals of our final model. - "Create a table of odds ratios and 95% confidence interval from logistic regression" + +```{r} + +# Obtain odds ratios and confidence intervals +odds_ratios <- exp(coef(stepwise_model)) +conf_intervals <- exp(confint(stepwise_model)) + +# Combine odds ratios and confidence intervals into a table +results_table <- cbind(odds_ratios, conf_intervals) +results_table + +``` + + +## Challenge Problem + +You will be using the CalCOFI data to model the association between water temperature and salinity. The full dataset comes from here - https://www.kaggle.com/datasets/sohier/calcofi?resource=download, but for today, you will be using a cross-sectional piece of the data from 2016. + +Context on the data: +"The CalCOFI data set represents the longest (1949-present) and most complete (more than 50,000 sampling stations) time series of oceanographic and larval fish data in the world. It includes abundance data on the larvae of over 250 species of fish; larval length frequency data and egg abundance data on key commercial species; and oceanographic and plankton data. The physical, chemical, and biological data collected at regular time and space intervals quickly became valuable for documenting climatic cycles in the California Current and a range of biological responses to them. CalCOFI research drew world attention to the biological response to the dramatic Pacific-warming event in 1957-58 and introduced the term “El Niño” into the scientific literature. + +The California Cooperative Oceanic Fisheries Investigations (CalCOFI) are a unique partnership of the California Department of Fish & Wildlife, NOAA Fisheries Service and Scripps Institution of Oceanography. The organization was formed in 1949 to study the ecological aspects of the sardine population collapse off California. Today our focus has shifted to the study of the marine environment off the coast of California, the management of its living resources, and monitoring the indicators of El Nino and climate change. CalCOFI conducts quarterly cruises off southern & central California, collecting a suite of hydrographic and biological data on station and underway. Data collected at depths down to 500 m include: temperature, salinity, oxygen, phosphate, silicate, nitrate and nitrite, chlorophyll, transmissometer, PAR, C14 primary productivity, phytoplankton biodiversity, zooplankton biomass, and zooplankton biodiversity." + +Further information about each of the columns can be found here - https://calcofi.com/index.php?option=com_content&view=article&id=77:database-tables&catid=73&Itemid=993. Note that many columns have been removed in your version of the dataset due to time constraints. + +Your job is to determine the association between water temperature (X, column name T_degC) in degrees celcius and water salinity (Y, column name Salnty) in g/kg. Consider potential confounders and effect modifiers, and check the assumptions of your model. Also create a visualization for the relationship. + +```{r} + +# read in the data +cofi <- read.csv("CalCOFI_2016.csv") +summary(cofi) + +``` + + diff --git a/google-drive/week06/4Thurs/ChatGPT_Lab.Rmd b/google-drive/week06/4Thurs/ChatGPT_Lab.Rmd new file mode 100644 index 0000000..0b9953a --- /dev/null +++ b/google-drive/week06/4Thurs/ChatGPT_Lab.Rmd @@ -0,0 +1,171 @@ +--- +title: "ChatGPT & R" +author: "Katelyn Queen" +date: "2023-07-17" +output: html_document +--- + +```{r setup, include=FALSE} +knitr::opts_chunk$set(echo = TRUE) +``` + +## ChatGPT + +ChatGPT is an artificial intelligence model by OpenAI. Here's what they have to say about it: "We’ve trained a model called ChatGPT which interacts in a conversational way. The dialogue format makes it possible for ChatGPT to answer followup questions, admit its mistakes, challenge incorrect premises, and reject inappropriate requests." + +Many other chat bots already exist and more are being released, however, according to an analysis by Swiss bank UBS, ChatGPT is the fastest-growing app of all time, reaching 100 million users just two months after it's release. + +There are many ways to interface chatGPT with R. Today we will use the "gptstudio" package to use it as an RStudio addin. + +```{r} + +if (!require(gptstudio)) {install.packages("gptstudio"); library(gptstudio)} + +``` + +Once the package is installed click the "Addins" button and option "ChatGPT". The console will then prompt you with the following: +! OPENAI_API_KEY is not set. +Do you want to set the OPENAI_API_KEY for this session? +Type the number to set the OPENAI and you will be asked to enter your ChatGPT API key. + +To get an API key, create a ChatGPT account at https://beta.openai.com/signup. Then go to your account settings, "View API Keys" and click "Create new secret key". Paste your created key into the console. Then the ChatGPT window should launch in the Viewer pane. + +This version of ChatGPT does not have real-time information available. It will only assist with R programming. + +## Titanic + +Let's use ChatGPT to do an analysis on the survival of passengers from the Titanic. There is an example dataset "Titanic", which contains "information on the fate of passengers on the fatal maiden voyage of the ocean liner ‘Titanic’, summarized according to economic status (class), sex, age and survival." + +The package "titanic" has this data in a long format, making it easier to use for modelling. + +First, let's download and look at the structure of the training data. The library is called titanic, and the data titanic_train. + +```{r} + +if (!require(titanic)) {install.packages("titanic"); library(titanic)} + +str(titanic_train) + +``` + +Say now that we want to look at the distribution of these classes of the passengers but don't know how. Let's ask ChatGPT. Be sure to be specific in your prompting. + +```{r} + + +``` + +Now let's do a visualization of the same data! + +```{r} + + +``` + +What if I want to add the counts from the table to bars? + +```{r} + +``` + + +Now let's look at if passenger class is related to survival. Let's start with a visualization. + +```{r} + +``` + +Those colors are a little bright. Let's change the colors to something a little darker and add a title. + +```{r} + +``` + +Finally, let's add the count values for each class and survival status. + +```{r} + +``` + + +Now let's test if there is a statistically significant difference in survival rates by passenger class. + +```{r} + +``` + +What are the results of the test? + +A chi-square test doesn't identify directionality, just whether there is or is not a difference in one variable based on the value of the other. Let's write a model for this relationship instead. + +```{r} + +``` + +Since the estimate for passenger class is ________, we can say that odds of survival _______ as a passenger's class increases. + +Now, let's focus on predicting survival. How can I make the best model at predicting passenger survival based on the variables I have? + +```{r} + +``` + +That is one model, but now I want to do variable selection so that I have the most predictive model possible. Fill in the steps below based on ChatGPT's response. + ++ Step 1: ++ Step 2: ++ Step 3: + +Let's do step one for numeric variables. + +```{r} + +``` + +Now let's look at our categorical variables. + +```{r} + +``` + +Great, let's move on to step 2: correlation analysis. + +```{r} + +``` + +Now that we have a list of possible predictors, we are ready to move on to actually selecting variables and creating a final model. Be sure to factor all categorical variables so that they are modelled correctly. + +```{r} + +``` + +Finally, lets create a table showing the odds ratios and 95% confidence intervals of our final model. + +```{r} + +``` + + +## Challenge Problem + +You will be using the CalCOFI data to model the association between water temperature and salinity. The full dataset comes from here - https://www.kaggle.com/datasets/sohier/calcofi?resource=download, but for today, you will be using a cross-sectional piece of the data from 2016. + +Context on the data: +"The CalCOFI data set represents the longest (1949-present) and most complete (more than 50,000 sampling stations) time series of oceanographic and larval fish data in the world. It includes abundance data on the larvae of over 250 species of fish; larval length frequency data and egg abundance data on key commercial species; and oceanographic and plankton data. The physical, chemical, and biological data collected at regular time and space intervals quickly became valuable for documenting climatic cycles in the California Current and a range of biological responses to them. CalCOFI research drew world attention to the biological response to the dramatic Pacific-warming event in 1957-58 and introduced the term “El Niño” into the scientific literature. + +The California Cooperative Oceanic Fisheries Investigations (CalCOFI) are a unique partnership of the California Department of Fish & Wildlife, NOAA Fisheries Service and Scripps Institution of Oceanography. The organization was formed in 1949 to study the ecological aspects of the sardine population collapse off California. Today our focus has shifted to the study of the marine environment off the coast of California, the management of its living resources, and monitoring the indicators of El Nino and climate change. CalCOFI conducts quarterly cruises off southern & central California, collecting a suite of hydrographic and biological data on station and underway. Data collected at depths down to 500 m include: temperature, salinity, oxygen, phosphate, silicate, nitrate and nitrite, chlorophyll, transmissometer, PAR, C14 primary productivity, phytoplankton biodiversity, zooplankton biomass, and zooplankton biodiversity." + +Further information about each of the columns can be found here - https://calcofi.com/index.php?option=com_content&view=article&id=77:database-tables&catid=73&Itemid=993. Note that many columns have been removed in your version of the dataset due to time constraints. + +Your job is to determine the association between water temperature (X, column name T_degC) in degrees celcius and water salinity (Y, column name Salnty) in g/kg. Consider potential confounders and effect modifiers, and check the assumptions of your model. Also create a visualization for the relationship. + +```{r} + +# read in the data +cofi <- read.csv("CalCOFI_2016.csv") +summary(cofi) + +``` + +