Skip to content

Instantly share code, notes, and snippets.

@aficionado
Forked from ashenfad/README.md
Last active August 29, 2015 14:05
Show Gist options
  • Save aficionado/d2372af48123ef65a42b to your computer and use it in GitHub Desktop.
Save aficionado/d2372af48123ef65a42b to your computer and use it in GitHub Desktop.
{"fields": [{"optype": "numeric", "name": "pregnancies", "datatype": "int8", "preferred": true, "summary": {"sum_squares": 20063, "missing_count": 0, "sum": 2953, "median": 2.96687, "maximum": 17, "minimum": 0, "standard_deviation": 3.36958, "variance": 11.35406, "counts": [[0, 111], [1, 135], [2, 103], [3, 75], [4, 68], [5, 57], [6, 50], [7, 45], [8, 38], [9, 28], [10, 24], [11, 11], [12, 9], [13, 10], [14, 2], [15, 1], [17, 1]], "population": 768, "mean": 3.84505}, "column_number": 0, "id": "000000", "order": 0}, {"optype": "numeric", "name": "plasma glucose", "datatype": "int16", "preferred": true, "summary": {"sum_squares": 12008759, "splits": [73.40028, 80.70976, 84.56046, 88.29697, 91.0653, 94.02324, 96.37393, 99.15167, 100.81422, 102.99865, 105.47912, 107.37394, 109.45106, 111.68975, 114.22117, 116.8391, 119.5, 122.06267, 124.31608, 126.65592, 129.19127, 132.64738, 136.8101, 140.43237, 144.72673, 148.62092, 155.01649, 161.85305, 168.92, 178.9276, 187.59806], "missing_count": 0, "sum": 92847, "median": 116.8391, "maximum": 199, "minimum": 0, "standard_deviation": 31.97262, "variance": 1022.24831, "population": 768, "bins": [[0, 5], [44, 1], [56.66667, 3], [61.5, 2], [67.2, 5], [73.3125, 16], [79.79167, 24], [84.26923, 26], [87.95455, 22], [91.33333, 36], [95.7, 40], [100.97183, 71], [107.21739, 69], [113.18333, 60], [118.5641, 39], [123.93939, 66], [129.5, 42], [133.93333, 15], [137.82353, 34], [142.65217, 23], [146.5, 26], [151.33333, 15], [154.78571, 14], [158, 12], [161.84615, 13], [166.22222, 18], [172.5625, 16], [176.33333, 3], [180, 17], [183.5, 6], [188.23077, 13], [195.6875, 16]], "mean": 120.89453}, "column_number": 1, "id": "000001", "order": 1}, {"optype": "numeric", "name": "blood pressure", "datatype": "int8", "preferred": true, "summary": {"sum_squares": 3954989, "splits": [4.95379, 47.79361, 52.45455, 56.31476, 58.78684, 60.12982, 61.72909, 62.88889, 64.03541, 65.06458, 66.38178, 67.65685, 68.70061, 69.62414, 70.48722, 71.43285, 72.48913, 73.49, 74.23488, 75.36578, 76.27906, 77.43376, 78.51858, 79.65375, 80.9007, 82.4098, 84.16186, 85.97598, 88.04005, 90.09226, 94.7101], "missing_count": 0, "sum": 53073, "median": 71.43285, "maximum": 122, "minimum": 0, "standard_deviation": 19.35581, "variance": 374.64727, "population": 768, "bins": [[0, 35], [24, 1], [30, 2], [39, 2], [44.66667, 6], [49.44444, 18], [52, 11], [55.04, 25], [58, 21], [60.95833, 72], [64.8375, 80], [68, 45], [70, 57], [72, 44], [74.86869, 99], [78, 45], [80, 40], [82, 30], [84.96, 50], [88, 25], [90, 22], [92, 8], [94.81818, 11], [98, 3], [100, 3], [102, 1], [104, 2], [106, 3], [108, 2], [110, 3], [114, 1], [122, 1]], "mean": 69.10547}, "column_number": 2, "id": "000002", "order": 2}, {"optype": "numeric", "name": "triceps skin thickness", "datatype": "int8", "preferred": true, "summary": {"sum_squares": 519082, "splits": [0.46227, 13.14087, 22.81344, 29.82784, 36.68115], "missing_count": 0, "sum": 15772, "median": 22.81344, "maximum": 99, "minimum": 0, "standard_deviation": 15.95222, "variance": 254.47325, "population": 768, "bins": [[0, 227], [7.5, 4], [10.54545, 11], [12.61111, 18], [14.7, 20], [16.7, 20], [18.47368, 38], [20.43478, 23], [22.57895, 38], [24.57143, 28], [26.58974, 39], [28.45946, 37], [30.41304, 46], [32.39216, 51], [34.65217, 23], [36.53333, 30], [38.72, 25], [40.48387, 31], [42.35294, 17], [44.54545, 11], [46, 8], [47, 4], [48, 4], [49, 3], [50, 3], [51, 1], [52, 2], [54, 2], [56, 1], [60, 1], [63, 1], [99, 1]], "mean": 20.53646}, "column_number": 3, "id": "000003", "order": 3}, {"optype": "numeric", "name": "insulin", "datatype": "int16", "preferred": true, "summary": {"sum_squares": 15077256, "splits": [0.21803, 30.5, 127.38859], "missing_count": 0, "sum": 61286, "median": 30.5, "maximum": 846, "minimum": 0, "standard_deviation": 115.244, "variance": 13281.18008, "population": 768, "bins": [[0, 374], [19.33333, 9], [43.69697, 33], [60.10811, 37], [76.77778, 36], [98.36842, 57], [122.59524, 42], [141.82759, 29], [162.35714, 28], [184.35294, 34], [208.57895, 19], [232, 11], [251.4, 5], [272.7, 10], [288.5, 6], [304.66667, 3], [324.75, 8], [338.5, 2], [368.33333, 3], [393.66667, 3], [415, 1], [440, 1], [465, 1], [479.4, 5], [495, 2], [510, 1], [542.66667, 3], [579, 1], [600, 1], [680, 1], [744, 1], [846, 1]], "mean": 79.79948}, "column_number": 4, "id": "000004", "order": 4}, {"optype": "numeric", "name": "bmi", "datatype": "double", "preferred": true, "summary": {"sum_squares": 833743.95, "splits": [19.91842, 22.15909, 23.38981, 24.26256, 24.99372, 25.65688, 26.38114, 27.23053, 27.74252, 28.5307, 29.12209, 29.75821, 30.26534, 30.81337, 31.42032, 32.11435, 32.62432, 33.09397, 33.6175, 34.121, 34.60968, 35.1546, 35.78179, 36.57558, 37.39384, 38.1764, 39.1192, 40.14221, 42.1375, 43.51924, 45.98461], "missing_count": 0, "sum": 24570.3, "median": 32.11435, "maximum": 67.1, "minimum": 0, "standard_deviation": 7.88416, "variance": 62.15998, "population": 768, "bins": [[0, 11], [18.25, 4], [19.72308, 13], [21.02222, 9], [22.15909, 22], [23.46333, 30], [24.92034, 59], [26.32222, 36], [27.59787, 47], [28.70278, 36], [29.80851, 47], [30.83333, 45], [32.30286, 70], [33.46, 40], [34.47018, 57], [35.59167, 36], [36.508, 25], [37.41724, 29], [38.34, 25], [39.46061, 33], [40.90556, 18], [42.45789, 19], [43.70952, 21], [45.42727, 11], [46.41111, 9], [48.225, 4], [49.65, 4], [52.675, 4], [55, 1], [57.3, 1], [59.4, 1], [67.1, 1]], "mean": 31.99258}, "column_number": 5, "id": "000005", "order": 5}, {"optype": "numeric", "name": "diabetes pedigree", "datatype": "double", "preferred": true, "summary": {"sum_squares": 255.20866, "splits": [0.12593, 0.14529, 0.16151, 0.17954, 0.19595, 0.21304, 0.22969, 0.24253, 0.25308, 0.26263, 0.2742, 0.28946, 0.30592, 0.32835, 0.34889, 0.37281, 0.39834, 0.42312, 0.44939, 0.48737, 0.52039, 0.55142, 0.58659, 0.62493, 0.6685, 0.70158, 0.74241, 0.82117, 0.8975, 1.03122, 1.25279], "missing_count": 0, "sum": 362.401, "median": 0.37281, "maximum": 2.42, "minimum": 0.078, "standard_deviation": 0.33133, "variance": 0.10978, "population": 768, "bins": [[0.096, 16], [0.1473, 71], [0.19455, 62], [0.24832, 117], [0.29244, 52], [0.34438, 73], [0.40872, 54], [0.45431, 29], [0.50662, 40], [0.55204, 28], [0.59478, 32], [0.64421, 24], [0.68819, 32], [0.74482, 33], [0.82673, 22], [0.88471, 14], [0.94765, 17], [1.015, 5], [1.08729, 7], [1.14571, 7], [1.20238, 8], [1.2702, 5], [1.33067, 3], [1.39375, 4], [1.45933, 3], [1.6, 1], [1.70933, 3], [1.781, 1], [1.893, 1], [2.137, 1], [2.3085, 2], [2.42, 1]], "mean": 0.47188}, "column_number": 6, "id": "000006", "order": 6}, {"optype": "numeric", "name": "age", "datatype": "int8", "preferred": true, "summary": {"sum_squares": 954685, "splits": [21.00793, 21.49815, 21.95822, 22.45075, 23.15535, 23.91238, 24.60085, 25.28338, 26.13665, 27.12428, 28.07187, 29.08726, 30.43864, 31.93845, 33.92911, 36.36267, 38.19211, 40.54937, 42.17071, 44.82629, 48.1, 52.72302, 59.43649], "missing_count": 0, "sum": 25529, "median": 29.08726, "maximum": 81, "minimum": 21, "standard_deviation": 11.76023, "variance": 138.30305, "population": 768, "bins": [[21.53333, 135], [23.54762, 84], [25.40741, 81], [27.52239, 67], [29.42, 50], [31.4, 40], [33.45161, 31], [35.61538, 26], [37.45714, 35], [39.52, 25], [41.45, 40], [43.38095, 21], [45.46429, 28], [47.45455, 11], [49.61538, 13], [51.5, 16], [53.54545, 11], [55.42857, 7], [57.58333, 12], [59.625, 8], [61, 2], [62, 4], [63, 4], [64, 1], [65, 3], [66, 4], [67, 3], [68, 1], [69, 2], [70, 1], [72, 1], [81, 1]], "mean": 33.24089}, "column_number": 7, "id": "000007", "order": 7}, {"optype": "categorical", "name": "diabetes", "datatype": "string", "preferred": true, "summary": {"missing_count": 0, "categories": [["false", 500], ["true", 268]]}, "term_analysis": {"enabled": true}, "column_number": 8, "id": "000008", "order": 8}], "rows": [[6, 148, 72, 35, 0, 33.6, 0.627, 50, "true"], [1, 85, 66, 29, 0, 26.6, 0.351, 31, "false"], [8, 183, 64, 0, 0, 23.3, 0.672, 32, "true"], [1, 89, 66, 23, 94, 28.1, 0.167, 21, "false"], [0, 137, 40, 35, 168, 43.1, 2.288, 33, "true"], [5, 116, 74, 0, 0, 25.6, 0.201, 30, "false"], [3, 78, 50, 32, 88, 31.0, 0.248, 26, "true"], [10, 115, 0, 0, 0, 35.3, 0.134, 29, "false"], [2, 197, 70, 45, 543, 30.5, 0.158, 53, "true"], [8, 125, 96, 0, 0, 0.0, 0.232, 54, "true"], [4, 110, 92, 0, 0, 37.6, 0.191, 30, "false"], [10, 168, 74, 0, 0, 38.0, 0.537, 34, "true"], [10, 139, 80, 0, 0, 27.1, 1.441, 57, "false"], [1, 189, 60, 23, 846, 30.1, 0.398, 59, "true"], [5, 166, 72, 19, 175, 25.8, 0.587, 51, "true"], [7, 100, 0, 0, 0, 30.0, 0.484, 32, "true"], [0, 118, 84, 47, 230, 45.8, 0.551, 31, "true"], [7, 107, 74, 0, 0, 29.6, 0.254, 31, "true"], [1, 103, 30, 38, 83, 43.3, 0.183, 33, "false"], [1, 115, 70, 30, 96, 34.6, 0.529, 32, "true"], [3, 126, 88, 41, 235, 39.3, 0.704, 27, "false"], [8, 99, 84, 0, 0, 35.4, 0.388, 50, "false"], [7, 196, 90, 0, 0, 39.8, 0.451, 41, "true"], [9, 119, 80, 35, 0, 29.0, 0.263, 29, "true"], [11, 143, 94, 33, 146, 36.6, 0.254, 51, "true"], [10, 125, 70, 26, 115, 31.1, 0.205, 41, "true"], [7, 147, 76, 0, 0, 39.4, 0.257, 43, "true"], [1, 97, 66, 15, 140, 23.2, 0.487, 22, "false"], [13, 145, 82, 19, 110, 22.2, 0.245, 57, "false"], [5, 117, 92, 0, 0, 34.1, 0.337, 38, "false"], [5, 109, 75, 26, 0, 36.0, 0.546, 60, "false"], [3, 158, 76, 36, 245, 31.6, 0.851, 28, "true"], [3, 88, 58, 11, 54, 24.8, 0.267, 22, "false"], [6, 92, 92, 0, 0, 19.9, 0.188, 28, "false"], [10, 122, 78, 31, 0, 27.6, 0.512, 45, "false"], [4, 103, 60, 33, 192, 24.0, 0.966, 33, "false"], [11, 138, 76, 0, 0, 33.2, 0.42, 35, "false"], [9, 102, 76, 37, 0, 32.9, 0.665, 46, "true"], [2, 90, 68, 42, 0, 38.2, 0.503, 27, "true"], [4, 111, 72, 47, 207, 37.1, 1.39, 56, "true"], [3, 180, 64, 25, 70, 34.0, 0.271, 26, "false"], [7, 133, 84, 0, 0, 40.2, 0.696, 37, "false"], [7, 106, 92, 18, 0, 22.7, 0.235, 48, "false"], [9, 171, 110, 24, 240, 45.4, 0.721, 54, "true"], [7, 159, 64, 0, 0, 27.4, 0.294, 40, "false"], [0, 180, 66, 39, 0, 42.0, 1.893, 25, "true"], [1, 146, 56, 0, 0, 29.7, 0.564, 29, "false"], [2, 71, 70, 27, 0, 28.0, 0.586, 22, "false"], [7, 103, 66, 32, 0, 39.1, 0.344, 31, "true"], [7, 105, 0, 0, 0, 0.0, 0.305, 24, "false"], [1, 103, 80, 11, 82, 19.4, 0.491, 22, "false"], [1, 101, 50, 15, 36, 24.2, 0.526, 26, "false"], [5, 88, 66, 21, 23, 24.4, 0.342, 30, "false"], [8, 176, 90, 34, 300, 33.7, 0.467, 58, "true"], [7, 150, 66, 42, 342, 34.7, 0.718, 42, "false"], [1, 73, 50, 10, 0, 23.0, 0.248, 21, "false"], [7, 187, 68, 39, 304, 37.7, 0.254, 41, "true"], [0, 100, 88, 60, 110, 46.8, 0.962, 31, "false"], [0, 146, 82, 0, 0, 40.5, 1.781, 44, "false"], [0, 105, 64, 41, 142, 41.5, 0.173, 22, "false"], [2, 84, 0, 0, 0, 0.0, 0.304, 21, "false"], [8, 133, 72, 0, 0, 32.9, 0.27, 39, "true"], [5, 44, 62, 0, 0, 25.0, 0.587, 36, "false"], [2, 141, 58, 34, 128, 25.4, 0.699, 24, "false"], [7, 114, 66, 0, 0, 32.8, 0.258, 42, "true"], [5, 99, 74, 27, 0, 29.0, 0.203, 32, "false"], [0, 109, 88, 30, 0, 32.5, 0.855, 38, "true"], [2, 109, 92, 0, 0, 42.7, 0.845, 54, "false"], [1, 95, 66, 13, 38, 19.6, 0.334, 25, "false"], [4, 146, 85, 27, 100, 28.9, 0.189, 27, "false"], [2, 100, 66, 20, 90, 32.9, 0.867, 28, "true"], [5, 139, 64, 35, 140, 28.6, 0.411, 26, "false"], [13, 126, 90, 0, 0, 43.4, 0.583, 42, "true"], [4, 129, 86, 20, 270, 35.1, 0.231, 23, "false"], [1, 79, 75, 30, 0, 32.0, 0.396, 22, "false"], [1, 0, 48, 20, 0, 24.7, 0.14, 22, "false"], [7, 62, 78, 0, 0, 32.6, 0.391, 41, "false"], [5, 95, 72, 33, 0, 37.7, 0.37, 27, "false"], [0, 131, 0, 0, 0, 43.2, 0.27, 26, "true"], [2, 112, 66, 22, 0, 25.0, 0.307, 24, "false"], [3, 113, 44, 13, 0, 22.4, 0.14, 22, "false"], [2, 74, 0, 0, 0, 0.0, 0.102, 22, "false"], [7, 83, 78, 26, 71, 29.3, 0.767, 36, "false"], [0, 101, 65, 28, 0, 24.6, 0.237, 22, "false"], [5, 137, 108, 0, 0, 48.8, 0.227, 37, "true"], [2, 110, 74, 29, 125, 32.4, 0.698, 27, "false"], [13, 106, 72, 54, 0, 36.6, 0.178, 45, "false"], [2, 100, 68, 25, 71, 38.5, 0.324, 26, "false"], [15, 136, 70, 32, 110, 37.1, 0.153, 43, "true"], [1, 107, 68, 19, 0, 26.5, 0.165, 24, "false"], [1, 80, 55, 0, 0, 19.1, 0.258, 21, "false"], [4, 123, 80, 15, 176, 32.0, 0.443, 34, "false"], [7, 81, 78, 40, 48, 46.7, 0.261, 42, "false"], [4, 134, 72, 0, 0, 23.8, 0.277, 60, "true"], [2, 142, 82, 18, 64, 24.7, 0.761, 21, "false"], [6, 144, 72, 27, 228, 33.9, 0.255, 40, "false"], [2, 92, 62, 28, 0, 31.6, 0.13, 24, "false"], [1, 71, 48, 18, 76, 20.4, 0.323, 22, "false"], [6, 93, 50, 30, 64, 28.7, 0.356, 23, "false"], [1, 122, 90, 51, 220, 49.7, 0.325, 31, "true"], [1, 163, 72, 0, 0, 39.0, 1.222, 33, "true"], [1, 151, 60, 0, 0, 26.1, 0.179, 22, "false"], [0, 125, 96, 0, 0, 22.5, 0.262, 21, "false"], [1, 81, 72, 18, 40, 26.6, 0.283, 24, "false"], [2, 85, 65, 0, 0, 39.6, 0.93, 27, "false"], [1, 126, 56, 29, 152, 28.7, 0.801, 21, "false"], [1, 96, 122, 0, 0, 22.4, 0.207, 27, "false"], [4, 144, 58, 28, 140, 29.5, 0.287, 37, "false"], [3, 83, 58, 31, 18, 34.3, 0.336, 25, "false"], [0, 95, 85, 25, 36, 37.4, 0.247, 24, "true"], [3, 171, 72, 33, 135, 33.3, 0.199, 24, "true"], [8, 155, 62, 26, 495, 34.0, 0.543, 46, "true"], [1, 89, 76, 34, 37, 31.2, 0.192, 23, "false"], [4, 76, 62, 0, 0, 34.0, 0.391, 25, "false"], [7, 160, 54, 32, 175, 30.5, 0.588, 39, "true"], [4, 146, 92, 0, 0, 31.2, 0.539, 61, "true"], [5, 124, 74, 0, 0, 34.0, 0.22, 38, "true"], [5, 78, 48, 0, 0, 33.7, 0.654, 25, "false"], [4, 97, 60, 23, 0, 28.2, 0.443, 22, "false"], [4, 99, 76, 15, 51, 23.2, 0.223, 21, "false"], [0, 162, 76, 56, 100, 53.2, 0.759, 25, "true"], [6, 111, 64, 39, 0, 34.2, 0.26, 24, "false"], [2, 107, 74, 30, 100, 33.6, 0.404, 23, "false"], [5, 132, 80, 0, 0, 26.8, 0.186, 69, "false"], [0, 113, 76, 0, 0, 33.3, 0.278, 23, "true"], [1, 88, 30, 42, 99, 55.0, 0.496, 26, "true"], [3, 120, 70, 30, 135, 42.9, 0.452, 30, "false"], [1, 118, 58, 36, 94, 33.3, 0.261, 23, "false"], [1, 117, 88, 24, 145, 34.5, 0.403, 40, "true"], [0, 105, 84, 0, 0, 27.9, 0.741, 62, "true"], [4, 173, 70, 14, 168, 29.7, 0.361, 33, "true"], [9, 122, 56, 0, 0, 33.3, 1.114, 33, "true"], [3, 170, 64, 37, 225, 34.5, 0.356, 30, "true"], [8, 84, 74, 31, 0, 38.3, 0.457, 39, "false"], [2, 96, 68, 13, 49, 21.1, 0.647, 26, "false"], [2, 125, 60, 20, 140, 33.8, 0.088, 31, "false"], [0, 100, 70, 26, 50, 30.8, 0.597, 21, "false"], [0, 93, 60, 25, 92, 28.7, 0.532, 22, "false"], [0, 129, 80, 0, 0, 31.2, 0.703, 29, "false"], [5, 105, 72, 29, 325, 36.9, 0.159, 28, "false"], [3, 128, 78, 0, 0, 21.1, 0.268, 55, "false"], [5, 106, 82, 30, 0, 39.5, 0.286, 38, "false"], [2, 108, 52, 26, 63, 32.5, 0.318, 22, "false"], [10, 108, 66, 0, 0, 32.4, 0.272, 42, "true"], [4, 154, 62, 31, 284, 32.8, 0.237, 23, "false"], [0, 102, 75, 23, 0, 0.0, 0.572, 21, "false"], [9, 57, 80, 37, 0, 32.8, 0.096, 41, "false"], [2, 106, 64, 35, 119, 30.5, 1.4, 34, "false"], [5, 147, 78, 0, 0, 33.7, 0.218, 65, "false"], [2, 90, 70, 17, 0, 27.3, 0.085, 22, "false"], [1, 136, 74, 50, 204, 37.4, 0.399, 24, "false"], [4, 114, 65, 0, 0, 21.9, 0.432, 37, "false"], [9, 156, 86, 28, 155, 34.3, 1.189, 42, "true"], [1, 153, 82, 42, 485, 40.6, 0.687, 23, "false"], [8, 188, 78, 0, 0, 47.9, 0.137, 43, "true"], [7, 152, 88, 44, 0, 50.0, 0.337, 36, "true"], [2, 99, 52, 15, 94, 24.6, 0.637, 21, "false"], [1, 109, 56, 21, 135, 25.2, 0.833, 23, "false"], [2, 88, 74, 19, 53, 29.0, 0.229, 22, "false"], [17, 163, 72, 41, 114, 40.9, 0.817, 47, "true"], [4, 151, 90, 38, 0, 29.7, 0.294, 36, "false"], [7, 102, 74, 40, 105, 37.2, 0.204, 45, "false"], [0, 114, 80, 34, 285, 44.2, 0.167, 27, "false"], [2, 100, 64, 23, 0, 29.7, 0.368, 21, "false"], [0, 131, 88, 0, 0, 31.6, 0.743, 32, "true"], [6, 104, 74, 18, 156, 29.9, 0.722, 41, "true"], [3, 148, 66, 25, 0, 32.5, 0.256, 22, "false"], [4, 120, 68, 0, 0, 29.6, 0.709, 34, "false"], [4, 110, 66, 0, 0, 31.9, 0.471, 29, "false"], [3, 111, 90, 12, 78, 28.4, 0.495, 29, "false"], [6, 102, 82, 0, 0, 30.8, 0.18, 36, "true"], [6, 134, 70, 23, 130, 35.4, 0.542, 29, "true"], [2, 87, 0, 23, 0, 28.9, 0.773, 25, "false"], [1, 79, 60, 42, 48, 43.5, 0.678, 23, "false"], [2, 75, 64, 24, 55, 29.7, 0.37, 33, "false"], [8, 179, 72, 42, 130, 32.7, 0.719, 36, "true"], [6, 85, 78, 0, 0, 31.2, 0.382, 42, "false"], [0, 129, 110, 46, 130, 67.1, 0.319, 26, "true"], [5, 143, 78, 0, 0, 45.0, 0.19, 47, "false"], [5, 130, 82, 0, 0, 39.1, 0.956, 37, "true"], [6, 87, 80, 0, 0, 23.2, 0.084, 32, "false"], [0, 119, 64, 18, 92, 34.9, 0.725, 23, "false"], [1, 0, 74, 20, 23, 27.7, 0.299, 21, "false"], [5, 73, 60, 0, 0, 26.8, 0.268, 27, "false"], [4, 141, 74, 0, 0, 27.6, 0.244, 40, "false"], [7, 194, 68, 28, 0, 35.9, 0.745, 41, "true"], [8, 181, 68, 36, 495, 30.1, 0.615, 60, "true"], [1, 128, 98, 41, 58, 32.0, 1.321, 33, "true"], [8, 109, 76, 39, 114, 27.9, 0.64, 31, "true"], [5, 139, 80, 35, 160, 31.6, 0.361, 25, "true"], [3, 111, 62, 0, 0, 22.6, 0.142, 21, "false"], [9, 123, 70, 44, 94, 33.1, 0.374, 40, "false"], [7, 159, 66, 0, 0, 30.4, 0.383, 36, "true"], [11, 135, 0, 0, 0, 52.3, 0.578, 40, "true"], [8, 85, 55, 20, 0, 24.4, 0.136, 42, "false"], [5, 158, 84, 41, 210, 39.4, 0.395, 29, "true"], [1, 105, 58, 0, 0, 24.3, 0.187, 21, "false"], [3, 107, 62, 13, 48, 22.9, 0.678, 23, "true"], [4, 109, 64, 44, 99, 34.8, 0.905, 26, "true"], [4, 148, 60, 27, 318, 30.9, 0.15, 29, "true"], [0, 113, 80, 16, 0, 31.0, 0.874, 21, "false"], [1, 138, 82, 0, 0, 40.1, 0.236, 28, "false"], [0, 108, 68, 20, 0, 27.3, 0.787, 32, "false"], [2, 99, 70, 16, 44, 20.4, 0.235, 27, "false"], [6, 103, 72, 32, 190, 37.7, 0.324, 55, "false"], [5, 111, 72, 28, 0, 23.9, 0.407, 27, "false"], [8, 196, 76, 29, 280, 37.5, 0.605, 57, "true"], [5, 162, 104, 0, 0, 37.7, 0.151, 52, "true"], [1, 96, 64, 27, 87, 33.2, 0.289, 21, "false"], [7, 184, 84, 33, 0, 35.5, 0.355, 41, "true"], [2, 81, 60, 22, 0, 27.7, 0.29, 25, "false"], [0, 147, 85, 54, 0, 42.8, 0.375, 24, "false"], [7, 179, 95, 31, 0, 34.2, 0.164, 60, "false"], [0, 140, 65, 26, 130, 42.6, 0.431, 24, "true"], [9, 112, 82, 32, 175, 34.2, 0.26, 36, "true"], [12, 151, 70, 40, 271, 41.8, 0.742, 38, "true"], [5, 109, 62, 41, 129, 35.8, 0.514, 25, "true"], [6, 125, 68, 30, 120, 30.0, 0.464, 32, "false"], [5, 85, 74, 22, 0, 29.0, 1.224, 32, "true"], [5, 112, 66, 0, 0, 37.8, 0.261, 41, "true"], [0, 177, 60, 29, 478, 34.6, 1.072, 21, "true"], [2, 158, 90, 0, 0, 31.6, 0.805, 66, "true"], [7, 119, 0, 0, 0, 25.2, 0.209, 37, "false"], [7, 142, 60, 33, 190, 28.8, 0.687, 61, "false"], [1, 100, 66, 15, 56, 23.6, 0.666, 26, "false"], [1, 87, 78, 27, 32, 34.6, 0.101, 22, "false"], [0, 101, 76, 0, 0, 35.7, 0.198, 26, "false"], [3, 162, 52, 38, 0, 37.2, 0.652, 24, "true"], [4, 197, 70, 39, 744, 36.7, 2.329, 31, "false"], [0, 117, 80, 31, 53, 45.2, 0.089, 24, "false"], [4, 142, 86, 0, 0, 44.0, 0.645, 22, "true"], [6, 134, 80, 37, 370, 46.2, 0.238, 46, "true"], [1, 79, 80, 25, 37, 25.4, 0.583, 22, "false"], [4, 122, 68, 0, 0, 35.0, 0.394, 29, "false"], [3, 74, 68, 28, 45, 29.7, 0.293, 23, "false"], [4, 171, 72, 0, 0, 43.6, 0.479, 26, "true"], [7, 181, 84, 21, 192, 35.9, 0.586, 51, "true"], [0, 179, 90, 27, 0, 44.1, 0.686, 23, "true"], [9, 164, 84, 21, 0, 30.8, 0.831, 32, "true"], [0, 104, 76, 0, 0, 18.4, 0.582, 27, "false"], [1, 91, 64, 24, 0, 29.2, 0.192, 21, "false"], [4, 91, 70, 32, 88, 33.1, 0.446, 22, "false"], [3, 139, 54, 0, 0, 25.6, 0.402, 22, "true"], [6, 119, 50, 22, 176, 27.1, 1.318, 33, "true"], [2, 146, 76, 35, 194, 38.2, 0.329, 29, "false"], [9, 184, 85, 15, 0, 30.0, 1.213, 49, "true"], [10, 122, 68, 0, 0, 31.2, 0.258, 41, "false"], [0, 165, 90, 33, 680, 52.3, 0.427, 23, "false"], [9, 124, 70, 33, 402, 35.4, 0.282, 34, "false"], [1, 111, 86, 19, 0, 30.1, 0.143, 23, "false"], [9, 106, 52, 0, 0, 31.2, 0.38, 42, "false"], [2, 129, 84, 0, 0, 28.0, 0.284, 27, "false"], [2, 90, 80, 14, 55, 24.4, 0.249, 24, "false"], [0, 86, 68, 32, 0, 35.8, 0.238, 25, "false"], [12, 92, 62, 7, 258, 27.6, 0.926, 44, "true"], [1, 113, 64, 35, 0, 33.6, 0.543, 21, "true"], [3, 111, 56, 39, 0, 30.1, 0.557, 30, "false"], [2, 114, 68, 22, 0, 28.7, 0.092, 25, "false"], [1, 193, 50, 16, 375, 25.9, 0.655, 24, "false"], [11, 155, 76, 28, 150, 33.3, 1.353, 51, "true"], [3, 191, 68, 15, 130, 30.9, 0.299, 34, "false"], [3, 141, 0, 0, 0, 30.0, 0.761, 27, "true"], [4, 95, 70, 32, 0, 32.1, 0.612, 24, "false"], [3, 142, 80, 15, 0, 32.4, 0.2, 63, "false"], [4, 123, 62, 0, 0, 32.0, 0.226, 35, "true"], [5, 96, 74, 18, 67, 33.6, 0.997, 43, "false"], [0, 138, 0, 0, 0, 36.3, 0.933, 25, "true"], [2, 128, 64, 42, 0, 40.0, 1.101, 24, "false"], [0, 102, 52, 0, 0, 25.1, 0.078, 21, "false"], [2, 146, 0, 0, 0, 27.5, 0.24, 28, "true"], [10, 101, 86, 37, 0, 45.6, 1.136, 38, "true"], [2, 108, 62, 32, 56, 25.2, 0.128, 21, "false"], [3, 122, 78, 0, 0, 23.0, 0.254, 40, "false"], [1, 71, 78, 50, 45, 33.2, 0.422, 21, "false"], [13, 106, 70, 0, 0, 34.2, 0.251, 52, "false"], [2, 100, 70, 52, 57, 40.5, 0.677, 25, "false"], [7, 106, 60, 24, 0, 26.5, 0.296, 29, "true"], [0, 104, 64, 23, 116, 27.8, 0.454, 23, "false"], [5, 114, 74, 0, 0, 24.9, 0.744, 57, "false"], [2, 108, 62, 10, 278, 25.3, 0.881, 22, "false"], [0, 146, 70, 0, 0, 37.9, 0.334, 28, "true"], [10, 129, 76, 28, 122, 35.9, 0.28, 39, "false"], [7, 133, 88, 15, 155, 32.4, 0.262, 37, "false"], [7, 161, 86, 0, 0, 30.4, 0.165, 47, "true"], [2, 108, 80, 0, 0, 27.0, 0.259, 52, "true"], [7, 136, 74, 26, 135, 26.0, 0.647, 51, "false"], [5, 155, 84, 44, 545, 38.7, 0.619, 34, "false"], [1, 119, 86, 39, 220, 45.6, 0.808, 29, "true"], [4, 96, 56, 17, 49, 20.8, 0.34, 26, "false"], [5, 108, 72, 43, 75, 36.1, 0.263, 33, "false"], [0, 78, 88, 29, 40, 36.9, 0.434, 21, "false"], [0, 107, 62, 30, 74, 36.6, 0.757, 25, "true"], [2, 128, 78, 37, 182, 43.3, 1.224, 31, "true"], [1, 128, 48, 45, 194, 40.5, 0.613, 24, "true"], [0, 161, 50, 0, 0, 21.9, 0.254, 65, "false"], [6, 151, 62, 31, 120, 35.5, 0.692, 28, "false"], [2, 146, 70, 38, 360, 28.0, 0.337, 29, "true"], [0, 126, 84, 29, 215, 30.7, 0.52, 24, "false"], [14, 100, 78, 25, 184, 36.6, 0.412, 46, "true"], [8, 112, 72, 0, 0, 23.6, 0.84, 58, "false"], [0, 167, 0, 0, 0, 32.3, 0.839, 30, "true"], [2, 144, 58, 33, 135, 31.6, 0.422, 25, "true"], [5, 77, 82, 41, 42, 35.8, 0.156, 35, "false"], [5, 115, 98, 0, 0, 52.9, 0.209, 28, "true"], [3, 150, 76, 0, 0, 21.0, 0.207, 37, "false"], [2, 120, 76, 37, 105, 39.7, 0.215, 29, "false"], [10, 161, 68, 23, 132, 25.5, 0.326, 47, "true"], [0, 137, 68, 14, 148, 24.8, 0.143, 21, "false"], [0, 128, 68, 19, 180, 30.5, 1.391, 25, "true"], [2, 124, 68, 28, 205, 32.9, 0.875, 30, "true"], [6, 80, 66, 30, 0, 26.2, 0.313, 41, "false"], [0, 106, 70, 37, 148, 39.4, 0.605, 22, "false"], [2, 155, 74, 17, 96, 26.6, 0.433, 27, "true"], [3, 113, 50, 10, 85, 29.5, 0.626, 25, "false"], [7, 109, 80, 31, 0, 35.9, 1.127, 43, "true"], [2, 112, 68, 22, 94, 34.1, 0.315, 26, "false"], [3, 99, 80, 11, 64, 19.3, 0.284, 30, "false"], [3, 182, 74, 0, 0, 30.5, 0.345, 29, "true"], [3, 115, 66, 39, 140, 38.1, 0.15, 28, "false"], [6, 194, 78, 0, 0, 23.5, 0.129, 59, "true"], [4, 129, 60, 12, 231, 27.5, 0.527, 31, "false"], [3, 112, 74, 30, 0, 31.6, 0.197, 25, "true"], [0, 124, 70, 20, 0, 27.4, 0.254, 36, "true"], [13, 152, 90, 33, 29, 26.8, 0.731, 43, "true"], [2, 112, 75, 32, 0, 35.7, 0.148, 21, "false"], [1, 157, 72, 21, 168, 25.6, 0.123, 24, "false"], [1, 122, 64, 32, 156, 35.1, 0.692, 30, "true"], [10, 179, 70, 0, 0, 35.1, 0.2, 37, "false"], [2, 102, 86, 36, 120, 45.5, 0.127, 23, "true"], [6, 105, 70, 32, 68, 30.8, 0.122, 37, "false"], [8, 118, 72, 19, 0, 23.1, 1.476, 46, "false"], [2, 87, 58, 16, 52, 32.7, 0.166, 25, "false"], [1, 180, 0, 0, 0, 43.3, 0.282, 41, "true"], [12, 106, 80, 0, 0, 23.6, 0.137, 44, "false"], [1, 95, 60, 18, 58, 23.9, 0.26, 22, "false"], [0, 165, 76, 43, 255, 47.9, 0.259, 26, "false"], [0, 117, 0, 0, 0, 33.8, 0.932, 44, "false"], [5, 115, 76, 0, 0, 31.2, 0.343, 44, "true"], [9, 152, 78, 34, 171, 34.2, 0.893, 33, "true"], [7, 178, 84, 0, 0, 39.9, 0.331, 41, "true"], [1, 130, 70, 13, 105, 25.9, 0.472, 22, "false"], [1, 95, 74, 21, 73, 25.9, 0.673, 36, "false"], [1, 0, 68, 35, 0, 32.0, 0.389, 22, "false"], [5, 122, 86, 0, 0, 34.7, 0.29, 33, "false"], [8, 95, 72, 0, 0, 36.8, 0.485, 57, "false"], [8, 126, 88, 36, 108, 38.5, 0.349, 49, "false"], [1, 139, 46, 19, 83, 28.7, 0.654, 22, "false"], [3, 116, 0, 0, 0, 23.5, 0.187, 23, "false"], [3, 99, 62, 19, 74, 21.8, 0.279, 26, "false"], [5, 0, 80, 32, 0, 41.0, 0.346, 37, "true"], [4, 92, 80, 0, 0, 42.2, 0.237, 29, "false"], [4, 137, 84, 0, 0, 31.2, 0.252, 30, "false"], [3, 61, 82, 28, 0, 34.4, 0.243, 46, "false"], [1, 90, 62, 12, 43, 27.2, 0.58, 24, "false"], [3, 90, 78, 0, 0, 42.7, 0.559, 21, "false"], [9, 165, 88, 0, 0, 30.4, 0.302, 49, "true"], [1, 125, 50, 40, 167, 33.3, 0.962, 28, "true"], [13, 129, 0, 30, 0, 39.9, 0.569, 44, "true"], [12, 88, 74, 40, 54, 35.3, 0.378, 48, "false"], [1, 196, 76, 36, 249, 36.5, 0.875, 29, "true"], [5, 189, 64, 33, 325, 31.2, 0.583, 29, "true"], [5, 158, 70, 0, 0, 29.8, 0.207, 63, "false"], [5, 103, 108, 37, 0, 39.2, 0.305, 65, "false"], [4, 146, 78, 0, 0, 38.5, 0.52, 67, "true"], [4, 147, 74, 25, 293, 34.9, 0.385, 30, "false"], [5, 99, 54, 28, 83, 34.0, 0.499, 30, "false"], [6, 124, 72, 0, 0, 27.6, 0.368, 29, "true"], [0, 101, 64, 17, 0, 21.0, 0.252, 21, "false"], [3, 81, 86, 16, 66, 27.5, 0.306, 22, "false"], [1, 133, 102, 28, 140, 32.8, 0.234, 45, "true"], [3, 173, 82, 48, 465, 38.4, 2.137, 25, "true"], [0, 118, 64, 23, 89, 0.0, 1.731, 21, "false"], [0, 84, 64, 22, 66, 35.8, 0.545, 21, "false"], [2, 105, 58, 40, 94, 34.9, 0.225, 25, "false"], [2, 122, 52, 43, 158, 36.2, 0.816, 28, "false"], [12, 140, 82, 43, 325, 39.2, 0.528, 58, "true"], [0, 98, 82, 15, 84, 25.2, 0.299, 22, "false"], [1, 87, 60, 37, 75, 37.2, 0.509, 22, "false"], [4, 156, 75, 0, 0, 48.3, 0.238, 32, "true"], [0, 93, 100, 39, 72, 43.4, 1.021, 35, "false"], [1, 107, 72, 30, 82, 30.8, 0.821, 24, "false"], [0, 105, 68, 22, 0, 20.0, 0.236, 22, "false"], [1, 109, 60, 8, 182, 25.4, 0.947, 21, "false"], [1, 90, 62, 18, 59, 25.1, 1.268, 25, "false"], [1, 125, 70, 24, 110, 24.3, 0.221, 25, "false"], [1, 119, 54, 13, 50, 22.3, 0.205, 24, "false"], [5, 116, 74, 29, 0, 32.3, 0.66, 35, "true"], [8, 105, 100, 36, 0, 43.3, 0.239, 45, "true"], [5, 144, 82, 26, 285, 32.0, 0.452, 58, "true"], [3, 100, 68, 23, 81, 31.6, 0.949, 28, "false"], [1, 100, 66, 29, 196, 32.0, 0.444, 42, "false"], [5, 166, 76, 0, 0, 45.7, 0.34, 27, "true"], [1, 131, 64, 14, 415, 23.7, 0.389, 21, "false"], [4, 116, 72, 12, 87, 22.1, 0.463, 37, "false"], [4, 158, 78, 0, 0, 32.9, 0.803, 31, "true"], [2, 127, 58, 24, 275, 27.7, 1.6, 25, "false"], [3, 96, 56, 34, 115, 24.7, 0.944, 39, "false"], [0, 131, 66, 40, 0, 34.3, 0.196, 22, "true"], [3, 82, 70, 0, 0, 21.1, 0.389, 25, "false"], [3, 193, 70, 31, 0, 34.9, 0.241, 25, "true"], [4, 95, 64, 0, 0, 32.0, 0.161, 31, "true"], [6, 137, 61, 0, 0, 24.2, 0.151, 55, "false"], [5, 136, 84, 41, 88, 35.0, 0.286, 35, "true"], [9, 72, 78, 25, 0, 31.6, 0.28, 38, "false"], [5, 168, 64, 0, 0, 32.9, 0.135, 41, "true"], [2, 123, 48, 32, 165, 42.1, 0.52, 26, "false"], [4, 115, 72, 0, 0, 28.9, 0.376, 46, "true"], [0, 101, 62, 0, 0, 21.9, 0.336, 25, "false"], [8, 197, 74, 0, 0, 25.9, 1.191, 39, "true"], [1, 172, 68, 49, 579, 42.4, 0.702, 28, "true"], [6, 102, 90, 39, 0, 35.7, 0.674, 28, "false"], [1, 112, 72, 30, 176, 34.4, 0.528, 25, "false"], [1, 143, 84, 23, 310, 42.4, 1.076, 22, "false"], [1, 143, 74, 22, 61, 26.2, 0.256, 21, "false"], [0, 138, 60, 35, 167, 34.6, 0.534, 21, "true"], [3, 173, 84, 33, 474, 35.7, 0.258, 22, "true"], [1, 97, 68, 21, 0, 27.2, 1.095, 22, "false"], [4, 144, 82, 32, 0, 38.5, 0.554, 37, "true"], [1, 83, 68, 0, 0, 18.2, 0.624, 27, "false"], [3, 129, 64, 29, 115, 26.4, 0.219, 28, "true"], [1, 119, 88, 41, 170, 45.3, 0.507, 26, "false"], [2, 94, 68, 18, 76, 26.0, 0.561, 21, "false"], [0, 102, 64, 46, 78, 40.6, 0.496, 21, "false"], [2, 115, 64, 22, 0, 30.8, 0.421, 21, "false"], [8, 151, 78, 32, 210, 42.9, 0.516, 36, "true"], [4, 184, 78, 39, 277, 37.0, 0.264, 31, "true"], [0, 94, 0, 0, 0, 0.0, 0.256, 25, "false"], [1, 181, 64, 30, 180, 34.1, 0.328, 38, "true"], [0, 135, 94, 46, 145, 40.6, 0.284, 26, "false"], [1, 95, 82, 25, 180, 35.0, 0.233, 43, "true"], [2, 99, 0, 0, 0, 22.2, 0.108, 23, "false"], [3, 89, 74, 16, 85, 30.4, 0.551, 38, "false"], [1, 80, 74, 11, 60, 30.0, 0.527, 22, "false"], [2, 139, 75, 0, 0, 25.6, 0.167, 29, "false"], [1, 90, 68, 8, 0, 24.5, 1.138, 36, "false"], [0, 141, 0, 0, 0, 42.4, 0.205, 29, "true"], [12, 140, 85, 33, 0, 37.4, 0.244, 41, "false"], [5, 147, 75, 0, 0, 29.9, 0.434, 28, "false"], [1, 97, 70, 15, 0, 18.2, 0.147, 21, "false"], [6, 107, 88, 0, 0, 36.8, 0.727, 31, "false"], [0, 189, 104, 25, 0, 34.3, 0.435, 41, "true"], [2, 83, 66, 23, 50, 32.2, 0.497, 22, "false"], [4, 117, 64, 27, 120, 33.2, 0.23, 24, "false"], [8, 108, 70, 0, 0, 30.5, 0.955, 33, "true"], [4, 117, 62, 12, 0, 29.7, 0.38, 30, "true"], [0, 180, 78, 63, 14, 59.4, 2.42, 25, "true"], [1, 100, 72, 12, 70, 25.3, 0.658, 28, "false"], [0, 95, 80, 45, 92, 36.5, 0.33, 26, "false"], [0, 104, 64, 37, 64, 33.6, 0.51, 22, "true"], [0, 120, 74, 18, 63, 30.5, 0.285, 26, "false"], [1, 82, 64, 13, 95, 21.2, 0.415, 23, "false"], [2, 134, 70, 0, 0, 28.9, 0.542, 23, "true"], [0, 91, 68, 32, 210, 39.9, 0.381, 25, "false"], [2, 119, 0, 0, 0, 19.6, 0.832, 72, "false"], [2, 100, 54, 28, 105, 37.8, 0.498, 24, "false"], [14, 175, 62, 30, 0, 33.6, 0.212, 38, "true"], [1, 135, 54, 0, 0, 26.7, 0.687, 62, "false"], [5, 86, 68, 28, 71, 30.2, 0.364, 24, "false"], [10, 148, 84, 48, 237, 37.6, 1.001, 51, "true"], [9, 134, 74, 33, 60, 25.9, 0.46, 81, "false"], [9, 120, 72, 22, 56, 20.8, 0.733, 48, "false"], [1, 71, 62, 0, 0, 21.8, 0.416, 26, "false"], [8, 74, 70, 40, 49, 35.3, 0.705, 39, "false"], [5, 88, 78, 30, 0, 27.6, 0.258, 37, "false"], [10, 115, 98, 0, 0, 24.0, 1.022, 34, "false"], [0, 124, 56, 13, 105, 21.8, 0.452, 21, "false"], [0, 74, 52, 10, 36, 27.8, 0.269, 22, "false"], [0, 97, 64, 36, 100, 36.8, 0.6, 25, "false"], [8, 120, 0, 0, 0, 30.0, 0.183, 38, "true"], [6, 154, 78, 41, 140, 46.1, 0.571, 27, "false"], [1, 144, 82, 40, 0, 41.3, 0.607, 28, "false"], [0, 137, 70, 38, 0, 33.2, 0.17, 22, "false"], [0, 119, 66, 27, 0, 38.8, 0.259, 22, "false"], [7, 136, 90, 0, 0, 29.9, 0.21, 50, "false"], [4, 114, 64, 0, 0, 28.9, 0.126, 24, "false"], [0, 137, 84, 27, 0, 27.3, 0.231, 59, "false"], [2, 105, 80, 45, 191, 33.7, 0.711, 29, "true"], [7, 114, 76, 17, 110, 23.8, 0.466, 31, "false"], [8, 126, 74, 38, 75, 25.9, 0.162, 39, "false"], [4, 132, 86, 31, 0, 28.0, 0.419, 63, "false"], [3, 158, 70, 30, 328, 35.5, 0.344, 35, "true"], [0, 123, 88, 37, 0, 35.2, 0.197, 29, "false"], [4, 85, 58, 22, 49, 27.8, 0.306, 28, "false"], [0, 84, 82, 31, 125, 38.2, 0.233, 23, "false"], [0, 145, 0, 0, 0, 44.2, 0.63, 31, "true"], [0, 135, 68, 42, 250, 42.3, 0.365, 24, "true"], [1, 139, 62, 41, 480, 40.7, 0.536, 21, "false"], [0, 173, 78, 32, 265, 46.5, 1.159, 58, "false"], [4, 99, 72, 17, 0, 25.6, 0.294, 28, "false"], [8, 194, 80, 0, 0, 26.1, 0.551, 67, "false"], [2, 83, 65, 28, 66, 36.8, 0.629, 24, "false"], [2, 89, 90, 30, 0, 33.5, 0.292, 42, "false"], [4, 99, 68, 38, 0, 32.8, 0.145, 33, "false"], [4, 125, 70, 18, 122, 28.9, 1.144, 45, "true"], [3, 80, 0, 0, 0, 0.0, 0.174, 22, "false"], [6, 166, 74, 0, 0, 26.6, 0.304, 66, "false"], [5, 110, 68, 0, 0, 26.0, 0.292, 30, "false"], [2, 81, 72, 15, 76, 30.1, 0.547, 25, "false"], [7, 195, 70, 33, 145, 25.1, 0.163, 55, "true"], [6, 154, 74, 32, 193, 29.3, 0.839, 39, "false"], [2, 117, 90, 19, 71, 25.2, 0.313, 21, "false"], [3, 84, 72, 32, 0, 37.2, 0.267, 28, "false"], [6, 0, 68, 41, 0, 39.0, 0.727, 41, "true"], [7, 94, 64, 25, 79, 33.3, 0.738, 41, "false"], [3, 96, 78, 39, 0, 37.3, 0.238, 40, "false"], [10, 75, 82, 0, 0, 33.3, 0.263, 38, "false"], [0, 180, 90, 26, 90, 36.5, 0.314, 35, "true"], [1, 130, 60, 23, 170, 28.6, 0.692, 21, "false"], [2, 84, 50, 23, 76, 30.4, 0.968, 21, "false"], [8, 120, 78, 0, 0, 25.0, 0.409, 64, "false"], [12, 84, 72, 31, 0, 29.7, 0.297, 46, "true"], [0, 139, 62, 17, 210, 22.1, 0.207, 21, "false"], [9, 91, 68, 0, 0, 24.2, 0.2, 58, "false"], [2, 91, 62, 0, 0, 27.3, 0.525, 22, "false"], [3, 99, 54, 19, 86, 25.6, 0.154, 24, "false"], [3, 163, 70, 18, 105, 31.6, 0.268, 28, "true"], [9, 145, 88, 34, 165, 30.3, 0.771, 53, "true"], [7, 125, 86, 0, 0, 37.6, 0.304, 51, "false"], [13, 76, 60, 0, 0, 32.8, 0.18, 41, "false"], [6, 129, 90, 7, 326, 19.6, 0.582, 60, "false"], [2, 68, 70, 32, 66, 25.0, 0.187, 25, "false"], [3, 124, 80, 33, 130, 33.2, 0.305, 26, "false"], [6, 114, 0, 0, 0, 0.0, 0.189, 26, "false"], [9, 130, 70, 0, 0, 34.2, 0.652, 45, "true"], [3, 125, 58, 0, 0, 31.6, 0.151, 24, "false"], [3, 87, 60, 18, 0, 21.8, 0.444, 21, "false"], [1, 97, 64, 19, 82, 18.2, 0.299, 21, "false"], [3, 116, 74, 15, 105, 26.3, 0.107, 24, "false"], [0, 117, 66, 31, 188, 30.8, 0.493, 22, "false"], [0, 111, 65, 0, 0, 24.6, 0.66, 31, "false"], [2, 122, 60, 18, 106, 29.8, 0.717, 22, "false"], [0, 107, 76, 0, 0, 45.3, 0.686, 24, "false"], [1, 86, 66, 52, 65, 41.3, 0.917, 29, "false"], [6, 91, 0, 0, 0, 29.8, 0.501, 31, "false"], [1, 77, 56, 30, 56, 33.3, 1.251, 24, "false"], [4, 132, 0, 0, 0, 32.9, 0.302, 23, "true"], [0, 105, 90, 0, 0, 29.6, 0.197, 46, "false"], [0, 57, 60, 0, 0, 21.7, 0.735, 67, "false"], [0, 127, 80, 37, 210, 36.3, 0.804, 23, "false"], [3, 129, 92, 49, 155, 36.4, 0.968, 32, "true"], [8, 100, 74, 40, 215, 39.4, 0.661, 43, "true"], [3, 128, 72, 25, 190, 32.4, 0.549, 27, "true"], [10, 90, 85, 32, 0, 34.9, 0.825, 56, "true"], [4, 84, 90, 23, 56, 39.5, 0.159, 25, "false"], [1, 88, 78, 29, 76, 32.0, 0.365, 29, "false"], [8, 186, 90, 35, 225, 34.5, 0.423, 37, "true"], [5, 187, 76, 27, 207, 43.6, 1.034, 53, "true"], [4, 131, 68, 21, 166, 33.1, 0.16, 28, "false"], [1, 164, 82, 43, 67, 32.8, 0.341, 50, "false"], [4, 189, 110, 31, 0, 28.5, 0.68, 37, "false"], [1, 116, 70, 28, 0, 27.4, 0.204, 21, "false"], [3, 84, 68, 30, 106, 31.9, 0.591, 25, "false"], [6, 114, 88, 0, 0, 27.8, 0.247, 66, "false"], [1, 88, 62, 24, 44, 29.9, 0.422, 23, "false"], [1, 84, 64, 23, 115, 36.9, 0.471, 28, "false"], [7, 124, 70, 33, 215, 25.5, 0.161, 37, "false"], [1, 97, 70, 40, 0, 38.1, 0.218, 30, "false"], [8, 110, 76, 0, 0, 27.8, 0.237, 58, "false"], [11, 103, 68, 40, 0, 46.2, 0.126, 42, "false"], [11, 85, 74, 0, 0, 30.1, 0.3, 35, "false"], [6, 125, 76, 0, 0, 33.8, 0.121, 54, "true"], [0, 198, 66, 32, 274, 41.3, 0.502, 28, "true"], [1, 87, 68, 34, 77, 37.6, 0.401, 24, "false"], [6, 99, 60, 19, 54, 26.9, 0.497, 32, "false"], [0, 91, 80, 0, 0, 32.4, 0.601, 27, "false"], [2, 95, 54, 14, 88, 26.1, 0.748, 22, "false"], [1, 99, 72, 30, 18, 38.6, 0.412, 21, "false"], [6, 92, 62, 32, 126, 32.0, 0.085, 46, "false"], [4, 154, 72, 29, 126, 31.3, 0.338, 37, "false"], [0, 121, 66, 30, 165, 34.3, 0.203, 33, "true"], [3, 78, 70, 0, 0, 32.5, 0.27, 39, "false"], [2, 130, 96, 0, 0, 22.6, 0.268, 21, "false"], [3, 111, 58, 31, 44, 29.5, 0.43, 22, "false"], [2, 98, 60, 17, 120, 34.7, 0.198, 22, "false"], [1, 143, 86, 30, 330, 30.1, 0.892, 23, "false"], [1, 119, 44, 47, 63, 35.5, 0.28, 25, "false"], [6, 108, 44, 20, 130, 24.0, 0.813, 35, "false"], [2, 118, 80, 0, 0, 42.9, 0.693, 21, "true"], [10, 133, 68, 0, 0, 27.0, 0.245, 36, "false"], [2, 197, 70, 99, 0, 34.7, 0.575, 62, "true"], [0, 151, 90, 46, 0, 42.1, 0.371, 21, "true"], [6, 109, 60, 27, 0, 25.0, 0.206, 27, "false"], [12, 121, 78, 17, 0, 26.5, 0.259, 62, "false"], [8, 100, 76, 0, 0, 38.7, 0.19, 42, "false"], [8, 124, 76, 24, 600, 28.7, 0.687, 52, "true"], [1, 93, 56, 11, 0, 22.5, 0.417, 22, "false"], [8, 143, 66, 0, 0, 34.9, 0.129, 41, "true"], [6, 103, 66, 0, 0, 24.3, 0.249, 29, "false"], [3, 176, 86, 27, 156, 33.3, 1.154, 52, "true"], [0, 73, 0, 0, 0, 21.1, 0.342, 25, "false"], [11, 111, 84, 40, 0, 46.8, 0.925, 45, "true"], [2, 112, 78, 50, 140, 39.4, 0.175, 24, "false"], [3, 132, 80, 0, 0, 34.4, 0.402, 44, "true"], [2, 82, 52, 22, 115, 28.5, 1.699, 25, "false"], [6, 123, 72, 45, 230, 33.6, 0.733, 34, "false"], [0, 188, 82, 14, 185, 32.0, 0.682, 22, "true"], [0, 67, 76, 0, 0, 45.3, 0.194, 46, "false"], [1, 89, 24, 19, 25, 27.8, 0.559, 21, "false"], [1, 173, 74, 0, 0, 36.8, 0.088, 38, "true"], [1, 109, 38, 18, 120, 23.1, 0.407, 26, "false"], [1, 108, 88, 19, 0, 27.1, 0.4, 24, "false"], [6, 96, 0, 0, 0, 23.7, 0.19, 28, "false"], [1, 124, 74, 36, 0, 27.8, 0.1, 30, "false"], [7, 150, 78, 29, 126, 35.2, 0.692, 54, "true"], [4, 183, 0, 0, 0, 28.4, 0.212, 36, "true"], [1, 124, 60, 32, 0, 35.8, 0.514, 21, "false"], [1, 181, 78, 42, 293, 40.0, 1.258, 22, "true"], [1, 92, 62, 25, 41, 19.5, 0.482, 25, "false"], [0, 152, 82, 39, 272, 41.5, 0.27, 27, "false"], [1, 111, 62, 13, 182, 24.0, 0.138, 23, "false"], [3, 106, 54, 21, 158, 30.9, 0.292, 24, "false"], [3, 174, 58, 22, 194, 32.9, 0.593, 36, "true"], [7, 168, 88, 42, 321, 38.2, 0.787, 40, "true"], [6, 105, 80, 28, 0, 32.5, 0.878, 26, "false"], [11, 138, 74, 26, 144, 36.1, 0.557, 50, "true"], [3, 106, 72, 0, 0, 25.8, 0.207, 27, "false"], [6, 117, 96, 0, 0, 28.7, 0.157, 30, "false"], [2, 68, 62, 13, 15, 20.1, 0.257, 23, "false"], [9, 112, 82, 24, 0, 28.2, 1.282, 50, "true"], [0, 119, 0, 0, 0, 32.4, 0.141, 24, "true"], [2, 112, 86, 42, 160, 38.4, 0.246, 28, "false"], [2, 92, 76, 20, 0, 24.2, 1.698, 28, "false"], [6, 183, 94, 0, 0, 40.8, 1.461, 45, "false"], [0, 94, 70, 27, 115, 43.5, 0.347, 21, "false"], [2, 108, 64, 0, 0, 30.8, 0.158, 21, "false"], [4, 90, 88, 47, 54, 37.7, 0.362, 29, "false"], [0, 125, 68, 0, 0, 24.7, 0.206, 21, "false"], [0, 132, 78, 0, 0, 32.4, 0.393, 21, "false"], [5, 128, 80, 0, 0, 34.6, 0.144, 45, "false"], [4, 94, 65, 22, 0, 24.7, 0.148, 21, "false"], [7, 114, 64, 0, 0, 27.4, 0.732, 34, "true"], [0, 102, 78, 40, 90, 34.5, 0.238, 24, "false"], [2, 111, 60, 0, 0, 26.2, 0.343, 23, "false"], [1, 128, 82, 17, 183, 27.5, 0.115, 22, "false"], [10, 92, 62, 0, 0, 25.9, 0.167, 31, "false"], [13, 104, 72, 0, 0, 31.2, 0.465, 38, "true"], [5, 104, 74, 0, 0, 28.8, 0.153, 48, "false"], [2, 94, 76, 18, 66, 31.6, 0.649, 23, "false"], [7, 97, 76, 32, 91, 40.9, 0.871, 32, "true"], [1, 100, 74, 12, 46, 19.5, 0.149, 28, "false"], [0, 102, 86, 17, 105, 29.3, 0.695, 27, "false"], [4, 128, 70, 0, 0, 34.3, 0.303, 24, "false"], [6, 147, 80, 0, 0, 29.5, 0.178, 50, "true"], [4, 90, 0, 0, 0, 28.0, 0.61, 31, "false"], [3, 103, 72, 30, 152, 27.6, 0.73, 27, "false"], [2, 157, 74, 35, 440, 39.4, 0.134, 30, "false"], [1, 167, 74, 17, 144, 23.4, 0.447, 33, "true"], [0, 179, 50, 36, 159, 37.8, 0.455, 22, "true"], [11, 136, 84, 35, 130, 28.3, 0.26, 42, "true"], [0, 107, 60, 25, 0, 26.4, 0.133, 23, "false"], [1, 91, 54, 25, 100, 25.2, 0.234, 23, "false"], [1, 117, 60, 23, 106, 33.8, 0.466, 27, "false"], [5, 123, 74, 40, 77, 34.1, 0.269, 28, "false"], [2, 120, 54, 0, 0, 26.8, 0.455, 27, "false"], [1, 106, 70, 28, 135, 34.2, 0.142, 22, "false"], [2, 155, 52, 27, 540, 38.7, 0.24, 25, "true"], [2, 101, 58, 35, 90, 21.8, 0.155, 22, "false"], [1, 120, 80, 48, 200, 38.9, 1.162, 41, "false"], [11, 127, 106, 0, 0, 39.0, 0.19, 51, "false"], [3, 80, 82, 31, 70, 34.2, 1.292, 27, "true"], [10, 162, 84, 0, 0, 27.7, 0.182, 54, "false"], [1, 199, 76, 43, 0, 42.9, 1.394, 22, "true"], [8, 167, 106, 46, 231, 37.6, 0.165, 43, "true"], [9, 145, 80, 46, 130, 37.9, 0.637, 40, "true"], [6, 115, 60, 39, 0, 33.7, 0.245, 40, "true"], [1, 112, 80, 45, 132, 34.8, 0.217, 24, "false"], [4, 145, 82, 18, 0, 32.5, 0.235, 70, "true"], [10, 111, 70, 27, 0, 27.5, 0.141, 40, "true"], [6, 98, 58, 33, 190, 34.0, 0.43, 43, "false"], [9, 154, 78, 30, 100, 30.9, 0.164, 45, "false"], [6, 165, 68, 26, 168, 33.6, 0.631, 49, "false"], [1, 99, 58, 10, 0, 25.4, 0.551, 21, "false"], [10, 68, 106, 23, 49, 35.5, 0.285, 47, "false"], [3, 123, 100, 35, 240, 57.3, 0.88, 22, "false"], [8, 91, 82, 0, 0, 35.6, 0.587, 68, "false"], [6, 195, 70, 0, 0, 30.9, 0.328, 31, "true"], [9, 156, 86, 0, 0, 24.8, 0.23, 53, "true"], [0, 93, 60, 0, 0, 35.3, 0.263, 25, "false"], [3, 121, 52, 0, 0, 36.0, 0.127, 25, "true"], [2, 101, 58, 17, 265, 24.2, 0.614, 23, "false"], [2, 56, 56, 28, 45, 24.2, 0.332, 22, "false"], [0, 162, 76, 36, 0, 49.6, 0.364, 26, "true"], [0, 95, 64, 39, 105, 44.6, 0.366, 22, "false"], [4, 125, 80, 0, 0, 32.3, 0.536, 27, "true"], [5, 136, 82, 0, 0, 0.0, 0.64, 69, "false"], [2, 129, 74, 26, 205, 33.2, 0.591, 25, "false"], [3, 130, 64, 0, 0, 23.1, 0.314, 22, "false"], [1, 107, 50, 19, 0, 28.3, 0.181, 29, "false"], [1, 140, 74, 26, 180, 24.1, 0.828, 23, "false"], [1, 144, 82, 46, 180, 46.1, 0.335, 46, "true"], [8, 107, 80, 0, 0, 24.6, 0.856, 34, "false"], [13, 158, 114, 0, 0, 42.3, 0.257, 44, "true"], [2, 121, 70, 32, 95, 39.1, 0.886, 23, "false"], [7, 129, 68, 49, 125, 38.5, 0.439, 43, "true"], [2, 90, 60, 0, 0, 23.5, 0.191, 25, "false"], [7, 142, 90, 24, 480, 30.4, 0.128, 43, "true"], [3, 169, 74, 19, 125, 29.9, 0.268, 31, "true"], [0, 99, 0, 0, 0, 25.0, 0.253, 22, "false"], [4, 127, 88, 11, 155, 34.5, 0.598, 28, "false"], [4, 118, 70, 0, 0, 44.5, 0.904, 26, "false"], [2, 122, 76, 27, 200, 35.9, 0.483, 26, "false"], [6, 125, 78, 31, 0, 27.6, 0.565, 49, "true"], [1, 168, 88, 29, 0, 35.0, 0.905, 52, "true"], [2, 129, 0, 0, 0, 38.5, 0.304, 41, "false"], [4, 110, 76, 20, 100, 28.4, 0.118, 27, "false"], [6, 80, 80, 36, 0, 39.8, 0.177, 28, "false"], [10, 115, 0, 0, 0, 0.0, 0.261, 30, "true"], [2, 127, 46, 21, 335, 34.4, 0.176, 22, "false"], [9, 164, 78, 0, 0, 32.8, 0.148, 45, "true"], [2, 93, 64, 32, 160, 38.0, 0.674, 23, "true"], [3, 158, 64, 13, 387, 31.2, 0.295, 24, "false"], [5, 126, 78, 27, 22, 29.6, 0.439, 40, "false"], [10, 129, 62, 36, 0, 41.2, 0.441, 38, "true"], [0, 134, 58, 20, 291, 26.4, 0.352, 21, "false"], [3, 102, 74, 0, 0, 29.5, 0.121, 32, "false"], [7, 187, 50, 33, 392, 33.9, 0.826, 34, "true"], [3, 173, 78, 39, 185, 33.8, 0.97, 31, "true"], [10, 94, 72, 18, 0, 23.1, 0.595, 56, "false"], [1, 108, 60, 46, 178, 35.5, 0.415, 24, "false"], [5, 97, 76, 27, 0, 35.6, 0.378, 52, "true"], [4, 83, 86, 19, 0, 29.3, 0.317, 34, "false"], [1, 114, 66, 36, 200, 38.1, 0.289, 21, "false"], [1, 149, 68, 29, 127, 29.3, 0.349, 42, "true"], [5, 117, 86, 30, 105, 39.1, 0.251, 42, "false"], [1, 111, 94, 0, 0, 32.8, 0.265, 45, "false"], [4, 112, 78, 40, 0, 39.4, 0.236, 38, "false"], [1, 116, 78, 29, 180, 36.1, 0.496, 25, "false"], [0, 141, 84, 26, 0, 32.4, 0.433, 22, "false"], [2, 175, 88, 0, 0, 22.9, 0.326, 22, "false"], [2, 92, 52, 0, 0, 30.1, 0.141, 22, "false"], [3, 130, 78, 23, 79, 28.4, 0.323, 34, "true"], [8, 120, 86, 0, 0, 28.4, 0.259, 22, "true"], [2, 174, 88, 37, 120, 44.5, 0.646, 24, "true"], [2, 106, 56, 27, 165, 29.0, 0.426, 22, "false"], [2, 105, 75, 0, 0, 23.3, 0.56, 53, "false"], [4, 95, 60, 32, 0, 35.4, 0.284, 28, "false"], [0, 126, 86, 27, 120, 27.4, 0.515, 21, "false"], [8, 65, 72, 23, 0, 32.0, 0.6, 42, "false"], [2, 99, 60, 17, 160, 36.6, 0.453, 21, "false"], [1, 102, 74, 0, 0, 39.5, 0.293, 42, "true"], [11, 120, 80, 37, 150, 42.3, 0.785, 48, "true"], [3, 102, 44, 20, 94, 30.8, 0.4, 26, "false"], [1, 109, 58, 18, 116, 28.5, 0.219, 22, "false"], [9, 140, 94, 0, 0, 32.7, 0.734, 45, "true"], [13, 153, 88, 37, 140, 40.6, 1.174, 39, "false"], [12, 100, 84, 33, 105, 30.0, 0.488, 46, "false"], [1, 147, 94, 41, 0, 49.3, 0.358, 27, "true"], [1, 81, 74, 41, 57, 46.3, 1.096, 32, "false"], [3, 187, 70, 22, 200, 36.4, 0.408, 36, "true"], [6, 162, 62, 0, 0, 24.3, 0.178, 50, "true"], [4, 136, 70, 0, 0, 31.2, 1.182, 22, "true"], [1, 121, 78, 39, 74, 39.0, 0.261, 28, "false"], [3, 108, 62, 24, 0, 26.0, 0.223, 25, "false"], [0, 181, 88, 44, 510, 43.3, 0.222, 26, "true"], [8, 154, 78, 32, 0, 32.4, 0.443, 45, "true"], [1, 128, 88, 39, 110, 36.5, 1.057, 37, "true"], [7, 137, 90, 41, 0, 32.0, 0.391, 39, "false"], [0, 123, 72, 0, 0, 36.3, 0.258, 52, "true"], [1, 106, 76, 0, 0, 37.5, 0.197, 26, "false"], [6, 190, 92, 0, 0, 35.5, 0.278, 66, "true"], [2, 88, 58, 26, 16, 28.4, 0.766, 22, "false"], [9, 170, 74, 31, 0, 44.0, 0.403, 43, "true"], [9, 89, 62, 0, 0, 22.5, 0.142, 33, "false"], [10, 101, 76, 48, 180, 32.9, 0.171, 63, "false"], [2, 122, 70, 27, 0, 36.8, 0.34, 27, "false"], [5, 121, 72, 23, 112, 26.2, 0.245, 30, "false"], [1, 126, 60, 0, 0, 30.1, 0.349, 47, "true"], [1, 93, 70, 31, 0, 30.4, 0.315, 23, "false"]]}

Dynamic scatterplot of the a sample from dataset 53fcdf440af5e86c5f005265

Controls:

  • Left click to choose X-axis.
  • Right click to choose Y-axis.
  • Alt + right click to choose color axis.
  • Repeat click (left, right, or alt) for log scale.
  • Hover over a point to see all field values.
  • Click a multi-point (larger circle) to cycle through values.
  • Drag box to zoom in.
  • Click on empty area to zoom out.
  • Choose plot granularity with keys 1-9 (1 is the default).
#!/usr/bin/env python
# -*- coding: utf-8 -*-
##############################################################################
# Copyright (c) 2014 BigML, Inc
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
##############################################################################
import sys
import argparse
import csv
import json
from bigml.api import BigML
DATATYPE = {
'int8': int,
'int16': int,
'double': float,
'string': str}
def main(args=sys.argv[1:]):
"""Parses command-line parameters and calls the actual main function.
"""
parser = argparse.ArgumentParser(
description="Generates Dynamic Scatterplot",
epilog="BigML, Inc")
# dataset
parser.add_argument('--dataset',
required=True,
action='store',
dest='dataset',
help="dataset/id")
args = parser.parse_args(args)
api = BigML()
dataset = api.get_dataset(args.dataset)
api.ok(dataset)
fields = dataset['object']['fields']
field_list = []
for k,v in fields.iteritems():
v['id'] = k
field_list.append(v)
fields = sorted(field_list, key=lambda field: field['order'])
before, sep, dataset_id = args.dataset.rpartition('dataset/')
csvfilename = dataset_id + '.csv'
jsonfilename = dataset_id + '.json'
csvfilename = api.download_dataset(args.dataset, csvfilename)
csvfile = open(csvfilename, 'r')
reader = csv.reader(csvfile)
headers = reader.next()
rows = []
for row in reader:
for i in range(len(row)):
row[i] = DATATYPE[fields[i]['datatype']](row[i])
rows.append(row)
dataset = {'fields': fields, 'rows': rows}
jsonfile = open(jsonfilename, 'w')
json.dump(dataset, jsonfile)
if __name__ == "__main__":
main()
</script>
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.domain {
stroke: #ddd;
stoke-width: 1px;
fill: none;
}
.tick line {
stroke: #ddd;
stroke-dasharray: 3,3;
}
.field {
cursor: pointer;
-moz-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
}
.brush .extent {
stroke: #fff;
fill-opacity: .125;
shape-rendering: crispEdges;
}
svg {
-webkit-user-select: none; /* webkit (safari, chrome) browsers */
-moz-user-select: none; /* mozilla browsers */
-khtml-user-select: none; /* webkit (konqueror) browsers */
-ms-user-select: none; /* IE10+ */
}
.field-marker {
}
</style>
<body oncontextmenu="return false;">
<script src="http://d3js.org/d3.v3.min.js"></script>
<script>
function getParam(key) {
if(key=(new RegExp('[?&]'+encodeURIComponent(key)+'=([^&]*)'))
.exec(location.search))
return decodeURIComponent(key[1]);
}
function setParam(key, value) {
key = encodeURI(key); value = encodeURI(value);
var s = document.location.search;
var kvp = key+"="+value;
var r = new RegExp("(&|\\?)"+key+"=[^\&]*");
s = s.replace(r,"$1"+kvp);
if(!RegExp.$1) {s += (s.length>0 ? '&' : '?') + kvp;};
window.history.replaceState({}, "", s);
}
function removeParam(key) {
var sourceURL = document.location.search;
var rtn = sourceURL.split("?")[0],
param,
params_arr = [],
queryString = (sourceURL.indexOf("?") !== -1) ? sourceURL.split("?")[1] : "";
if (queryString !== "") {
params_arr = queryString.split("&");
for (var i = params_arr.length - 1; i >= 0; i -= 1) {
param = params_arr[i].split("=")[0];
if (param === key) {
params_arr.splice(i, 1);
}
}
rtn = rtn + "?" + params_arr.join("&");
}
window.history.replaceState({}, "", rtn);
}
var margin = {top: 20, right: 20, bottom: 20, left: 20},
width = 1000 - margin.left - margin.right,
height = 640 - margin.bottom - margin.top;
var svg = d3.select("body").append("svg")
.attr("width", width + margin.left + margin.right)
.attr("height", height + margin.top + margin.bottom)
.append("g")
.attr("transform", "translate(" + margin.left + "," + margin.top + ")");
var defs = d3.select("svg").append("defs");
d3.json("53fcdf440af5e86c5f005265.json", function(error, data) {
var fields = data.fields;
var rows = data.rows;
var shows;
var buffer = width / 20;
var field_size = width / 4;
var right_fields = 250;
var plotWidth = width - 2 * buffer - right_fields;
var plotHeight = 0.75 * height;
resetConstraints();
function resetConstraints() {
for (var i = 0; i < fields.length; i++) {
fields[i].constraint = false;
}
shows = [];
for (var i = 0; i < rows.length; i++) {
shows.push(true);
}
evalConstraints();
}
function evalConstraints() {
var visiblePoints = 0;
for (var i = 0; i < rows.length; i++) {
var show = true;
for (var j = 0; j < fields.length && show; j++) {
var field = fields[j];
if (field.constraint) {
var val = rows[i][j];
if ((field.optype == "numeric" &&
(val < field.minConstraint || val > field.maxConstraint)) ||
(field.optype == "categorical" && !(val in field.catConstraint))) {
show = false;
}
}
}
if (show) visiblePoints += 1;
shows[i] = show;
}
if (visiblePoints == 0) {
resetConstraints();
} else {
r = Math.pow((6 * Math.min(plotWidth, plotHeight)) / Math.min(visiblePoints, 1024), 0.5);
}
}
var brushX = d3.scale.identity().domain([buffer, plotWidth]),
brushY = d3.scale.identity().domain([0, plotHeight]);
var brushExtent;
var brush = d3.svg.brush()
.x(brushX)
.y(brushY)
.on("brush", brushed)
.on("brushend", brushended);
svg.append("g")
.attr("class", "brush")
.call(brush)
.call(brush.event);
function brushed() {
brushExtent = brush.extent();
}
function brushended() {
var validConstraint = true;
if (!d3.event.sourceEvent) return; // only transition after input
if (fields[x].optype == "numeric") {
fields[x].minConstraint = xScale.invert(brushExtent[0][0]);
fields[x].maxConstraint = xScale.invert(brushExtent[1][0]);
} else {
var cats = fields[x].cats;
var selected = {};
for (var i = 0; i < cats.length; i++) {
var val = xScale(cats[i]);
if (val >= brushExtent[0][0] && val <= brushExtent[1][0]) {
selected[cats[i]] = true;
}
}
fields[x].catConstraint = selected;
}
if (fields[y].optype == "numeric") {
fields[y].minConstraint = yScale.invert(brushExtent[1][1]);
fields[y].maxConstraint = yScale.invert(brushExtent[0][1]);
} else {
var cats = fields[y].cats;
var selected = {};
for (var i = 0; i < cats.length; i++) {
var val = yScale(cats[i]);
if (val >= brushExtent[0][1] && val <= brushExtent[1][1]) {
selected[cats[i]] = true;
}
}
if (selected.length == 0) {
validConstraint = false;
}
fields[y].catConstraint = selected;
}
d3.select(this).call(brush.extent([[0, 0], [0, 0]]));
if (validConstraint) {
fields[x].constraint = true;
fields[y].constraint = true;
evalConstraints();
updateForClick();
} else {
fields[x].constraint = false;
fields[y].constraint = false;
}
}
var maxNameChars = 0;
for (var i = 0; i < fields.length; i++) {
maxNameChars = Math.max(maxNameChars, fields[i].name.length);
}
var valueOffset = 9 * maxNameChars;
for (var i = 0; i < fields.length; i++) {
fields[i].constraint = false;
makeField(fields[i], i);
calcRange(i);
}
var hintY = i * 28;
var hintX = width - right_fields - buffer;
hint = svg.append("g").attr("class", "hint").style("font-size","12px");
hint.append("text")
.attr("transform", "translate(" + hintX + "," + (hintY + 20) + ")")
.text("Left click --> Set X Axis");
hint.append("text")
.attr("transform", "translate(" + hintX + "," + (hintY + 35) + ")")
.text("Right click --> Set Y Axis");
hint.append("text")
.attr("transform", "translate(" + hintX + "," + (hintY + 50) + ")")
.text("Alt + left click --> Set Color");
var fcX = width - right_fields - buffer + valueOffset;
var fcY = -5;
svg.append("g").attr("class", "field-counter").append("text")
.attr("transform", "translate(" + fcX + "," + fcY + ")");
var gx, gy;
var xAxis, yAxis;
var xScale;
var yScale;
var uniqueMap;
var xMap;
var yMap;
var colorMap;
var colorFn;
var currentRow = null;
var currentIds;
var x = getParam("x");
var y = getParam("y");
var c = getParam("c");
if (x == null) x = 4;
if (y == null) y = 1;
if (c == null) c = fields.length - 1;
setParam("x", x);
setParam("y", y);
setParam("c", c);
var xLogMode = getParam("xLog");
var yLogMode = getParam("yLog");
var cLogMode = getParam("cLog");
if (xLogMode == null) xLogMode = false;
if (yLogMode == null) yLogMode = false;
if (cLogMode == null) cLogMode = false;
var granularity = getParam("g");
if (granularity == null) granularity = 1;
var pointIndex = 0;
var r;
makeAxis();
makePoints();
updateForClick();
function genKey(row) {
var xVal, yVal;
var g = 1 + ((granularity - 1) * 5);
if (fields[x].optype == "numeric") {
xVal = Math.round(xScale(row[x]) / g) * g;
} else {
xVal = row[x];
}
if (fields[y].optype == "numeric") {
yVal = Math.round(yScale(row[y]) / g) * g;
} else {
yVal = row[y];
}
return xVal.toString() + "," + yVal.toString();
}
d3.select("body").on("keydown", keydown);
function keydown() {
var needUpdate = true;
var lastKeyDown = d3.event.keyCode;
if (lastKeyDown >= 49 && lastKeyDown <= 57) {
granularity = lastKeyDown - 48;
if (granularity == 1) {
removeParam("g");
} else {
setParam("g", granularity);
}
updateForClick();
}
}
function updateForClick() {
updateScales();
updateUniqueMap();
updateColorFn();
updatePoints();
updateFieldMarkers();
updateAxis();
}
function makeField(field, index) {
var x_loc = width - right_fields - buffer;
var y_loc = 20 + index * 28;
var field_text = svg.append("g")
.attr("class", "field");
field_text.append("text")
.attr("class", "field")
.attr("transform", "translate(" + x_loc + "," + y_loc + ")")
.on("click", function() {
if (d3.event.altKey) {
if (c == index && fields[c].optype == "numeric") {
cLogMode = !cLogMode;
} else {
cLogMode = false;
}
if (cLogMode == true) {
setParam("cLog", true);
} else {
removeParam("cLog");
}
c = index;
setParam("c", index);
} else {
if (x == index && fields[x].optype == "numeric") {
xLogMode = !xLogMode;
} else {
xLogMode = false;
}
if (xLogMode == true) {
setParam("xLog", true);
} else {
removeParam("xLog");
}
x = index;
setParam("x", index);
}
updateForClick();
})
.on("contextmenu", function() {
if (y == index && fields[y].optype == "numeric") {
yLogMode = !yLogMode;
} else {
yLogMode = false;
}
if (yLogMode == true) {
setParam("yLog", true);
} else {
removeParam("yLog");
}
y = index;
setParam("y", index);
updateForClick();
})
.text(field.name);
svg.append("g")
.append("text")
.attr("class", "field-value")
.attr("transform", "translate(" + (valueOffset + x_loc) + "," + y_loc + ")");
svg.append("g")
.append("text")
.attr("class", "field-marker")
.attr("transform", "translate(" + (-6 + x_loc) + "," + y_loc + ")")
.style("text-anchor", "end")
.text("");
}
function makeAxis() {
gy = svg.append("g")
.attr("class", "y-axis")
.attr("transform", "translate(" + buffer + "," + 0 + ")");
gx = svg.append("g")
.attr("class", "x-axis")
.attr("transform", "translate(" + 0 + "," + plotHeight + ")");
}
function updateAxis() {
var currentY = gy.transition()
.duration(700)
.call(yAxis);
if (fields[y].optype == "categorical") {
currentY.selectAll("text")
.attr("y", 10)
.attr("x", 2)
.style("fill", "#999")
.style("font-size", "13")
.style("text-anchor", "start");
}
var currentX = gx.transition()
.duration(700)
.call(xAxis);
if (fields[x].optype == "categorical") { // && fields[x].cats.length > 4) {
currentX.selectAll("text")
.attr("y", 5)
.attr("x", 2)
.attr("transform", "rotate(-90)")
.style("fill", "#999")
.style("font-size", "13")
.style("text-anchor", "start");
}
}
function updateFieldMarkers() {
var ids = Array.apply(null, Array(fields.length)).map(function (_, i) {return i;});
svg.selectAll(".field-marker")
.data(ids)
.text(function(d) {
var marker = "";
if (d == x) {
if (xLogMode) {
marker += "x";
} else {
marker += "X";
}
}
if (d == y) {
if (yLogMode) {
marker += "y";
} else {
marker += "Y";
}
}
if (d == c) {
if (cLogMode) {
marker += "c";
} else {
marker += "C";
}
}
if (marker != "") { marker += ":"};
return marker;
})
}
function updateFieldValues() {
var ids = Array.apply(null, Array(fields.length)).map(function (_, i) {return i;});
var currentRow;
if (currentIds != null) {
currentRow = rows[currentIds[pointIndex % currentIds.length]];
}
svg.selectAll(".field-value")
.data(ids)
.text(function(d) {
var val = "";
if (currentRow != null) {
val += currentRow[d].toString();
}
return val;
});
svg.select(".field-counter").select("text")
.text(function(d) {
var str = "";
if (currentIds != null && currentIds.length > 1) {
str += (1 + pointIndex % currentIds.length) + " of " + currentIds.length;
}
return str;
});
}
function updateUniqueMap() {
uniqueMap = {};
for (var i = 0; i < rows.length; i++) {
if (shows[i]) {
var key = genKey(rows[i]);
if (key in uniqueMap) {
uniqueMap[key].push(i);
} else {
uniqueMap[key] = [i];
}
}
}
colorMap = {};
xMap = {};
yMap = {};
for (var key in uniqueMap) {
var ids = uniqueMap[key];
if (ids.length > 1) {
if (fields[x].optype == "numeric") {
var sum = 0;
for (var j = 0; j < ids.length; j++) {
sum += rows[ids[j]][x];
}
xMap[key] = sum / ids.length;
} else {
xMap[key] = rows[ids[0]][x];
}
if (fields[y].optype == "numeric") {
var sum = 0;
for (var j = 0; j < ids.length; j++) {
sum += rows[ids[j]][y];
}
yMap[key] = sum / ids.length;
} else {
yMap[key] = rows[ids[0]][y];
}
if (fields[c].optype == "numeric") {
var sum = 0;
for (var j = 0; j < ids.length; j++) {
sum += rows[ids[j]][c];
}
colorMap[key] = sum / ids.length;
} else {
var cat_counts = {};
for (var j = 0; j < ids.length; j++) {
var cat = rows[ids[j]][c];
if (cat in cat_counts) {
cat_counts[cat] = cat_counts[cat] + 1;
} else {
cat_counts[cat] = 1;
}
}
var max_count = 0;
var max_cat;
for (cat in cat_counts) {
if (cat_counts[cat] > max_count) {
max_count = cat_counts[cat];
max_cat = cat;
}
}
colorMap[key] = max_cat;
if (rows[ids[0]][c] != max_cat) {
for (var j = 0; j < ids.length; j++) {
if (rows[ids[j]][c] == max_cat) {
var temp = ids[0];
ids[0] = ids[j];
ids[j] = temp;
break;
}
}
}
}
} else {
colorMap[key] = rows[ids[0]][c];
xMap[key] = rows[ids[0]][x];
yMap[key] = rows[ids[0]][y];
}
}
}
function updateColorFn() {
if (fields[c].optype == "numeric") {
if (cLogMode && fields[c].min > 0) {
colorFn = d3.scale.log()
.domain([fields[c].min, fields[c].max])
.range(["#3f3", "#f55"])
} else {
if (cLogMode) removeParam("cLog");
colorFn = d3.scale.linear()
.domain([fields[c].min, fields[c].max])
.range(["#3f3", "#f55"])
}
} else {
if (fields[c].cats.length <= 10) {
colorFn = d3.scale.category10().domain(fields[c].cats);
} else {
colorFn = d3.scale.category20().domain(fields[c].cats);
}
}
}
function calcRange(col) {
if (fields[col].optype == "numeric") {
var min = rows[0][col];
var max = rows[0][col];
for (var i = 0; i < rows.length; i++) {
min = Math.min(min, rows[i][col]);
max = Math.max(max, rows[i][col]);
}
fields[col].min = min;
fields[col].max = max;
} else {
var categories = {};
for (var i = 0; i < rows.length; i++) {
var val = rows[i][col];
if (val == null || val == "") {
val = "?";
rows[i][col] = val;
}
categories[val] = true;
}
var finalCats = [];
for (var cat in categories) {
finalCats.push(cat);
}
fields[col].cats = finalCats.sort();
}
}
function updateScale(col, rangeMin, rangeMax, isX) {
if (fields[col].optype == "numeric") {
var firstIndex;
for (firstIndex = 0; firstIndex < shows.length; firstIndex++) {
if (shows[firstIndex]) {
break;
}
}
var min = rows[firstIndex][col];
var max = rows[firstIndex][col];
var uniques = {};
var uniqueCount = 0;
for (var i = 0; i < rows.length; i++) {
if (shows[i]) {
var key = rows[i][col].toString();
if (!(key in uniques)) {
uniques[key] = true;
uniqueCount += 1;
}
min = Math.min(min, rows[i][col]);
max = Math.max(max, rows[i][col]);
}
}
if (min == max) {
var buf = (fields[col].max - fields[col].min) / 100;
if (buf == 0) {
buf = 0.1;
}
min -= buf;
max += buf;
}
if (min > 0 && ((col == x && xLogMode && isX) || (col == y && yLogMode && !isX))) {
return d3.scale.log()
.range([rangeMin, rangeMax])
.domain([min, max]);
} else {
if (min <= 0 && ((col == x && xLogMode && isX) || (col == y && yLogMode && !isX))) {
if (isX) {
xLogMode = false;
removeParam("xLog");
} else {
yLogMode = false;
removeParam("yLog");
}
}
var diff = max - min;
if (uniqueCount > 4) {
max += diff / 30;
min -= diff / 30;
} else {
max += diff / 5;
min -= diff / 5;
}
return d3.scale.linear()
.range([rangeMin, rangeMax])
.domain([min, max]);
}
} else {
if (isX) {
xLogMode = false;
} else {
yLogMode = false;
}
var categories = {};
for (var i = 0; i < rows.length; i++) {
categories[rows[i][col]] = true;
}
var finalCats = [];
for (var cat in categories) {
if (!fields[col].constraint || cat in fields[col].catConstraint) {
finalCats.push(cat);
}
}
return d3.scale.ordinal()
.domain(finalCats.sort())
.rangePoints([rangeMin, rangeMax], 1);
}
}
function updateScales () {
xScale = updateScale(x, buffer, plotWidth, true);
yScale = updateScale(y, plotHeight, 0, false);
xAxis = d3.svg.axis()
.scale(xScale)
.orient("bottom")
.tickPadding(10)
.tickSize(-plotHeight);
yAxis = d3.svg.axis()
.scale(yScale)
.orient("left")
.tickPadding(10)
.tickSize(-plotWidth + buffer);
}
function point_size(index) {
if (shows[index]) {
return r * Math.pow(uniqueMap[genKey(rows[index])].length, 0.5);
} else {
return r;
}
}
function makePoints() {
svg.selectAll(".data")
.data(Array.apply(null, Array(rows.length)).map(function (_, i) {return i;}))
.enter()
.append("g")
.attr("class", "data")
.style("opacity", "0")
.style("fill", "#fff")
.style("stroke", "#fff")
.style("stroke-width", "1.5")
.append("circle")
.attr("class", "point")
.on("click", function(d) {
pointIndex += 1;
updateFieldValues();
})
.on("mouseover", function(d) {
d3.select(this)
.attr("r", point_size(d) + Math.pow(point_size(d), 0.15) + 1);
currentIds = uniqueMap[genKey(rows[d])];
updateFieldValues();
})
.on("mouseout", function(d) {
d3.select(this)
.attr("r", (point_size(d)));
currentIds = null;
pointIndex = 0;
updateFieldValues();
});
}
function updatePoints() {
var transitions = 0;
svg.selectAll(".data")
.style("cursor", function (d) {
if (shows[d] && uniqueMap[genKey(rows[d])].length > 1) {
return "pointer";
} else {
return "auto";
}
})
.sort(function (a, b) {
var pa = point_size(a);
var pb = point_size(b);
if (pa == pb) {
if (a > b) {
return -1;
} else {
return 1;
}
}
if (pa > pb) {
return -1;
} else {
return 1;
}
})
.transition()
.duration(700)
.style("opacity", function (d) {
if (shows[d] && uniqueMap[genKey(rows[d])][0] == d) {
return "0.9";
} else {
return "0";
}
})
.style("fill", function(d) {
if (shows[d]) {
return colorFn(colorMap[genKey(rows[d])]);
} else {
return "#999";
}
})
.style("stroke", function(d) {
if (shows[d]) {
return d3.rgb(colorFn(colorMap[genKey(rows[d])])).darker(0.3);
} else {
return "#999";
}
})
.select(".point")
.attr("display", function (d) {
if (shows[d]) {
return "inherit";
} else {
return "none";
}
})
.attr("r", function(d) {
return point_size(d);
})
.attr("cx", function(d) {
var key = genKey(rows[d]);
if (key in xMap) {
return xScale(xMap[key]);
} else {
if (fields[x].optype == "numeric") {
return Math.round(xScale(rows[d][x]));
} else {
return xScale(rows[d][x]);
}
}
})
.attr("cy", function(d) {
var key = genKey(rows[d]);
if (key in yMap) {
return yScale(yMap[key]);
} else {
if (fields[y].optype == "numeric") {
return Math.round(yScale(rows[d][y]));
} else {
return yScale(rows[d][y]);
}
}
})
.transition()
.attr("display", function (d) {
if (shows[d] && uniqueMap[genKey(rows[d])][0] == d) {
return "inherit";
} else {
return "none";
}
});
}
function revealPoints() {
svg.selectAll(".data")
.data(Array.apply(null, Array(rows.length)).map(function (_, i) {return i;}))
.select(".point")
}
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment