-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcell20.js
126 lines (104 loc) · 29.4 KB
/
cell20.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
var w = 900;
var h = 600;
//to prevent graph clipping
var padding = 40;
//oscillator to make sounds
var osc;
//cell 40 voltage data
var dataset = [
[1, -70.39390158476643], [2, -70.56113732339271], [3, -70.49668352359855], [4, -70.43779242717007], [5, -70.39161892628012], [6, -70.35542211941775], [7, -70.32681790711973], [8, -70.30403978330484], [9, -70.28577814348193], [10, -70.27105133759531], [11, -70.25911499710506], [12, -70.24939840856378], [13, -70.24145947308982], [14, -70.23495248065724], [15, -70.22960478868887], [16, -70.22519974582048], [17, -70.22156404107349], [18, -70.21855822318064], [19, -70.2160695164283], [20, -70.21400631909444], [21, -70.21229394867453], [22, -70.21087132126846], [23, -70.20968833844846], [24, -70.20870381545797], [25, -70.20788382763187], [26, -70.2072003828407], [27, -70.20663035018751], [28, -70.20615459162585], [29, -70.20575725534471], [30, -70.20542519887832], [31, -70.20514751678907], [32, -70.20491515303101], [33, -70.20472058215611], [34, -70.2045575466759], [35, -70.20442084036311], [36, -70.20430612922841], [37, -70.20420980346039], [38, -70.20412885485676], [39, -70.20406077527565], [40, -70.20400347244048], [41, -70.20395520008938], [42, -70.20391449999154], [43, -70.20388015378985], [44, -70.20385114298531], [45, -70.2038266156719], [46, -70.2038058588715], [47, -70.2037882755165], [48, -70.2037733652919], [49, -70.20376070868329], [50, -70.20374995368876], [51, -70.20374080474596], [52, -70.20373301350075], [53, -70.203726371108], [54, -70.20372070180788], [55, -70.20371585756341], [56, -70.20371171358205], [57, -70.20370816457384], [58, -70.2037051216233], [59, -70.20370250957298], [60, -70.20370026483377], [61, -70.20369833355159], [62, -70.20369667007073], [63, -70.20369523564621], [64, -70.20369399736292], [65, -70.20369292722856], [66, -70.20369200141135], [67, -70.2036911995993], [68, -5.070724852187549], [69, 3.4994187658127704], [70, -2.5191907601063357], [71, -6.079178787320421], [72, -9.143006720498834], [73, -12.101967352582701], [74, -11.163558786659634], [75, -10.938504046978839], [76, -12.603309086350523], [77, -14.948489693784756], [78, -17.668762962428456], [79, -20.619886909235838], [80, -23.70281931112807], [81, -26.837427807419317], [82, -29.960751511133108], [83, -33.03142987201585], [84, -36.03098140907662], [85, -38.957396355018325], [86, -41.81125888183203], [87, -44.579311330279346], [88, -47.22618579154497], [89, -49.70644019920855], [90, -51.99043108417815], [91, -54.07684035425959], [92, -55.98309165244829], [93, -57.730404220408325], [94, -59.33494258228654], [95, -60.806101291957695], [96, -62.14948789483471], [97, -63.36667656640636], [98, -64.45843012022705], [99, -65.42598015925734], [100, -66.27196319894485], [101, -67.00105749736049], [102, -67.62061327598529], [103, -68.14001416991384], [104, -68.56925617582827], [105, -68.92021220634345], [106, -69.2038628122385], [107, -69.43057571676685], [108, -69.61045717270608], [109, -69.75202008287043], [110, -69.86257575553485], [111, -69.94829997498351], [112, -70.01431262187491], [113, -70.06470982490978], [114, -70.10297311741691], [115, -70.13184248368245], [116, -70.15345707067104], [117, -70.16950048912763], [118, -70.18129093471094], [119, -70.1898545509157], [120, -70.19598578111723], [121, -70.20029646070823], [122, -70.20325534378215], [123, -70.20521966258916], [124, -70.20646015036287], [125, -70.2071807632346], [126, -70.20753414275204], [127, -70.20763368145005], [128, -70.20756289624273], [129, -70.20738267967272], [130, -70.2071368863134], [131, -70.20685661871823], [132, -70.20656350163665], [133, -70.20627217213651], [134, -38.885827229710316], [135, 22.933601939818896], [136, -19.280753623750428], [137, -55.220879729873474], [138, -62.71132732773677], [139, -62.40489720325955], [140, -62.541651503257505], [141, -63.015705361533904], [142, -63.6935910689364], [143, -64.46891371784567], [144, -65.26395594353933], [145, -66.02759265350913], [146, -66.72945165442482], [147, -67.35396341178445], [148, -67.89504712786487], [149, -68.3544179660994], [150, -68.73719170105596], [151, -69.05182623117624], [152, -69.30656418306748], [153, -69.51069710198396], [154, -69.67278560617001], [155, -69.80033756702389], [156, -69.89989421682786], [157, -69.97701313385606], [158, -70.03628496813359], [159, -70.08145542795168], [160, -70.1156961019168], [161, -70.14146209158065], [162, -70.16068982428366], [163, -70.1749041987204], [164, -70.18529849984846], [165, -70.19280086058814], [166, -70.19812907750993], [167, -70.20183523518612], [168, -70.20434164782742], [169, -70.20596955803344], [170, -70.20696188788973], [171, -70.20750116436191], [172, -70.20772356625024], [173, -70.20772987796329], [174, -70.20759399223799], [175, -70.20736948137979], [176, -70.20709465391155], [177, -70.2067964288271], [178, -70.20649329062115], [179, -70.20619753253368], [180, -70.20591695078429], [181, -70.20565611700165], [182, -70.20541732787662], [183, -70.20520130885014], [184, -70.20500773120156], [185, -70.20483558825639], [186, -70.20468346579663], [187, -70.20454973349267], [188, -70.20443267777958], [189, -70.20433059166368], [190, -70.20424183314651], [191, -70.20416486104473], [192, -70.20409825475889], [193, -70.20404072285304], [194, -70.20399110402448], [195, -70.20394836307474], [196, -70.20391158376634], [197, -70.20387995990733], [198, -70.20385278560205], [199, -70.20382944531053], [200, -70.20380940414123], [201, -70.20379219864611], [202, -70.20377742827428], [203, -70.20376474756192], [204, -70.20375385908353], [205, -51.36662205565217], [206, 31.241374101334912], [207, -9.14775762378735], [208, -46.34836685610928], [209, -62.83017258372328], [210, -62.47205577174925], [211, -62.49379632937222], [212, -62.88942422148751], [213, -63.5223623210045], [214, -64.27810720296769], [215, -65.07128035337647], [216, -65.84463168213657], [217, -66.56299543680647], [218, -67.20705713806689], [219, -67.76849153379284], [220, -68.24775302957195], [221, -68.64867783486459], [222, -68.97941918878028], [223, -69.24822385822078], [224, -69.46408797915362], [225, -69.63590197333926], [226, -69.77140402503203], [227, -69.87737730153668], [228, -69.95962008183483], [229, -70.02296908706415], [230, -70.07132653635284], [231, -70.10803896427858], [232, -70.13571878592272], [233, -70.15641954347582], [234, -70.17176061149087], [235, -70.1830112321785], [236, -70.1911600872814], [237, -70.19697287596637], [238, -70.2010393334126], [239, -70.2038111952274], [240, -70.20563257303652], [241, -70.20676407602794], [242, -70.20740184413474], [243, -70.2076924826384], [244, -70.20774472208817], [245, -70.20763847936315], [246, -70.20743186805348], [247, -70.20716659886503], [248, -70.20687212179368], [249, -70.20656878911602], [250, -70.20627025941562], [251, -70.20598531563724], [252, -70.20571923249487], [253, -70.2054747986828], [254, -70.20525307575579], [255, -70.2050539570071], [256, -70.20487657515922], [257, -70.20471959636018], [258, -70.20458142917384], [259, -70.20446037043317], [260, -70.20435470455537], [261, -70.20426276886293], [262, -70.20418299434345], [263, -70.2041139289009], [264, -70.20405424833996], [265, -70.20400275895008], [266, -70.20395839451628], [267, -60.6435368750047], [268, 33.01119021995378], [269, -1.7624673730415699], [270, -39.97653061689139], [271, -62.73284161702788], [272, -62.51304339138928], [273, -62.4567711302605], [274, -62.79775834898282], [275, -63.39890505369557], [276, -64.14040308978647], [277, -64.93200889655394], [278, -65.71218976523576], [279, -66.44214845898883], [280, -67.10003523529339], [281, -67.67614502589296], [282, -68.1696751977316], [283, -68.5837749689701], [284, -68.92620387400906], [285, -69.20526034356232], [286, -69.42970920617486], [287, -69.6086512138461], [288, -69.74999351774021], [289, -69.86069014359721], [290, -69.94671134216357], [291, -70.01306441722726], [292, -70.06378647433945], [293, -70.10232999070426], [294, -70.1314289932924], [295, -70.15322345153919], [296, -70.16940218585181], [297, -70.18129034958801], [298, -70.18992126042933], [299, -70.19609597742067], [300, -70.20043206081537], [301, -70.2034030133328], [302, -70.20536988357485], [303, -70.20660639328054], [304, -70.20731878490088], [305, -70.20766140970152], [306, -70.20774890819166], [307, -70.20766568318639], [308, -70.20747323454125], [309, -70.20721581368365], [310, -70.20692476401939], [311, -70.20662183792014], [312, -70.20632171990817], [313, -70.20603393655415], [314, -70.2057642943981], [315, -70.20551595607878], [316, -38.865534678936925], [317, 22.982679533601942], [318, -19.220403385976134], [319, -55.19009931586157], [320, -62.725270860887434], [321, -62.415394864984364], [322, -62.54914427342318], [323, -63.02086728812626], [324, -63.69704840170073], [325, -64.47120450963911], [326, -65.26547049097512], [327, -66.02859796368533], [328, -66.73012278431595], [329, -67.35441639015919], [330, -10.143942598964932], [331, 1.1787921009795612], [332, -9.414860681305338], [333, -16.291140560074748], [334, -21.453522396106923], [335, -25.72874651850957], [336, -29.48479593590358], [337, -32.90689307214377], [338, -36.101860617828], [339, -39.137184174744895], [340, -42.05046653708868], [341, -44.846617963957314], [342, -47.499611984633496], [343, -49.97084935222795], [344, -52.238390178903124], [345, -54.30626178243143], [346, -56.194856035922946], [347, -57.92562736598763], [348, -59.514776254695256], [349, -60.97111775417069], [350, -62.299844294410235], [351, -63.50224482498215], [352, -64.57930953702227], [353, -65.53235764941411], [354, -66.36428088362733], [355, -67.08007920458665], [356, -67.68716704068103], [357, -68.19538147815109], [358, -68.61471316102974], [359, -68.95715590752326], [360, -69.23349654791068], [361, -69.45416951618871], [362, -69.62908897498552], [363, -69.76661712336183], [364, -69.87392801544658], [365, -69.95706760607291], [366, -70.02103219326082], [367, -70.06982098714883], [368, -70.10684114927723], [369, -70.13474841666145], [370, -70.15562234185326], [371, -70.1710989098944], [372, -70.18245813316133], [373, -70.1906957694716], [374, -70.19658225059142], [375, -70.20071055320177], [376, -70.20353470059133], [377, -70.20540047625896], [378, -70.20656975768274], [379, -70.207239682559], [380, -70.20755766684215], [381, -70.20763311716938], [382, -70.20754652527523], [383, -70.20735649995478], [384, -70.20710518187227], [385, -70.20682239579027], [386, -70.20652882098716], [387, -70.2062384011098], [388, -70.20596016705827], [389, -70.20569960857269], [390, -70.20545970016254], [391, -70.20524166334788], [392, -70.20504552859447], [393, -70.20487054578689], [394, -70.20471548074806], [395, -70.20457882650722], [396, -70.2044589511951], [397, -70.20435419917912], [398, -70.20426295799608], [399, -70.20418370052941], [400, -70.20411500950132], [401, -70.20405558953618], [402, -70.20400427067844], [403, -70.20396000620804], [404, -70.2039218668148], [405, -70.20388903260788], [406, -70.20386078400162], [407, -70.20383649219629], [408, -70.20381560973796], [409, -70.20379766146856], [410, -70.20378223605577], [411, -48.91143312221606], [412, 29.939859146289923], [413, -11.202795529299658], [414, -48.19059014880862], [415, -62.82353516893292], [416, -62.46163783282468], [417, -62.50545006298581], [418, -62.91623373425824], [419, -63.55783891440428], [420, -64.3173179517182], [421, -65.11074227366936], [422, -65.88202729666175], [423, -66.59700992156522], [424, -67.23709407366545], [425, -67.79437073506706], [426, -68.2695853210095], [427, -68.66680427453375], [428, -68.99426057868374], [429, -69.26018993435572], [430, -69.47365391564817], [431, -69.64347705802712], [432, -69.77735027615002], [433, -69.88200785656689], [434, -69.96319926732404], [435, -70.02571195364024], [436, -70.07341377512945], [437, -70.10961804219018], [438, -70.1369042206417], [439, -70.15730182329477], [440, -70.17241086831974], [441, -70.1834850268156], [442, -70.19150056050302], [443, -70.19721333714982], [444, -70.20120536071957], [445, -70.20392232251004], [446, -70.20570363375981], [447, -70.20680626663454], [448, -70.2074235604642], [449, -70.20769997439355], [450, -70.20774260248136], [451, -70.20763012020326], [452, -70.20741970469422], [453, -70.20715236456591], [454, -70.20685702704473], [455, -70.20655365822698], [456, -70.2062556340523], [457, -70.20597153289258], [458, -70.20570648341858], [459, -70.20546317187532], [460, -70.20524258959544], [461, -70.20504458326609], [462, -70.20486825612811], [463, -70.2047122571056], [464, -70.20457498617036], [465, -70.2044547375127], [466, -70.20434979688879], [467, -70.20425850551274], [468, -70.20417929979047], [469, -70.20411073384686], [470, -70.2040514900081], [471, -70.2040003810476], [472, -70.20395634697756], [473, -70.20391844839969], [474, -70.20388585785305], [475, -70.20385785016776], [476, -70.20383379251948], [477, -70.20381313464745], [478, -70.20379539953134], [479, -70.20378017470325], [480, -70.20376710428617], [481, -70.20375588179154], [482, -70.20374624367099], [483, -55.23424891528825], [484, 32.68387090715574], [485, -6.015147666966422], [486, -43.59179177242959], [487, -62.81871379223931], [488, -62.489274386593145], [489, -62.477565136716215], [490, -62.84996947936934], [491, -63.46948023489489], [492, -64.21928909047907], [493, -65.01187763604639], [494, -65.78821516305051], [495, -66.51157884172613], [496, -67.16157383142937], [497, -67.729267247096], [498, -68.21462026731895], [499, -68.6211490081339], [500, -68.95686107110701], [501, -69.23002219571717], [502, -69.44952912911496], [503, -69.62436665744247], [504, -69.76234448425838], [505, -69.87031898976838], [506, -69.95416190651514], [507, -70.01878344948719], [508, -70.06814069152249], [509, -70.10562766266732], [510, -70.13390765984892], [511, -70.15507080533332], [512, -70.17076590530132], [513, -70.18228588941253], [514, -70.1906383427093], [515, -70.19660393422284], [516, -70.20078417558896], [517, -70.20364001246465], [518, -70.20552272099579], [519, -70.20669845576096], [520, -70.20736762807904], [521, -70.20768011745007], [522, -70.20774715190522], [523, -70.20765054349948], [524, -70.20744983598298], [525, -70.20718781274692], [526, -70.20689472286857], [527, -70.20659150924352], [528, -70.20629226300707], [529, -70.20600608042383], [530, -70.2057384601048], [531, -70.20549234800811], [532, -70.20526891366745], [533, -70.20506812221717], [534, -70.20488915199712], [535, -70.20473069598395], [536, -70.2045911763239], [537, -70.20446889428763], [538, -70.20436213259634], [539, -70.20426922293142], [540, -70.2041885882655], [541, -70.2041187672255], [542, -53.92036079700084], [543, 32.26150355133044], [544, -7.092871620902992], [545, -44.53062368927556], [546, -62.81941217401436], [547, -62.47799624966615], [548, -62.47895479750105], [549, -62.86034142274036], [550, -63.48526062462807], [551, -64.23769910937811], [552, -65.0309167508336], [553, -65.80654396372643], [554, -66.52842592042875], [555, -67.1765614443205], [556, -67.74224023987678], [557, -68.22560930922833], [558, -68.6302967526712], [559, -68.96436813499722], [560, -69.23608640818314], [561, -69.45438367901495], [562, -69.62821557616148], [563, -69.76536888323274], [564, -69.87267625252156], [565, -69.95598534244048], [566, -70.02018223889057], [567, -70.06920546250717], [568, -70.10643367428227], [569, -70.13451311908199], [570, -70.15552172304956], [571, -70.17109847822577], [572, -70.18252841003799], [573, -70.19081279207894], [574, -70.19672729298806], [575, -70.20086948933239], [576, -70.20369724842125], [577, -70.20555945124282], [578, -70.20672039820928], [579, -70.20737907228265], [580, -70.20768425796997], [581, -70.20774634803054], [582, -70.20764652067272], [583, -70.20744384132905], [584, -70.20718073464302], [585, -70.20688718246457], [586, -70.20658393019391], [587, -70.20628492434513], [588, -70.20599915644351], [589, -70.20573205027036], [590, -70.20548649923892], [591, -70.20526363681898], [592, -70.20506340416361], [593, -70.20488496439758], [594, -70.20472700156142], [595, -70.20458793329055], [596, -70.2044660593986], [597, -70.20435966319656], [598, -70.20426707827102], [599, -70.20418673029003], [600, -51.367750401988886], [601, 31.217409863751723], [602, -9.178363628115639], [603, -46.37314078256067], [604, -62.82262183966863], [605, -62.46614886666486], [606, -62.489534698353836], [607, -62.88646794447331], [608, -63.52037509168597], [609, -64.2767892784597], [610, -65.07041109656772], [611, -65.84405865770997], [612, -66.56261539926552], [613, -67.20680250615217], [614, -67.76831920067059], [615, -68.24763504608177], [616, -68.64859598472471], [617, -68.97936160703874], [618, -69.24818295708648], [619, -69.4640584987162], [620, -69.6358804684986], [621, -69.77138816950058], [622, -69.87736549780867], [623, -69.95961121897193], [624, -70.02296239176223], [625, -70.07132144914202], [626, -70.1080350729623], [627, -70.13571579704099], [628, -70.15641724110128], [629, -70.17175883480705], [630, -70.1830098602892], [631, -70.19115902853744], [632, -70.19697206036625], [633, -70.20103870713164], [634, -70.20381071663704], [635, -70.20563220977877], [636, -70.20676380284443], [637, -70.2074016412408], [638, -70.20769233449502], [639, -70.20774461646697], [640, -70.2076384066291], [641, -70.20743182061099], [642, -70.2071665707277], [643, -70.20687210824782], [644, -70.20656878645687], [645, -70.20627026473895], [646, -70.2059853266748], [647, -70.20571924748344], [648, -70.20547481626029], [649, -70.20525309487823], [650, -70.20505397688238], [651, -70.20487659519424], [652, -70.20471961611842], [653, -70.20458144834173], [654, -70.20446038879292], [655, -70.20435472196344], [656, -70.20426278523296], [657, -70.20418300963246], [658, -70.20411394309853], [659, -70.20405426146006], [660, -70.20400277102381], [661, -70.20395840558689], [662, -70.20392021992244], [663, -70.20388738120104], [664, -70.2038591593764], [665, -70.20383491724276], [666, -70.20381410063665], [667, -70.20379622908632], [668, -70.20378088708962], [669, -70.20376771611477], [670, -70.20375640736047], [671, -70.20374669527028], [672, -70.20373835177149], [673, -70.20373118119227], [674, -70.20372501580289], [675, -70.2037197119231], [676, -70.20371514653671], [677, -70.20371121435869], [678, -70.20370782529989], [679, -70.20370490228242], [680, -70.2037023793602], [681, -70.20370020010536], [682, -70.20369831622493], [683, -70.20369668637613], [684, -70.20369527515342], [685, -70.20369405222259], [686, -70.20369299158128], [687, -70.20369207092806], [688, -70.20369127112374], [689, -70.20369057573224], [690, 13.277876152756322], [691, -2.698420967933593], [692, -12.244314910407152], [693, -18.48145775325328], [694, -23.24858655201189], [695, -27.264032051932762], [696, -30.84333358294596], [697, -34.143064975022256], [698, -37.25268929377544], [699, -40.22654452239774], [700, -43.08880536673034], [701, -45.83077685327834], [702, -48.418086716813086], [703, -50.81424200644735], [704, -53.00648576770751], [705, -55.00624587781686], [706, -56.83532692819444], [707, -6.702684897710927], [708, -11.988204619334185], [709, -16.774717619298944], [710, -21.05735251046022], [711, -12.633098329009883], [712, -13.737802250515307], [713, -16.17250717363586], [714, -19.09147964408486], [715, -22.220850043659123], [716, -25.42381229562538], [717, -28.617879986049438], [718, -31.753732440231573], [719, -34.80883848064231], [720, -37.780638463140946], [721, -40.67423222119344], [722, -43.48590628789738], [723, -46.19024040332765], [724, -48.74390171340311], [725, -51.10889445589474], [726, -53.27297123719947], [727, -55.24838747766441], [728, -57.0564694813509], [729, -58.71603732653158], [730, -60.23942846631083], [731, -61.632980402721536], [732, -62.89988050849645], [733, -64.04127519380769], [734, -65.057804943324], [735, -65.95137435327563], [736, -66.72601284066694], [737, -67.38811296002986], [738, -67.94578931278195], [739, -68.40944900683735], [740, -68.78997251105115], [741, -69.09906108018332], [742, -69.34699053768416], [743, -69.54431169935364], [744, -69.70009696616242], [745, -69.82212093983829], [746, -69.91700132645458], [747, -69.99026544797778], [748, -70.04639924266425], [749, -70.08909373637275], [750, -70.12139522544236], [751, -70.1456558540753], [752, -70.1637274209008], [753, -70.17706314292458], [754, -70.18679681920372], [755, -70.1938081107875], [756, -70.198775883521], [757, -70.20222132090505], [758, -70.20454245453921], [759, -39.503029202947474], [760, 9.677050947193482], [761, -5.058873447013913], [762, -14.14287021839513], [763, -19.997042207699405], [764, -23.64318484311193], [765, -27.265096923634346], [766, -30.728330748299058], [767, -34.00765341592333], [768, -37.12514420878264], [769, -40.11237143554858], [770, -42.987252529752965], [771, -45.74036872972855], [772, -48.33762142697682], [773, -50.742672073262995], [774, -52.94245751082971], [775, -54.94849992325742], [776, -56.78285153930521], [777, -58.46561746866166], [778, -60.00992198355417], [779, -61.42394421464022], [780, -62.71061299901418], [781, -63.871561095704294], [782, -64.9075077865667], [783, -65.82010423510208], [784, -66.61300429257557], [785, -67.29216840938692], [786, -67.86536951554938], [787, -68.3430579184317], [788, -68.73570874155125], [789, -69.05522909240456], [790, -69.3119770028695], [791, -69.51654132558151], [792, -69.67825145612635], [793, -69.8050670137833], [794, -69.90378263949876], [795, -69.98008927270486], [796, -70.03863554275141], [797, -70.08319981397634], [798, -70.11694987131114], [799, -70.14232897551686], [800, -70.16125920101953], [801, -70.17525021575823], [802, -70.18548092150927], [803, -70.19286674815974], [804, -70.19811474248206], [805, -70.20176816257134], [806, -70.2042422411371], [807, -70.20585264659591], [808, -70.20683798646989], [809, -70.20737750050117], [810, -70.20760490227576], [811, -70.20761915824671], [812, -70.20749284565395], [813, -70.20727860618572], [814, -70.2070141086922], [815, -70.20672584942085], [816, -70.20643204943426], [817, -70.2061448535265], [818, -70.205871990733], [819, -70.20561802139851], [820, -70.20538526799368], [821, -70.20517450500586], [822, -70.204985466084], [823, -70.20481721322155], [824, -70.20466840232824], [825, -70.20453747144322], [826, -70.20442277157706], [827, -70.20432265533636], [828, -70.20423553476878], [829, -70.20415991701942], [830, -15.955333945586638], [831, 13.614348158988257], [832, -27.507345705317203], [833, -60.434196285000425], [834, -62.639870998542655], [835, -62.42149936828887], [836, -62.63982004455997], [837, -63.165739337216664], [838, -63.87002550338116], [839, -64.65295159934344], [840, -65.44299476074868], [841, -66.19388109837546], [842, -66.87845602418065], [843, -67.4839050035392], [844, -68.00611438677181], [845, -68.4473665050085], [846, -68.8139404789274], [847, -69.11428066019981], [848, -69.35674237652164], [849, -69.55066856270534], [850, -69.70433419460058], [851, -69.82502990289427], [852, -69.91907174669892], [853, -69.99179932646096], [854, -70.04757907650298], [855, -70.09003671563752], [856, -70.12217226037123], [857, -70.14631062163014], [858, -70.16428750707274], [859, -70.17754653644229], [860, -70.18721581605443], [861, -70.194171641159], [862, -70.199090876161], [863, -70.20249348631107], [864, -70.20477672268014], [865, -70.20624237154306], [866, -70.20711832517907], [867, -70.20757555585017], [868, -70.2077414021143], [869, -70.20770991860518], [870, -70.20754990192106], [871, 12.147790067744973], [872, -3.461558682482304], [873, -13.16671323642004], [874, -19.60402964385462], [875, -24.44196532308639], [876, -28.45712214463727], [877, -30.883655017463592], [878, -32.30071700975177], [879, -35.03604045144653], [880, -38.06653087114319], [881, -41.08403577673258], [882, -43.99487477117982], [883, -46.75147751350022], [884, -49.312785840774815], [885, -51.65513692694279], [886, -53.78378073609079], [887, -55.72187681022221], [888, -57.494542395152415], [889, -59.120340861946566], [890, -60.61103377893543], [891, -61.97250644539104], [892, -63.207527977172724], [893, -64.31673674965859], [894, -65.30131743717511], [895, -66.16371379507676], [896, -66.90837365842818], [897, -67.54246953820933], [898, -68.07489459797476], [899, -68.51576094949384], [900, -68.87668779848198], [901, -69.1689062711804], [902, -69.4027239261448], [903, -69.58844349082976], [904, -69.734759282395], [905, -69.84914150432965], [906, -69.93791672895574], [907, -70.0063450517225], [908, -70.05864791266688], [909, -70.09838250217395], [910, -70.12839098683148], [911, 8.466718551920941], [912, 1.1701714841609616], [913, -5.54297735977317], [914, -10.393537749244214], [915, -14.480569869823533], [916, -18.205041635489444], [917, -21.7385637904542], [918, -25.14754918026536], [919, -28.44834074158981], [920, -31.640597661797724], [921, -34.72626685390324], [922, -37.71513542225696], [923, -40.61869185402431], [924, -43.43673151891414], [925, -46.14585606004546], [926, -48.70383383378465], [927, -51.07276086125978], [928, -53.24039004941847], [929, -55.218829509925385], [930, -57.02948476856811], [931, -58.69136187999392], [932, -60.21682908548283], [933, -61.61240565183821], [934, -37.884391716666734], [935, -12.326909982064924], [936, -37.15207903912458], [937, -56.4213412806383], [938, -58.53155867422709], [939, -59.354525781890686], [940, -60.35889019629413], [941, -61.46556768131762], [942, -62.58712425199463], [943, -63.6668392525854], [944, -64.67096733088137], [945, -65.580721798249], [946, -66.38724888571562], [947, -67.08852451181558], [948, -67.68766031446175], [949, -68.19188676464924], [950, -68.60954594441331], [951, -68.9516132343909], [952, -69.22827557929689], [953, -69.449575530089], [954, -69.62522444344935], [955, -69.76347092944903], [956, -69.87143193996977], [957, -69.95513052761447], [958, -70.01956092222724], [959, -70.06872659684815], [960, -70.10604340805395], [961, -70.13418151881284], [962, -70.15523225244578], [963, -70.17084209120777], [964, -70.1823001013791], [965, -70.19060961470183], [966, -70.19654725598743], [967, -70.20071097689853], [968, -70.20355873952197], [969, -70.2054394068084], [970, -70.20661723641327], [971, -70.20729118567012], [972, -70.20761004640744], [973, -70.20768425361433], [974, -70.20759505790045], [975, -70.20740161993338], [976, -70.20714647471566], [977, -70.20685972261232], [978, -70.20656222993426], [979, -70.20626806205398], [980, -70.20598632408463], [981, -70.20572254596603], [982, -70.20547971854707], [983, -70.20525906338989], [984, -70.20506060027996], [985, -70.20488356175686], [986, -70.20472669254393], [987, -70.20458846286387], [988, -70.20446721774056], [989, -70.20436127906757], [990, -70.2042690131299], [991, -70.20418887312331], [992, -70.2041194238134], [993, -70.20405935364599], [994, -70.20400747823119], [995, -70.20396273807383], [996, -70.20392419263192], [997, -70.20389101219489], [998, -70.20386246863218], [999, -70.2038379257389], [1000, -70.2038168296655]
];
//p5 setup
function setup() {
osc = new p5.SawOsc(); //new oscillator
//scale for x
var x = d3.scale.linear()
.range([padding, w-padding]);
//scale for y
var y = d3.scale.linear()
.range([h-padding, padding]);
//to draw the line through the data points
var lines = d3.svg.line()
.x(function(d) {return x(d); })
.y(function(d) {return y(d); });
//gradient for data across x axis
var color = d3.scale.linear()
.domain([0, d3.max(dataset, function(d) {return d[0]; })]) //use max and min to be more flexible
.range(["orange", "lavender"]);
//scaling the graph
var xScale = d3.scale.linear()
.domain([0, d3.max(dataset, function(d) {return d[0]; })]) //use max and min to be more flexible
//.range([d3.min(dataset, function(d) {return d[0];}) , w]); //set to min value and svg width
.range([padding*2, w-padding]);
var yScale = d3.scale.linear()
.domain([d3.min(dataset, function(d) {return d[1]}), d3.max(dataset, function(d) {return d[1]; })]) //use max and min to be more flexible
//.range([d3.min(dataset, function(d) {return d[1];}), h]);//set to min value and svg width
.range([h-padding*2, padding]);
//create the x axis for graph
var xAxis = d3.svg.axis()
.scale(xScale)
.orient("bottom")
.ticks(6); //set number of ticks
// .style("")
//create the y axis
var yAxis = d3.svg.axis()
.scale(yScale)
.orient("left")
.ticks(7); //set number of ticks
//make a line
var valueline = d3.svg.line()
.x(function(d) { return xScale(d[0]); })
.y(function(d) { return yScale(d[1]); });
//make the svg element
var svg = d3.select("#dataContainer") //put graph in this dataContainer
.append("svg")
.attr("width", w)
.attr("height", h);
svg.append("path")
.attr("class", "line")
.attr("d", valueline(dataset));
svg.selectAll("circle")
.data(dataset)
//.transition()
.enter()
.append("circle")
.style("fill", function(d) {
return color(d[0]);
})
//.style("stroke", "white")
.attr("cx", function(d) {
return xScale(d[0]);
})
.attr("cy", function(d) {
return yScale(d[1]);
})
.attr("r", 5)
.on("mouseover", function(d) {
d3.select(this)
.transition() //make it transition nicely
.duration(50) // transition duration
.attr("r", 20); //enlarges the circle on hover
osc.freq(880);
osc.amp(.5, 1);
playing = true; // play noise when hover on circle
osc.start();
var freq = map(yScale(d[1]), h, 0, 20, 888);
osc.freq(freq);
})
.on("mouseout", function(d) {
d3.select(this)
.transition()
.duration(250)
.attr("r", 5);
playing = false;
osc.stop();
});
svg.append("g")
.attr("class", "axis") //assign axis class
.attr("transform", "translate(0," + (h-padding) + ")")
.call(xAxis);
svg.append("g")
.attr("class", "axis") //assign axis class
.attr("transform", "translate(" + padding + ",0)")
.call(yAxis);
}