Skip to content

Instantly share code, notes, and snippets.

@loveice622
Last active November 14, 2017 17:30
Show Gist options
  • Save loveice622/e5d8d3bc665e394c08f425946bdea636 to your computer and use it in GitHub Desktop.
Save loveice622/e5d8d3bc665e394c08f425946bdea636 to your computer and use it in GitHub Desktop.
GazeMap
license: mit
x y mouseX mouseY TimeStamp
893.5 911.8 635 427 498394503
772.5 625.1 635 427 498394864
884.6 728.0 635 427 498394909
953.9 1036.5 635 427 498395000
953.9 1036.5 669 438 498395032
1220.2 1007.1 669 438 498395091
1300.8 1013.3 669 438 498395127
1297.2 1020.3 669 438 498395157
1039.2 1089.2 669 438 498395247
1115.6 930.4 669 438 498395262
1253.4 748.0 669 438 498395306
1145.1 747.0 669 438 498395358
1040.4 745.4 669 438 498395397
905.9 783.4 669 438 498395442
923.1 852.6 669 438 498395531
928.8 833.3 669 438 498395576
928.8 833.3 668 439 498395606
1112.9 768.6 667 440 498395621
1132.3 756.5 664 442 498395667
1121.6 758.8 663 442 498395711
1125.2 765.4 662 443 498395756
830.3 788.3 662 443 498395802
830.2 832.3 662 443 498395811
812.9 831.7 662 443 498395846
819.1 839.6 662 443 498395891
1079.9 495.2 662 443 498395978
1011.5 377.2 663 324 498395995
984.7 392.9 663 324 498396020
1001.8 403.9 663 324 498396039
843.4 735.0 663 718 498396058
815.0 721.2 663 718 498396073
834.6 639.7 663 718 498396103
845.7 663.5 663 718 498396118
900.7 639.3 663 718 498396146
912.6 701.3 663 718 498396163
981.9 758.0 663 718 498396191
1005.6 763.9 663 718 498396208
1076.6 821.0 663 718 498396254
1072.9 817.7 663 718 498396283
1072.0 813.5 663 718 498396296
1049.8 781.1 663 718 498396327
990.4 779.3 663 816 498396343
985.0 775.6 663 816 498396372
989.8 1177.1 663 1211 498396418
1039.8 1224.1 663 1211 498396432
1026.8 1146.0 663 1211 498396461
1026.8 1140.1 663 1211 498396477
1026.6 1229.1 661 1311 498396506
1030.7 1242.6 661 1311 498396521
999.4 1235.6 661 1311 498396553
1007.3 1241.3 661 1311 498396567
1019.8 1259.5 661 1311 498396596
1049.6 1278.9 661 1311 498396611
1002.5 1324.6 661 1410 498396642
1030.7 1348.6 661 1410 498396656
1011.4 1722.3 657 1806 498396704
1046.5 1692.4 657 1806 498396731
1022.6 1703.4 657 1806 498396746
1018.7 1699.7 657 1806 498396777
1018.5 1707.3 657 1806 498396793
999.0 1698.9 657 1806 498396821
986.0 1695.5 657 1806 498396866
985.7 1700.6 657 1806 498396883
970.5 1805.9 657 1904 498396911
1037.6 1866.8 657 1904 498396927
964.6 1865.6 657 1904 498396957
979.1 1910.6 657 1904 498396971
969.2 2403.9 653 2400 498397002
982.3 2431.6 653 2400 498397018
949.8 2383.1 653 2400 498397046
968.8 2415.1 653 2400 498397062
952.0 2387.2 653 2400 498397093
974.2 2418.3 653 2400 498397107
953.8 2373.4 653 2400 498397153
958.6 2380.4 653 2400 498397181
976.1 2499.3 650 2501 498397198
923.6 2554.7 650 2501 498397225
952.4 2587.7 650 2501 498397242
905.7 3115.6 648 2994 498397272
861.1 3126.4 648 2994 498397316
871.7 3119.3 648 2994 498397332
875.4 3079.1 648 2994 498397361
891.9 3107.4 648 2994 498397377
881.7 3114.4 645 2996 498397406
888.1 3116.8 645 2996 498397421
946.6 3123.0 645 2996 498397454
968.3 3122.9 645 2996 498397467
997.7 3219.5 645 3095 498397497
994.7 3209.3 556 3145 498397512
987.3 3204.9 556 3145 498397541
984.9 3197.0 556 3145 498397556
959.1 3573.0 160 3694 498397605
936.5 3554.7 108 3758 498397631
832.4 3558.0 106 3773 498397647
791.4 3624.4 106 3789 498397678
813.5 3596.7 108 3792 498397692
798.0 3649.1 110 3795 498397722
869.9 3721.0 144 3808 498397767
875.4 3697.8 144 3808 498397782
848.6 3704.7 144 3808 498397812
854.8 3702.3 144 3808 498397828
842.5 3805.9 365 3898 498397857
782.6 3852.8 454 3888 498397874
769.9 3853.0 545 3858 498397903
781.5 3842.0 569 3852 498397916
795.1 3840.1 641 3841 498397946
799.6 3864.9 675 3835 498397961
817.3 3869.6 734 3823 498397991
818.6 3870.6 751 3820 498398007
869.0 3869.9 762 3817 498398052
882.4 3864.2 762 3817 498398081
834.4 3870.0 764 3817 498398098
843.0 3857.5 766 3820 498398129
930.5 3848.2 766 3821 498398143
1105.9 3877.6 766 3822 498398172
1193.2 3860.3 766 3823 498398199
1156.7 3860.3 766 3823 498398216
1089.9 3873.7 767 3825 498398231
1147.5 3861.0 771 3825 498398261
1145.9 3854.8 775 3826 498398276
1027.5 3852.1 780 3826 498398306
1025.5 3846.8 783 3827 498398321
1014.3 3839.4 799 3828 498398353
1009.4 3846.8 809 3829 498398366
1016.6 3858.7 839 3834 498398396
1017.1 3857.7 870 3838 498398411
1045.0 3862.3 948 3873 498398442
1063.1 3874.5 977 3891 498398456
1322.5 3903.9 1004 3910 498398503
1781.8 3965.3 1012 3917 498398531
1578.4 3928.0 1014 3919 498398547
1398.8 3903.3 1015 3923 498398577
1640.3 3868.7 1015 3923 498398591
1873.8 3845.8 1014 3925 498398622
1857.6 3858.6 1007 3929 498398666
1876.0 3851.7 995 3930 498398682
1860.5 3845.7 948 3927 498398713
1885.9 3845.1 925 3923 498398727
1906.4 3841.1 890 3914 498398756
1927.8 3835.3 878 3909 498398772
1879.2 3875.0 858 3900 498398802
1875.2 3859.4 853 3898 498398815
1906.8 3802.3 849 3896 498398847
1907.1 3798.9 848 3896 498398860
1893.1 3787.0 847 3894 498398891
1879.7 3797.8 847 3893 498398908
1890.3 3798.7 845 3887 498398952
1880.4 3818.7 845 3887 498398981
1829.0 3899.1 847 3883 498398996
1854.4 4123.2 855 3879 498399026
1858.0 4141.5 856 3878 498399042
1877.5 4264.3 859 3877 498399071
1864.6 4215.7 880 3888 498399117
1869.5 4193.0 886 3895 498399131
1872.7 4183.7 892 3902 498399161
1885.1 4185.3 892 3906 498399176
1884.7 4187.5 894 3909 498399206
1882.5 4182.7 894 3909 498399222
1880.8 4195.9 894 3910 498399253
1880.0 4198.4 894 3910 498399267
1871.9 4202.6 894 3910 498399298
1860.4 4188.3 894 3910 498399312
1850.0 4184.5 894 3910 498399341
1701.5 4073.4 894 3815 498399357
1238.9 3591.8 894 3815 498399432
1269.1 3497.6 894 3717 498399446
1297.7 3510.5 894 3717 498399477
1270.9 3496.9 894 3717 498399492
1271.2 3511.5 894 3717 498399504
1229.7 3244.2 894 3421 498399522
1231.9 3219.1 894 3421 498399567
1233.9 3230.4 894 3421 498399581
1244.6 3097.4 894 3324 498399611
1205.6 3152.0 894 3324 498399656
1221.8 3149.3 894 3324 498399672
1212.0 3146.3 894 3324 498399703
1235.0 3093.2 894 3324 498399717
1228.7 3184.8 894 3422 498399747
1148.2 3150.7 894 3422 498399763
1147.2 3147.4 894 3422 498399792
1155.1 3416.2 894 3718 498399807
1087.3 3379.7 894 3718 498399852
1070.6 3331.3 894 3718 498399882
1052.3 3343.2 894 3718 498399897
1041.3 3335.2 894 3718 498399927
1025.3 3347.6 894 3718 498399941
1033.5 3372.4 894 3718 498399971
1005.8 3374.3 894 3718 498400016
1044.4 3393.3 894 3718 498400032
1044.0 3287.0 894 3619 498400061
1044.6 3291.0 894 3619 498400077
1045.4 3281.0 894 3619 498400106
1046.0 3271.3 894 3619 498400122
1072.6 2858.8 894 3225 498400152
1087.7 2849.8 894 3225 498400167
1073.2 2853.1 894 3225 498400196
1074.7 2755.8 893 3128 498400212
1054.7 2759.5 893 3128 498400241
1058.8 2760.1 892 3128 498400257
1050.6 2774.3 890 3129 498400303
1028.7 2789.5 889 3130 498400331
1087.0 2777.7 888 3130 498400346
1029.5 2801.1 888 3130 498400376
1054.7 2791.8 888 3130 498400392
1086.1 2794.1 888 3130 498400422
1182.7 2813.6 888 3130 498400449
1179.9 2811.1 888 3130 498400466
1138.0 2843.7 888 3130 498400481
1148.0 2843.7 888 3130 498400494
1131.8 2753.2 886 3030 498400512
1117.0 2757.1 886 3030 498400528
1014.0 2808.1 886 3030 498400557
1004.1 2812.8 886 3030 498400572
1040.1 2387.9 885 2636 498400605
989.8 2425.2 885 2636 498400618
985.4 2433.1 885 2636 498400645
995.7 2430.8 885 2636 498400662
1066.3 2412.0 885 2636 498400691
1054.5 2417.9 885 2636 498400706
1070.5 2421.4 885 2636 498400753
1047.3 2431.0 885 2636 498400780
1221.8 2379.5 885 2636 498400797
1185.0 2381.8 885 2636 498400828
1076.3 2417.7 885 2636 498400843
1085.8 2380.1 885 2636 498400852
1078.2 2390.8 885 2636 498400873
1047.4 2447.6 885 2636 498400916
1150.3 2536.4 885 2636 498400933
1157.0 2642.0 885 2636 498400961
1230.0 2824.1 885 2734 498400977
1239.8 2829.8 885 2734 498401007
1242.2 2830.7 885 2734 498401022
1326.1 3174.1 882 3130 498401052
1326.1 3169.7 882 3130 498401067
1338.6 3152.2 882 3130 498401096
1350.1 3136.1 882 3130 498401112
1359.5 3227.4 882 3228 498401141
1354.5 3233.6 881 3228 498401158
1359.4 3239.5 880 3227 498401203
1361.0 3255.5 879 3228 498401232
1357.2 3268.1 879 3228 498401246
1349.3 3281.2 879 3228 498401278
1347.9 3284.9 879 3228 498401293
1336.1 3392.3 877 3327 498401322
1335.9 3393.1 877 3327 498401350
1339.9 3420.3 877 3327 498401368
1362.7 3777.0 876 3722 498401381
1368.6 3738.0 876 3722 498401412
1369.5 3684.7 876 3722 498401428
1381.6 3735.2 876 3820 498401458
1400.3 3727.6 876 3820 498401472
1401.2 3736.9 876 3820 498401503
1405.3 3736.0 876 3820 498401517
1391.5 3771.1 876 3820 498401527
1404.5 3770.6 876 3820 498401547
1388.5 3771.8 876 3820 498401561
1433.6 3771.1 876 3820 498401574
1463.6 3768.7 876 3820 498401593
1409.8 3754.2 876 3820 498401607
1399.7 3848.1 874 3921 498401653
1237.7 3874.8 873 3921 498401681
1227.2 3821.7 873 3921 498401697
1364.5 3845.2 873 3921 498401727
1353.0 3850.3 873 3921 498401742
1270.8 3883.1 873 3921 498401771
1256.4 3900.0 873 3921 498401816
1165.5 3930.9 873 3921 498401832
1002.6 3995.1 873 3921 498401861
962.9 3991.7 873 3921 498401877
940.2 3982.1 873 3921 498401906
946.6 3967.2 873 3921 498401921
977.1 3984.8 873 3920 498401952
995.6 3995.4 872 3920 498401966
1019.5 3992.3 872 3920 498401978
1050.6 3975.3 872 3919 498401997
1039.7 3957.9 872 3919 498402012
1028.6 3941.5 872 3919 498402041
1018.7 3922.1 872 3919 498402057
1003.4 3874.5 870 3919 498402069
993.7 3870.5 866 3919 498402103
984.8 3872.1 859 3917 498402131
932.4 3900.0 849 3915 498402146
953.4 3896.7 834 3914 498402157
983.3 3891.8 819 3912 498402176
975.9 3876.1 804 3911 498402191
972.7 3876.6 772 3908 498402222
892.0 3977.5 715 3906 498402267
871.1 4002.0 704 3907 498402282
877.2 4004.0 699 3908 498402293
882.5 4055.5 688 3913 498402312
849.5 4112.1 681 3916 498402328
856.9 4095.4 679 3917 498402338
791.0 4099.6 674 3919 498402357
711.0 4131.0 669 3922 498402371
674.2 4134.0 659 3926 498402403
710.7 4123.4 656 3928 498402416
748.5 4114.4 652 3931 498402428
779.9 4112.1 650 3933 498402447
777.1 4116.8 648 3934 498402462
762.3 4125.5 647 3934 498402472
800.1 4116.0 643 3936 498402492
761.4 4115.7 641 3938 498402508
722.1 4134.0 640 3938 498402517
673.3 4174.3 635 3940 498402553
671.0 4174.1 634 3940 498402562
665.1 4166.3 630 3941 498402582
690.5 4161.5 625 3941 498402598
694.0 4167.5 622 3941 498402608
753.5 4154.2 617 3942 498402626
806.0 4166.8 614 3942 498402641
1990.5 4159.1 601 3948 498402776
2001.0 3982.9 601 3948 498402806
1918.7 4002.8 601 3948 498402821
1962.5 3978.2 601 3948 498402852
1975.6 3932.2 601 3948 498402867
1954.6 3924.7 601 3948 498402897
1912.4 3936.5 601 3948 498402910
1903.4 3941.5 601 3948 498402941
1926.0 3950.6 601 3948 498402956
2041.3 3990.5 601 3948 498403002
2024.0 3976.1 601 3948 498403032
2017.4 3986.7 601 3948 498403046
1990.1 4029.5 601 3948 498403077
1948.9 4143.5 601 3948 498403091
1936.0 4167.7 598 3948 498403122
1888.2 4244.4 594 3947 498403166
1845.9 4240.1 593 3947 498403181
1860.1 4224.8 589 3946 498403212
1827.3 4222.6 587 3945 498403227
1833.6 4224.9 584 3945 498403256
1833.4 4221.6 582 3945 498403272
1802.2 4190.2 577 3943 498403302
1773.8 4164.3 576 3942 498403317
1398.7 4044.4 572 3942 498403347
1203.8 4004.0 571 3942 498403361
1125.6 3984.7 566 3942 498403392
1071.4 3983.3 565 3942 498403407
995.6 3996.2 557 3942 498403452
988.4 3986.0 556 3942 498403462
989.2 3984.7 554 3942 498403481
987.4 3983.0 552 3941 498403496
988.3 3976.1 550 3941 498403508
1008.5 3992.3 550 3941 498403526
1005.1 3986.6 549 3941 498403543
1015.8 3987.9 549 3941 498403554
1032.9 3983.9 548 3941 498403572
737.8 4114.4 610 3950 498403753
701.6 4064.1 633 3954 498403768
736.9 4047.6 678 3962 498403797
719.0 4021.2 693 3964 498403812
729.8 4016.6 712 3966 498403842
742.0 4015.6 718 3966 498403857
752.0 4017.0 727 3967 498403903
749.9 4012.6 727 3967 498403914
794.1 4101.0 727 3967 498403932
778.2 4090.5 729 3967 498403947
735.2 4084.1 729 3967 498403976
788.9 4056.5 729 3967 498403992
818.7 4071.5 729 3967 498404021
844.1 4059.4 729 3967 498404048
848.1 3992.3 729 3967 498404067
848.4 3994.6 729 3967 498404082
859.5 3947.9 729 3967 498404111
886.0 3908.3 729 3967 498404126
901.1 3865.6 729 3967 498404137
950.9 3793.3 729 3967 498404156
958.8 3811.4 729 3967 498404173
958.5 3813.8 729 3967 498404202
965.7 3815.6 729 3967 498404217
963.3 3825.3 728 3967 498404246
981.2 3827.8 728 3967 498404261
996.9 3830.1 728 3967 498404291
1018.7 3840.8 728 3967 498404306
1023.6 3794.2 728 3967 498404353
1029.0 3790.9 728 3967 498404380
1032.8 3794.6 728 3967 498404396
1218.4 3672.8 728 3967 498404426
1232.8 3663.6 728 3967 498404442
1246.1 3655.1 728 3967 498404472
1235.4 3632.0 728 3967 498404516
1239.0 3632.6 728 3967 498404531
1244.1 3609.8 728 3967 498404563
1252.5 3598.3 728 3967 498404577
1244.6 3612.7 728 3967 498404607
1253.6 3647.3 728 3967 498404623
1254.1 3652.0 728 3967 498404653
1242.5 3569.3 728 3868 498404667
1247.4 3572.4 728 3868 498404697
1253.7 3581.3 728 3868 498404713
1257.7 3588.3 728 3868 498404723
1251.7 3321.3 728 3573 498404744
1203.7 3373.5 728 3573 498404758
1131.0 3503.2 728 3573 498404767
1133.9 3486.4 728 3573 498404804
1064.6 3381.4 728 3474 498404833
1037.4 3340.8 728 3474 498404846
1050.1 3352.2 728 3474 498404858
1051.9 3344.1 728 3474 498404878
1042.5 3351.6 728 3474 498404891
1037.6 3357.1 728 3474 498404902
1055.2 3361.2 728 3474 498404923
1071.1 3361.7 728 3474 498404949
1078.7 3362.3 728 3474 498404967
1085.3 3366.4 728 3474 498404981
1095.1 3373.4 728 3474 498404993
1075.9 3375.5 728 3474 498405012
1064.4 3375.9 728 3474 498405028
1083.1 3380.7 728 3474 498405038
1070.9 3370.8 728 3474 498405058
1067.6 3367.9 728 3474 498405073
1049.0 3370.1 728 3474 498405103
1042.4 3366.3 728 3474 498405116
1033.5 3363.3 728 3474 498405128
977.3 3356.3 728 3474 498405146
1018.0 3380.2 728 3474 498405162
1086.7 3380.1 728 3474 498405172
1041.7 3481.2 728 3573 498405192
1053.2 3492.1 728 3573 498405208
1101.6 3541.7 728 3573 498405219
1145.7 3575.4 728 3573 498405254
<head>
<meta charset="utf-8">
<script src="https://d3js.org/d3.v3.min.js"></script>
</head>
<body>
<script>
var img = new Image();
var width,height;
img.onload = function(){
width=img.naturalWidth ;
height=img.naturalHeight ;
};
img.src = "https://loveice622.github.io/11-50-56.jpg";
width =1261
height=4025
var svg = d3.select("body")
.append("svg")
.attr("width", width)
.attr("height", height);
svg.append("image")
.attr("x",0).attr("y",0)
.attr("width", width)
.attr("height", height)
.attr("xlink:href", "https://loveice622.github.io/11-50-56.jpg");
d3.csv("1.csv", function(d){
for(i = 1; i < d.length; i ++)
{
d[i].delay=Number(d[i].TimeStamp)-Number(d[0].TimeStamp)
d[i].label=i.toString()
if (i<d.length-1)
{
var r
r=(Number(d[i+1].TimeStamp)-Number(d[i].TimeStamp))*0.3
if(r<1)
d[i].r=1
else
d[i].r=r
//console.log(i,d[i].r, d[i].delay)
}
if(i < d.length-1){
svg.append("line")
.attr("x1", Number(d[i].x))
.attr("y1", Number(d[i].y))
.attr("x2", Number(d[i+1].x))
.attr("y2", Number(d[i+1].y))
.style("stroke", "#8da0cb")
.style("stroke-width", 0)
.transition()
.delay(d[i].delay)
.duration(2000)
.style('stroke-width', 2)
svg.append("line")
.attr("x1", Number(d[i].mouseX))
.attr("y1", Number(d[i].mouseY))
.attr("x2", Number(d[i+1].mouseX))
.attr("y2", Number(d[i+1].mouseY))
.style("stroke", "#8da0cb")
.style("stroke-width", 0)
.transition()
.delay(d[i].delay)
.duration(2000)
.style('stroke-width', 2)
svg.append("circle")
.attr("cx", Number(d[i].mouseX))
.attr("cy", Number(d[i].mouseY))
.attr("r",0)
.style("fill", "Lime")
.style("opacity", 0.4)
.transition()
.delay(d[i].delay)
.duration(2000)
.attr('r', d[i].r)
.style('opacity', 50)
svg.append("circle")
.attr("cx", Number(d[i].x))
.attr("cy", Number(d[i].y))
.attr("r", 0)
.style("fill", "red")
.style("opacity", 0.4)
.transition()
.delay(d[i].delay)
.duration(2000)
.attr('r', d[i].r)
.style('opacity', 50)
svg.append("text")
.attr("x", Number(d[i].x-5))
.attr("y", Number(d[i].y+5))
.transition()
.delay(d[i].delay)
.duration(2000)
.text(d[i].label)
svg.append("text")
.attr("x", Number(d[i].mouseX))
.attr("y", Number(d[i].mouseY))
.transition()
.delay(d[i].delay)
.duration(2000)
.text(d[i].label)
}
}
// var pulseCircles = svg.selectAll('circle')
// .data(d)
// .transition()
// .delay(d=>d.delay)
// .duration(2000)
// .attr('r', d=>d.r)
// .style('opacity', 50)
})
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment