Last active
September 27, 2017 03:32
-
-
Save vgchamar/0386fdc01bd9c7a15029c4ff1842702c to your computer and use it in GitHub Desktop.
Project1 Main File
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
date | NumberofDeath | |
---|---|---|
19-Aug | 1 | |
20-Aug | 1 | |
21-Aug | 1 | |
22-Aug | 0 | |
23-Aug | 1 | |
24-Aug | 1 | |
25-Aug | 0 | |
26-Aug | 1 | |
27-Aug | 1 | |
28-Aug | 1 | |
29-Aug | 1 | |
30-Aug | 8 | |
31-Aug | 56 | |
1-Sep | 143 | |
2-Sep | 116 | |
3-Sep | 54 | |
4-Sep | 46 | |
5-Sep | 36 | |
6-Sep | 20 | |
7-Sep | 28 | |
8-Sep | 12 | |
9-Sep | 11 | |
10-Sep | 5 | |
11-Sep | 5 | |
12-Sep | 1 | |
13-Sep | 3 | |
14-Sep | 0 | |
15-Sep | 1 | |
16-Sep | 4 | |
17-Sep | 2 | |
18-Sep | 3 | |
19-Sep | 0 | |
20-Sep | 0 | |
21-Sep | 2 | |
22-Sep | 1 | |
23-Sep | 1 | |
24-Sep | 1 | |
25-Sep | 1 | |
26-Sep | 1 | |
27-Sep | 1 | |
28-Sep | 0 | |
29-Sep | 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x | y | AgeGroup | Gender | |
---|---|---|---|---|
13.58801 | 11.0956 | 0 | 1 | |
9.878124 | 12.55918 | 4 | 1 | |
14.65398 | 10.18044 | 0 | 0 | |
15.22057 | 9.993003 | 5 | 0 | |
13.16265 | 12.96319 | 4 | 1 | |
13.80617 | 8.889046 | 2 | 1 | |
13.10214 | 10.56081 | 4 | 1 | |
11.00403 | 11.86713 | 2 | 0 | |
15.15475 | 11.70451 | 0 | 0 | |
11.12639 | 9.643859 | 4 | 1 | |
11.7104 | 13.59038 | 4 | 0 | |
12.34107 | 11.48214 | 4 | 1 | |
10.58664 | 11.86681 | 0 | 1 | |
14.56957 | 10.57711 | 0 | 1 | |
16.56765 | 14.32268 | 3 | 0 | |
9.511439 | 10.67225 | 5 | 1 | |
13.33699 | 10.70585 | 5 | 0 | |
15.03486 | 10.19459 | 5 | 1 | |
15.13973 | 10.04012 | 0 | 0 | |
10.87104 | 9.823215 | 4 | 1 | |
12.54631 | 11.9826 | 2 | 0 | |
11.82367 | 11.7979 | 5 | 0 | |
12.19227 | 10.38389 | 2 | 1 | |
13.87589 | 12.75045 | 4 | 0 | |
12.30798 | 11.85122 | 0 | 0 | |
10.97379 | 11.85359 | 5 | 1 | |
10.98912 | 9.759229 | 5 | 0 | |
13.50803 | 13.34022 | 0 | 1 | |
10.80653 | 11.66098 | 4 | 1 | |
12.20569 | 13.64252 | 0 | 0 | |
13.89933 | 13.98826 | 2 | 1 | |
12.51938 | 11.61548 | 5 | 0 | |
15.74902 | 12.65131 | 2 | 1 | |
12.85563 | 9.896143 | 0 | 0 | |
12.98866 | 10.1677 | 0 | 1 | |
13.6861 | 11.40649 | 5 | 0 | |
13.08889 | 11.11662 | 0 | 0 | |
13.42064 | 11.08226 | 4 | 0 | |
14.75734 | 9.368398 | 5 | 0 | |
13.205 | 13.16882 | 5 | 0 | |
9.847669 | 12.53263 | 4 | 1 | |
12.53966 | 12.00474 | 0 | 0 | |
13.40522 | 10.24531 | 0 | 0 | |
14.43222 | 11.61986 | 4 | 0 | |
15.98592 | 14.18579 | 5 | 0 | |
10.8983 | 12.01404 | 0 | 0 | |
12.54032 | 13.41382 | 5 | 1 | |
15.84175 | 12.38042 | 0 | 0 | |
16.54906 | 14.34902 | 0 | 0 | |
11.19962 | 8.586758 | 2 | 0 | |
15.77734 | 12.17214 | 5 | 1 | |
11.01652 | 9.782825 | 4 | 1 | |
11.68324 | 13.5818 | 2 | 1 | |
11.54616 | 12.27906 | 3 | 1 | |
11.79539 | 15.07723 | 2 | 1 | |
13.04533 | 13.88243 | 2 | 0 | |
14.14244 | 13.1333 | 5 | 0 | |
14.84649 | 10.01118 | 0 | 0 | |
12.58271 | 11.01057 | 3 | 0 | |
14.63834 | 12.92149 | 0 | 1 | |
12.47289 | 11.21463 | 5 | 0 | |
14.4973 | 8.744322 | 5 | 0 | |
9.224811 | 10.83608 | 0 | 1 | |
17.93893 | 7.189272 | 5 | 0 | |
11.17129 | 14.73371 | 0 | 1 | |
9.487955 | 10.70568 | 1 | 0 | |
10.80275 | 9.933474 | 1 | 1 | |
16.06981 | 14.11234 | 0 | 1 | |
10.38257 | 10.56815 | 1 | 1 | |
13.68547 | 8.984794 | 0 | 0 | |
15.80461 | 13.92831 | 3 | 1 | |
12.17318 | 11.80932 | 5 | 1 | |
11.49627 | 10.73456 | 0 | 0 | |
15.40609 | 11.19265 | 5 | 1 | |
15.91103 | 12.20705 | 5 | 0 | |
10.1881 | 11.91827 | 0 | 1 | |
14.0004 | 12.77549 | 3 | 0 | |
16.54684 | 11.39338 | 5 | 0 | |
17.51501 | 11.22888 | 1 | 0 | |
13.77803 | 8.864945 | 5 | 0 | |
14.11088 | 10.56043 | 5 | 1 | |
14.68581 | 11.45555 | 0 | 0 | |
12.57377 | 13.43932 | 0 | 0 | |
11.70552 | 10.36466 | 2 | 1 | |
14.36912 | 12.55025 | 4 | 1 | |
15.21281 | 16.9593 | 5 | 0 | |
15.81613 | 13.89809 | 5 | 0 | |
13.89643 | 12.72108 | 3 | 0 | |
15.18307 | 11.5893 | 0 | 0 | |
13.17116 | 12.932 | 5 | 1 | |
12.65285 | 11.26382 | 0 | 1 | |
15.13931 | 13.20189 | 1 | 0 | |
12.8446 | 11.61027 | 1 | 0 | |
13.55442 | 13.17523 | 2 | 1 | |
14.02949 | 13.07497 | 5 | 0 | |
15.43982 | 13.27819 | 3 | 1 | |
14.84585 | 14.86907 | 3 | 1 | |
10.27732 | 11.36702 | 5 | 1 | |
10.52977 | 11.62937 | 5 | 0 | |
9.933102 | 12.30593 | 0 | 1 | |
14.15951 | 9.238947 | 0 | 1 | |
13.61841 | 12.54927 | 0 | 1 | |
14.95599 | 9.839847 | 0 | 1 | |
15.69362 | 12.38079 | 1 | 0 | |
9.200059 | 11.97217 | 1 | 0 | |
16.83013 | 11.39388 | 0 | 0 | |
13.31452 | 10.31512 | 5 | 0 | |
10.56304 | 11.58176 | 5 | 1 | |
8.311067 | 7.202524 | 2 | 0 | |
13.39306 | 13.03761 | 3 | 1 | |
14.51838 | 8.716039 | 4 | 0 | |
16.80886 | 11.42717 | 1 | 1 | |
14.71134 | 11.91757 | 5 | 1 | |
10.31367 | 11.38647 | 4 | 1 | |
13.15651 | 11.15159 | 0 | 0 | |
9.083952 | 13.21588 | 3 | 0 | |
15.19022 | 9.974836 | 5 | 1 | |
8.436085 | 7.393596 | 4 | 1 | |
15.34814 | 9.820333 | 3 | 1 | |
13.31339 | 12.3789 | 3 | 1 | |
13.23216 | 9.731717 | 4 | 0 | |
12.55331 | 11.54684 | 3 | 1 | |
13.89099 | 10.95253 | 0 | 1 | |
13.49273 | 12.51423 | 1 | 1 | |
15.24806 | 16.97276 | 5 | 1 | |
11.58812 | 11.09262 | 5 | 1 | |
9.442908 | 10.76749 | 0 | 1 | |
11.36395 | 9.602994 | 2 | 1 | |
11.15694 | 14.775 | 1 | 1 | |
11.89653 | 10.2304 | 5 | 1 | |
15.01308 | 10.21483 | 0 | 1 | |
13.61045 | 11.49483 | 3 | 1 | |
14.1069 | 13.60306 | 4 | 1 | |
10.46296 | 11.20981 | 3 | 1 | |
10.30772 | 9.4627 | 5 | 0 | |
13.77892 | 12.69592 | 2 | 0 | |
13.41328 | 12.42838 | 5 | 0 | |
12.56326 | 11.04593 | 5 | 0 | |
15.66159 | 13.93562 | 5 | 0 | |
13.83545 | 8.909176 | 0 | 1 | |
13.22668 | 12.33923 | 3 | 1 | |
15.11869 | 10.0674 | 5 | 0 | |
13.24604 | 10.51404 | 3 | 1 | |
14.62721 | 11.42144 | 3 | 1 | |
14.38883 | 10.29258 | 5 | 1 | |
15.02184 | 14.11212 | 0 | 1 | |
13.14793 | 10.59459 | 5 | 0 | |
13.39042 | 8.81647 | 5 | 0 | |
11.77328 | 9.525179 | 3 | 0 | |
16.04067 | 14.35417 | 0 | 1 | |
10.62561 | 10.92979 | 5 | 0 | |
14.55994 | 10.6003 | 1 | 0 | |
9.327332 | 12.16842 | 5 | 0 | |
14.50837 | 11.50046 | 5 | 1 | |
10.52485 | 12.31847 | 0 | 0 | |
13.9858 | 12.80076 | 4 | 0 | |
10.55035 | 11.602 | 5 | 1 | |
10.64812 | 11.70659 | 0 | 0 | |
15.7345 | 6.090047 | 1 | 0 | |
11.8024 | 11.16029 | 4 | 0 | |
11.76803 | 10.26851 | 5 | 0 | |
11.57369 | 11.1289 | 1 | 1 | |
15.76205 | 14.02013 | 4 | 0 | |
10.6587 | 11.67938 | 5 | 1 | |
13.40605 | 13.28477 | 5 | 1 | |
11.24757 | 11.45161 | 1 | 0 | |
15.53659 | 12.76087 | 5 | 1 | |
14.02418 | 10.70804 | 5 | 0 | |
13.39872 | 12.45665 | 5 | 1 | |
14.57784 | 16.18932 | 4 | 1 | |
15.32621 | 13.43324 | 5 | 1 | |
14.47304 | 8.777501 | 0 | 1 | |
11.39957 | 9.887847 | 4 | 1 | |
12.48731 | 11.17735 | 2 | 1 | |
13.78123 | 11.1606 | 0 | 1 | |
10.56813 | 11.02786 | 2 | 0 | |
10.53582 | 11.01035 | 0 | 1 | |
14.75957 | 10.75233 | 0 | 0 | |
14.2318 | 12.04069 | 5 | 0 | |
13.34694 | 11.97577 | 2 | 1 | |
10.43855 | 11.80709 | 0 | 1 | |
12.51876 | 10.58196 | 3 | 0 | |
14.99982 | 11.99344 | 5 | 0 | |
10.64479 | 9.882927 | 5 | 1 | |
13.12517 | 11.13206 | 0 | 1 | |
10.0868 | 11.47022 | 5 | 0 | |
11.2153 | 11.4361 | 5 | 0 | |
12.9097 | 11.73742 | 4 | 1 | |
12.17253 | 9.965585 | 0 | 1 | |
12.44094 | 11.28124 | 5 | 1 | |
11.9171 | 10.20203 | 0 | 1 | |
11.47169 | 11.38392 | 4 | 0 | |
11.65302 | 13.57026 | 5 | 1 | |
12.45562 | 11.50935 | 4 | 1 | |
14.77868 | 12.31298 | 5 | 1 | |
14.018 | 12.74917 | 2 | 0 | |
12.50406 | 13.39938 | 0 | 0 | |
9.217884 | 12.33342 | 4 | 1 | |
10.39745 | 11.306 | 5 | 1 | |
12.74603 | 9.155196 | 5 | 1 | |
9.105901 | 6.343998 | 4 | 1 | |
8.342558 | 7.136541 | 0 | 0 | |
15.31736 | 13.56758 | 4 | 0 | |
11.18297 | 11.41759 | 5 | 1 | |
11.78689 | 11.19158 | 5 | 0 | |
12.7135 | 11.30091 | 0 | 1 | |
11.76649 | 11.22997 | 0 | 0 | |
12.17855 | 13.63494 | 5 | 0 | |
12.68321 | 11.28437 | 3 | 1 | |
13.62292 | 13.38845 | 3 | 1 | |
8.812553 | 15.13408 | 4 | 0 | |
12.22264 | 11.33782 | 5 | 0 | |
16.18479 | 14.29076 | 2 | 0 | |
12.8446 | 11.61027 | 1 | 0 | |
13.60953 | 13.42772 | 5 | 1 | |
12.69358 | 10.21487 | 0 | 0 | |
15.025 | 11.85505 | 0 | 0 | |
13.91299 | 12.69277 | 5 | 0 | |
13.60802 | 9.07513 | 2 | 1 | |
12.47179 | 13.01132 | 4 | 1 | |
9.870624 | 12.40407 | 5 | 1 | |
17.5951 | 7.335869 | 5 | 0 | |
11.10299 | 11.11242 | 0 | 1 | |
16.66206 | 14.40429 | 1 | 0 | |
9.693037 | 11.00984 | 4 | 0 | |
13.40353 | 13.00439 | 5 | 0 | |
13.12842 | 10.58083 | 2 | 0 | |
13.7408 | 10.07836 | 2 | 1 | |
11.67779 | 11.12924 | 0 | 1 | |
13.14523 | 11.81876 | 4 | 0 | |
13.1237 | 11.84915 | 4 | 0 | |
12.29844 | 11.88042 | 5 | 1 | |
14.90404 | 12.763 | 5 | 0 | |
11.53711 | 12.58766 | 0 | 1 | |
12.87284 | 11.62384 | 2 | 0 | |
11.04585 | 11.23151 | 3 | 1 | |
15.77554 | 13.98787 | 5 | 1 | |
12.90019 | 10.33882 | 0 | 0 | |
12.31552 | 11.51159 | 5 | 1 | |
9.794394 | 11.77236 | 2 | 0 | |
12.65285 | 11.26382 | 2 | 0 | |
12.67759 | 12.0546 | 5 | 0 | |
15.9603 | 9.162499 | 3 | 1 | |
11.03126 | 11.87971 | 5 | 0 | |
14.08877 | 9.337553 | 1 | 0 | |
11.0271 | 11.74557 | 5 | 0 | |
14.54157 | 8.684826 | 4 | 0 | |
15.55098 | 11.28022 | 5 | 1 | |
9.579331 | 11.78081 | 2 | 1 | |
15.46573 | 11.09663 | 3 | 0 | |
14.44191 | 12.15951 | 1 | 0 | |
11.38291 | 9.910148 | 0 | 0 | |
13.74064 | 11.31248 | 2 | 0 | |
11.39099 | 11.03369 | 0 | 0 | |
16.01572 | 9.072348 | 5 | 0 | |
9.921976 | 11.86345 | 5 | 0 | |
10.80179 | 9.687121 | 1 | 0 | |
12.6326 | 11.62268 | 5 | 0 | |
9.262066 | 10.66323 | 4 | 1 | |
13.78464 | 13.81561 | 0 | 1 | |
13.75736 | 13.79555 | 3 | 1 | |
14.70788 | 9.969954 | 5 | 0 | |
15.29153 | 10.04976 | 4 | 0 | |
14.14686 | 12.42262 | 4 | 1 | |
13.76823 | 10.09442 | 5 | 0 | |
10.9726 | 11.34485 | 1 | 1 | |
12.36505 | 10.48427 | 5 | 1 | |
14.81631 | 10.04214 | 4 | 0 | |
15.04986 | 13.61393 | 4 | 0 | |
15.36158 | 13.45471 | 5 | 0 | |
12.793 | 14.31211 | 0 | 0 | |
11.324 | 9.79492 | 0 | 0 | |
10.45107 | 11.77685 | 0 | 1 | |
11.01349 | 11.211 | 0 | 1 | |
13.38261 | 9.455654 | 1 | 1 | |
10.33884 | 11.39608 | 5 | 1 | |
9.610787 | 11.80735 | 4 | 0 | |
14.54691 | 12.2733 | 5 | 0 | |
11.45123 | 11.4183 | 0 | 1 | |
12.74049 | 10.73864 | 0 | 1 | |
14.95969 | 11.96889 | 5 | 0 | |
12.31692 | 14.83151 | 3 | 1 | |
12.88335 | 10.78442 | 1 | 0 | |
15.2704 | 9.139883 | 2 | 0 | |
15.77505 | 9.566566 | 1 | 0 | |
13.06382 | 13.85009 | 4 | 1 | |
12.92922 | 11.70606 | 2 | 1 | |
15.28385 | 12.10795 | 1 | 1 | |
13.01865 | 11.78975 | 0 | 1 | |
12.45943 | 11.2489 | 0 | 1 | |
15.76892 | 12.95444 | 1 | 1 | |
14.03004 | 13.35564 | 0 | 1 | |
12.98116 | 14.37319 | 5 | 1 | |
13.8822 | 14.63515 | 5 | 1 | |
10.93752 | 9.725004 | 5 | 0 | |
16.02412 | 14.00992 | 0 | 0 | |
15.09569 | 10.09361 | 0 | 1 | |
13.46457 | 12.56776 | 0 | 1 | |
11.58543 | 12.29345 | 2 | 0 | |
10.69892 | 12.00221 | 5 | 0 | |
16.8394 | 11.6017 | 5 | 1 | |
13.90569 | 14.60172 | 1 | 1 | |
13.70339 | 11.11278 | 0 | 1 | |
13.28895 | 9.631591 | 0 | 1 | |
15.6604 | 12.3693 | 3 | 1 | |
15.46487 | 11.2269 | 3 | 0 | |
10.99125 | 11.19733 | 3 | 1 | |
15.50104 | 11.11599 | 5 | 1 | |
11.70601 | 9.637946 | 0 | 1 | |
12.35546 | 11.44285 | 5 | 1 | |
11.12872 | 11.52963 | 4 | 1 | |
9.595812 | 10.9393 | 0 | 0 | |
8.325407 | 7.166975 | 5 | 1 | |
14.00061 | 13.33951 | 0 | 0 | |
13.24529 | 12.99792 | 3 | 0 | |
15.28504 | 9.337882 | 3 | 0 | |
15.4973 | 11.24314 | 4 | 0 | |
15.38694 | 7.330029 | 5 | 1 | |
16.05814 | 14.31984 | 5 | 1 | |
12.3847 | 13.69473 | 0 | 1 | |
12.18887 | 11.78904 | 1 | 0 | |
15.12332 | 11.68831 | 0 | 0 | |
13.95376 | 12.86237 | 4 | 0 | |
9.618408 | 10.91289 | 5 | 0 | |
16.29265 | 14.33811 | 4 | 0 | |
12.64394 | 10.64805 | 2 | 1 | |
10.49377 | 12.87479 | 3 | 1 | |
13.97831 | 12.83293 | 4 | 1 | |
15.52151 | 11.26509 | 1 | 0 | |
10.96399 | 11.18275 | 3 | 0 | |
13.29801 | 12.91595 | 0 | 1 | |
13.91508 | 13.56587 | 0 | 0 | |
13.31653 | 9.643641 | 5 | 1 | |
12.74707 | 10.7125 | 0 | 1 | |
15.44155 | 11.208 | 4 | 0 | |
15.69372 | 13.87902 | 1 | 0 | |
13.83759 | 11.05554 | 0 | 1 | |
11.67728 | 10.47627 | 1 | 0 | |
16.07268 | 14.29056 | 4 | 1 | |
12.59532 | 10.98533 | 4 | 0 | |
15.35726 | 11.29407 | 2 | 0 | |
16.284 | 14.36028 | 2 | 1 | |
12.50162 | 12.06644 | 3 | 1 | |
15.65 | 12.90427 | 1 | 1 | |
11.54975 | 12.56442 | 5 | 1 | |
14.21522 | 12.068 | 5 | 1 | |
16.25294 | 10.09349 | 2 | 0 | |
13.62379 | 11.20419 | 4 | 0 | |
12.61527 | 10.3553 | 3 | 0 | |
11.65745 | 11.17163 | 0 | 1 | |
8.771104 | 10.94251 | 3 | 1 | |
10.9025 | 14.69996 | 2 | 0 | |
11.61652 | 11.05411 | 5 | 1 | |
13.03883 | 11.24061 | 0 | 0 | |
13.70734 | 11.29599 | 0 | 1 | |
11.06231 | 11.75703 | 1 | 0 | |
14.57227 | 12.29128 | 0 | 0 | |
10.43663 | 11.56376 | 3 | 0 | |
13.1377 | 12.28358 | 4 | 0 | |
11.87974 | 14.16151 | 0 | 0 | |
13.33869 | 10.33806 | 5 | 0 | |
9.854939 | 12.17599 | 0 | 0 | |
12.74439 | 12.84671 | 2 | 1 | |
9.285564 | 10.63081 | 0 | 1 | |
11.59055 | 9.53944 | 4 | 1 | |
13.1202 | 12.3159 | 5 | 1 | |
11.40942 | 10.99734 | 4 | 0 | |
13.63869 | 11.5084 | 0 | 1 | |
11.76579 | 13.61152 | 4 | 0 | |
16.26833 | 14.38156 | 5 | 1 | |
8.73591 | 12.05172 | 1 | 1 | |
15.74913 | 12.16057 | 5 | 1 | |
12.18563 | 11.40151 | 2 | 1 | |
14.78633 | 14.09387 | 0 | 1 | |
13.45084 | 8.860812 | 0 | 1 | |
15.73667 | 12.94093 | 3 | 1 | |
11.91194 | 14.17201 | 5 | 1 | |
12.5272 | 12.7851 | 4 | 0 | |
14.3738 | 13.07674 | 0 | 1 | |
12.21672 | 14.14109 | 5 | 1 | |
15.28043 | 11.42152 | 0 | 0 | |
11.53864 | 10.75491 | 5 | 0 | |
9.046618 | 11.20749 | 0 | 0 | |
10.75256 | 8.843783 | 1 | 1 | |
14.9461 | 10.10509 | 5 | 0 | |
13.22677 | 11.90959 | 4 | 1 | |
13.41574 | 8.835455 | 5 | 1 | |
14.35785 | 12.03667 | 1 | 0 | |
12.20415 | 11.37017 | 5 | 1 | |
12.00341 | 14.56914 | 4 | 0 | |
13.58721 | 11.60537 | 4 | 1 | |
8.757473 | 12.02333 | 5 | 1 | |
13.38881 | 10.9706 | 0 | 1 | |
12.57046 | 12.79843 | 0 | 0 | |
15.56334 | 14.17455 | 2 | 0 | |
12.52108 | 12.03208 | 4 | 1 | |
12.40901 | 11.34986 | 5 | 1 | |
12.36903 | 11.4156 | 5 | 1 | |
13.44909 | 12.60106 | 5 | 1 | |
12.03297 | 11.36891 | 2 | 0 | |
9.944605 | 11.83905 | 4 | 0 | |
12.14346 | 13.6315 | 1 | 0 | |
14.40612 | 13.09598 | 0 | 1 | |
15.70642 | 12.9274 | 0 | 1 | |
13.75891 | 11.14193 | 2 | 1 | |
11.44538 | 10.93066 | 5 | 1 | |
13.7965 | 14.16886 | 2 | 0 | |
15.57711 | 11.30424 | 4 | 0 | |
14.99393 | 10.24519 | 5 | 0 | |
14.1129 | 13.12017 | 2 | 0 | |
13.17422 | 9.835811 | 0 | 0 | |
13.26078 | 12.96562 | 5 | 1 | |
10.93261 | 12.03151 | 5 | 1 | |
12.14729 | 9.951969 | 0 | 1 | |
13.95731 | 13.88316 | 3 | 0 | |
11.26415 | 10.80238 | 5 | 1 | |
13.42597 | 12.96798 | 5 | 1 | |
13.51533 | 12.48783 | 1 | 0 | |
14.7689 | 11.9578 | 5 | 0 | |
12.9731 | 10.95023 | 2 | 0 | |
12.42551 | 11.31754 | 4 | 1 | |
12.34805 | 14.77593 | 5 | 1 | |
13.10475 | 12.3512 | 0 | 1 | |
14.77894 | 13.19966 | 5 | 0 | |
9.813148 | 12.50214 | 5 | 1 | |
14.14413 | 10.57392 | 3 | 1 | |
12.03469 | 14.58466 | 4 | 1 | |
16.09884 | 14.23706 | 4 | 0 | |
12.68321 | 11.28437 | 0 | 1 | |
14.69502 | 10.12684 | 0 | 0 | |
8.840331 | 12.13417 | 5 | 1 | |
10.54701 | 12.32713 | 4 | 1 | |
12.24902 | 14.15759 | 5 | 0 | |
11.73556 | 13.59899 | 0 | 1 | |
8.280715 | 11.56829 | 3 | 1 | |
12.38503 | 13.21802 | 0 | 1 | |
16.73377 | 8.447514 | 3 | 0 | |
15.72296 | 7.17813 | 3 | 1 | |
16.08321 | 14.26035 | 5 | 0 | |
14.27252 | 10.4667 | 5 | 0 | |
9.736776 | 12.35915 | 5 | 0 | |
13.28041 | 12.94127 | 2 | 0 | |
16.06733 | 9.970328 | 3 | 1 | |
14.35376 | 10.35223 | 0 | 1 | |
13.40536 | 10.94129 | 1 | 0 | |
14.51969 | 9.029811 | 4 | 0 | |
14.57164 | 11.38928 | 3 | 1 | |
13.71177 | 13.9442 | 0 | 0 | |
16.23636 | 14.1988 | 3 | 1 | |
16.25586 | 14.41581 | 0 | 0 | |
12.80755 | 14.28284 | 4 | 1 | |
13.3605 | 11.94751 | 5 | 1 | |
11.17751 | 8.616005 | 5 | 0 | |
11.64155 | 12.17337 | 2 | 1 | |
14.73854 | 11.93963 | 2 | 0 | |
9.423313 | 10.79384 | 5 | 0 | |
9.466473 | 10.73907 | 5 | 1 | |
15.71121 | 11.60836 | 5 | 0 | |
14.26207 | 12.49088 | 5 | 0 | |
14.18834 | 13.43268 | 2 | 0 | |
11.48419 | 10.41928 | 0 | 0 | |
15.02863 | 10.36174 | 5 | 0 | |
13.08718 | 12.37853 | 0 | 1 | |
10.95782 | 12.04313 | 4 | 0 | |
11.939 | 14.17458 | 1 | 1 | |
13.48189 | 8.887023 | 5 | 1 | |
14.06296 | 13.09025 | 0 | 1 | |
10.94726 | 16.4859 | 0 | 0 | |
14.20514 | 9.438095 | 1 | 0 | |
10.38407 | 11.159 | 0 | 1 | |
15.60473 | 11.31529 | 0 | 1 | |
11.27275 | 11.46122 | 1 | 0 | |
13.02248 | 9.609664 | 3 | 1 | |
13.57891 | 13.14179 | 4 | 0 | |
11.07647 | 11.64163 | 2 | 1 | |
14.5969 | 11.4039 | 1 | 1 | |
15.24637 | 8.629816 | 1 | 1 | |
13.36475 | 10.36409 | 4 | 1 | |
16.14358 | 10.90531 | 2 | 0 | |
14.299 | 10.43223 | 5 | 1 | |
16.41171 | 14.39729 | 5 | 0 | |
12.59053 | 14.97835 | 5 | 0 | |
13.25468 | 10.81906 | 0 | 0 | |
10.99315 | 12.06159 | 0 | 0 | |
10.10162 | 10.64977 | 0 | 0 | |
15.62137 | 12.55621 | 4 | 0 | |
14.21592 | 13.44473 | 0 | 0 | |
13.36865 | 12.51622 | 5 | 1 | |
10.77831 | 11.64841 | 5 | 1 | |
13.17832 | 10.61175 | 5 | 0 | |
13.80602 | 12.6384 | 2 | 0 | |
11.42396 | 10.96806 | 0 | 1 | |
12.91849 | 9.794238 | 4 | 0 | |
13.60765 | 11.07225 | 5 | 0 | |
13.33782 | 14.33142 | 4 | 1 | |
12.16919 | 11.43683 | 4 | 0 | |
14.36735 | 10.32597 | 4 | 1 | |
8.863929 | 12.10775 | 4 | 1 | |
15.54189 | 14.20994 | 2 | 0 | |
14.3156 | 10.40692 | 3 | 0 | |
10.02774 | 11.28289 | 0 | 1 | |
13.20859 | 14.26238 | 4 | 1 | |
10.48503 | 12.45631 | 5 | 0 | |
9.53302 | 10.64486 | 0 | 0 | |
10.43369 | 11.19426 | 5 | 1 | |
10.92631 | 14.62447 | 4 | 0 | |
13.3186 | 11.02381 | 0 | 0 | |
12.6148 | 10.95197 | 1 | 1 | |
13.08049 | 14.20134 | 4 | 1 | |
11.64594 | 10.45675 | 5 | 0 | |
13.56385 | 10.07179 | 2 | 0 | |
13.37551 | 13.06693 | 5 | 1 | |
13.7367 | 11.13027 | 5 | 0 | |
10.68826 | 12.45906 | 3 | 1 | |
12.18764 | 14.13755 | 5 | 0 | |
13.96921 | 13.32231 | 3 | 1 | |
14.77023 | 9.210511 | 5 | 0 | |
15.08261 | 10.12219 | 1 | 0 | |
16.23659 | 9.914474 | 1 | 0 | |
15.31356 | 11.4458 | 0 | 0 | |
12.54972 | 11.07519 | 5 | 1 | |
14.65652 | 11.439 | 5 | 1 | |
12.53218 | 11.10452 | 0 | 0 | |
10.91304 | 14.67075 | 5 | 0 | |
15.67918 | 12.91381 | 0 | 0 | |
11.65278 | 12.62286 | 3 | 0 | |
9.501461 | 11.54471 | 1 | 1 | |
13.26943 | 14.79979 | 0 | 0 | |
13.61611 | 15.32844 | 3 | 0 | |
13.43057 | 10.2633 | 4 | 0 | |
13.48013 | 12.53947 | 3 | 1 | |
11.07184 | 11.10491 | 3 | 0 | |
12.92878 | 10.93291 | 0 | 1 | |
12.84456 | 16.01885 | 5 | 1 | |
15.31608 | 9.794086 | 5 | 1 | |
12.78222 | 11.34187 | 5 | 0 | |
9.207745 | 11.08172 | 0 | 0 | |
14.37433 | 12.00336 | 4 | 0 | |
15.58141 | 10.92052 | 0 | 0 | |
10.40739 | 11.17765 | 3 | 0 | |
12.98045 | 10.66068 | 0 | 0 | |
13.24918 | 11.87218 | 2 | 0 | |
10.96288 | 9.745629 | 4 | 1 | |
13.51754 | 11.0086 | 2 | 1 | |
9.582069 | 10.58299 | 0 | 1 | |
14.53736 | 10.6277 | 4 | 0 | |
12.51176 | 11.1419 | 0 | 1 | |
10.71447 | 12.47066 | 2 | 0 | |
13.3154 | 12.87661 | 5 | 1 | |
9.378991 | 10.9628 | 5 | 1 | |
13.37906 | 11.91917 | 0 | 1 | |
13.52166 | 11.13973 | 3 | 0 | |
13.49601 | 11.03899 | 5 | 0 | |
13.63715 | 9.099265 | 4 | 0 | |
14.26445 | 15.6235 | 4 | 1 | |
9.556584 | 10.61644 | 5 | 0 | |
14.07245 | 15.51041 | 0 | 0 | |
12.94471 | 13.7879 | 4 | 0 | |
15.41332 | 13.8084 | 5 | 1 | |
13.78938 | 12.6617 | 4 | 1 | |
11.41806 | 9.855504 | 5 | 0 | |
12.39045 | 11.3782 | 5 | 0 | |
12.74481 | 11.31843 | 0 | 1 | |
13.58522 | 11.48222 | 5 | 0 | |
14.08854 | 13.10222 | 4 | 1 | |
15.06661 | 10.14866 | 2 | 1 | |
15.27804 | 13.55018 | 0 | 1 | |
14.67613 | 10.15019 | 4 | 1 | |
13.37922 | 12.48901 | 5 | 1 | |
12.27691 | 11.91081 | 0 | 1 | |
14.33308 | 10.37359 | 2 | 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<meta charset="utf-8"> | |
<title>Project 1:London's 1854 cholera epidemic map</title> | |
<style> | |
body { | |
font: 20px sans-serif; | |
} | |
.dot { | |
stroke: #000; | |
} | |
.tooltip { | |
position: absolute; | |
width: 200px; | |
height: 28px; | |
pointer-events: none; | |
} | |
.axis path, | |
.axis line { | |
fill: none; | |
stroke: grey; | |
stroke-width: 1; | |
shape-rendering: crispEdges; | |
} | |
</style> | |
<head> | |
<h1>Project 1:London's 1854 cholera epidemic map</h1> | |
<script src="//d3js.org/d3.v3.min.js"></script> | |
</head> | |
<body> | |
<p>About: This visualization is for the Project 1 of the course H517 Visualization Design, Analysis & Evaluation. The data for the project is provided by the instructor. The visualization for the project is done by me. The Map shows the Cholera Epidemic at London in 1854. Jon Snow created a similar map to identify the source of the Cholera epidemic. </p> | |
<a href="https://bl.ocks.org/vgchamar/d94a0e77c8182483784c714bd04d026c"> This is the link to documentation</a> | |
<a href="https://youtu.be/B45fo5-Dx3k"> Link to the Video</a> | |
<script> | |
// define the size of the SVG | |
var canvas_mapheight=900 | |
var canvas_mapwidth = 1500 | |
var svg = d3.select("body").append("svg") | |
.attr("width", canvas_mapwidth) | |
.attr("height", canvas_mapheight) | |
.call(d3.behavior.zoom().on("zoom", function () { | |
svg.attr("transform", "translate(" + d3.event.translate + ")" + " scale(" + d3.event.scale + ")") | |
})) | |
.append("g") | |
// add the tooltip area to the webpage | |
var tooltip = d3.select("body").append("div") | |
.attr("class", "tooltip") | |
.style("opacity", 0); | |
// load data from CSV. the data contain co ordinates and their corresponding number of deaths and gender. | |
d3.csv("DeathSpot.csv", function(error, data) { | |
// change string (from CSV) into number format | |
data.forEach(function(d) { | |
d.x = +d.x*40; | |
d.y = +d.y*40; | |
//console.log(d); | |
if (d.AgeGroup == "0") {d.Agerange = "0-10";} else if (d.AgeGroup == "1") {d.Agerange = "11-20";} else if (d.AgeGroup == "2") {d.Agerange = "21-40";} else if (d.AgeGroup == "3") {d.Agerange = "41-60";} else if (d.AgeGroup == "4") {d.Agerange = "61-80";} else {d.Agerange = ">80";} | |
if (d.Gender == "1") d.GenderName = "Female"; else d.GenderName = "Male" | |
//if (d.AgeGroup == "0") d.Agerange = "0-10"; | |
}); | |
// Plot the Map using Path | |
// define a variable to store the path | |
var line_path = ("M16.7380009,18.6959991L17.6599998,18.7119999M14.4619999,18.6550007L16.7380009,18.6959991M12.7938805,18.6161308L14.4619999,18.6550007M11.5998764,18.5883083L12.7938805,18.6161308M10.971961,18.5736771L11.5998764,18.5883083M10.7959166,18.5695744L10.971961,18.5736771M8.533,18.5240002L10.7959166,18.5695744M7.3639998,18.4990005L8.533,18.5240002M6.7030001,18.4850006L7.3639998,18.4990005M6.4789462,18.4790497L6.7030001,18.4850006M4.9920001,18.441L6.4789462,18.4790497M3.3900001,18.3969994L4.9920001,18.441M9.6827154,18.2092381L10.7959166,18.5695744M17.6599998,18.7119999L19.4839993,18.7250004L19.5030003,18.1189995M8.6569996,18.0890007L8.533,18.5240002M5.0978222,18.0533352L6.4789462,18.4790497M4.9920001,18.441L5.0978222,18.0533352M8.7724485,17.9145889L9.6827154,18.2092381M8.7724485,17.9145889L8.6569996,18.0890007M17.4473476,17.9006481L18.7360001,18.0639992L19.5030003,18.1189995M17.4473476,17.9006481L17.5179996,18.4389992L17.6599998,18.7119999M17.1739998,17.8659992L17.4473476,17.9006481M17.1739998,17.8659992L16.7380009,18.6959991M7.9260001,17.6700001L7.882,17.8500004L8.6569996,18.0890007M16.1129227,17.645401L17.1739998,17.8659992M16.1129227,17.645401L15.8950005,18.3330002L15.507,18.2420006L15.3870001,18.3390007L15.3170004,18.5170002M3.733,17.6210003L5.0978222,18.0533352M7.6246362,17.5824795L7.9260001,17.6700001M7.3639998,18.4990005L7.6246362,17.5824795M3.405966,17.5355129L3.733,17.6210003M3.405966,17.5355129L3.3900001,18.3969994M15.6000004,17.5249996L16.1129227,17.645401M14.9702625,17.4152355L15.6000004,17.5249996M14.9702625,17.4152355L14.4619999,18.6550007M6.99401,17.3993397L7.6246362,17.5824795M6.99401,17.3993397L6.7030001,18.4850006M19.5030003,18.1189995L19.5272503,17.2641487M14.1594124,17.2620544L14.783,17.382L14.9702625,17.4152355M8.8240004,17.1959991L8.8760004,17.3260002L8.7724485,17.9145889M19.3530006,17.184L19.5272503,17.2641487M18.5079994,17.3279991L19.184,17.5620003L19.3530006,17.184M13.3946438,17.1198883L13.816,17.1959991L14.1594124,17.2620544M13.3946438,17.1198883L12.7938805,18.6161308M11.5249996,17.0750008L10.971961,18.5736771M8.1929998,17.0149994L8.8240004,17.1959991M8.1459999,16.9909992L8.1929998,17.0149994M7.9260001,17.6700001L8.1459999,16.9909992M5.4027152,16.9372101L6.99401,17.3993397M5.0978222,18.0533352L5.4027152,16.9372101M12.3062029,16.9213066L12.7419996,17.0020008L13.3946438,17.1198883M12.2447538,16.9099293L12.3062029,16.9213066M14.1594124,17.2620544L14.3319998,16.4899998L14.3889999,16.4990005M15.3170004,16.4099998L14.9702625,17.4152355M15.3889999,16.1200008L16.0689697,16.4080257M15.3170004,16.4099998L15.3889999,16.1200008M14.0244579,15.827219L15.1340361,16.3555603L15.3170004,16.4099998M14.0244579,15.827219L13.3946438,17.1198883M15.3889999,16.1200008L15.5100002,15.7519999L15.6070004,15.6219997M13.5803728,15.6042328L14.0244579,15.827219M14.4429998,15.0100002L14.0244579,15.827219M12.2447538,16.9099293L11.5998764,18.5883083M19.5272503,17.2641487L19.541317,16.7682648M19.3530006,17.184L19.541317,16.7682648M11.165,16.7099991L12.2447538,16.9099293M3.733,17.6210003L4.2443171,16.7018509M8.1459999,16.9909992L7.1856389,16.6844387M7.1856389,16.6844387L6.99401,17.3993397M10.8289194,16.6464252L11.165,16.7099991M4.2927132,16.6148548L5.4027152,16.9372101M4.2443171,16.7018509L4.2927132,16.6148548M17.1739998,17.8659992L17.743,16.5869999M10.3191881,16.550005L10.8289194,16.6464252M9.6827154,18.2092381L10.3191881,16.550005M19.541317,16.7682648L19.5478706,16.5372238M15.6000004,17.5249996L16.0689697,16.4080257M9.4746075,16.3902454L10.3191881,16.550005M9.3370533,16.9699402L9.4746075,16.3902454M4.2443171,16.7018509L3.4272959,16.3845978M3.4272959,16.3845978L3.405966,17.5355129M9.0890484,16.3173122L9.4746075,16.3902454M9.0301085,16.3061638L9.0890484,16.3173122M8.8240004,17.1959991L9.0301085,16.3061638M8.3710003,16.1749992L9.0301085,16.3061638M8.1929998,17.0149994L8.3710003,16.1749992M18.7351665,16.1498737L19.5478706,16.5372238M18.7351665,16.1498737L18.3939991,16.8759995L17.743,16.5869999M7.868,16.0779991L8.3710003,16.1749992M3.518651,16.0325737L3.944,16.1590004M3.4272959,16.3845978L3.518651,16.0325737M7.375,15.9779997L7.868,16.0779991M7.375,15.9779997L7.1856389,16.6844387M16.0689697,16.4080257L16.2697639,15.9297791M10.8289194,16.6464252L11.026,15.8590002M6.6325169,15.821804L7.375,15.9779997M5.6999531,15.6256208L6.6325169,15.821804M5.4027152,16.9372101L5.6999531,15.6256208M15.6070004,15.6219997L16.2697639,15.9297791M17.743,16.5869999L17.0990009,16.2549992L17.4214344,15.5421467M5.0250001,15.5159998L5.6999531,15.6256208M4.9097862,15.4901791L5.0250001,15.5159998M4.2927132,16.6148548L4.9097862,15.4901791M18.90695,15.3761148L19.0639992,15.4499998L18.7351665,16.1498737M13.0880003,15.3570004L13.5803728,15.6042328M12.3062029,16.9213066L13.0880003,15.3570004M15.6070004,15.6219997L15.6938972,15.3395834M10.2639999,15.6700001L9.4910889,15.3207779M9.0890484,16.3173122L9.4910889,15.3207779M13.5803728,15.6042328L13.6700001,15.3889999L13.5600004,15.3149996M3.721,15.2480001L4.9097862,15.4901791M3.518651,16.0325737L3.721,15.2480001M16.5881329,15.1714983L17.4214344,15.5421467M16.2697639,15.9297791L16.5881329,15.1714983M3.4498279,15.1688366L3.721,15.2480001M3.4498279,15.1688366L3.4272959,16.3845978M18.402319,15.1387091L18.90695,15.3761148M9.0590544,15.1255732L9.4910889,15.3207779M9.0590544,15.1255732L8.7840004,15.7720003M13.0880003,15.3570004L12.2139997,14.9090004M17.8946495,14.8998747L18.402319,15.1387091M15.6938972,15.3395834L15.8470001,14.842L16.5881329,15.1714983M17.4214344,15.5421467L17.7439995,14.8290005L17.8946495,14.8998747M11.8000002,14.8109999L11.4499998,15.6140003L11.165,16.7099991M14.5469418,14.8062286L15.6938972,15.3395834M14.4429998,15.0100002L14.5469418,14.8062286M13.9339371,14.7479525L14.4429998,15.0100002M7.868,16.0779991L7.9829998,15.2220001L7.9530001,15.1409998L8.1569996,14.7180004L9.0590544,15.1255732M16.5881329,15.1714983L16.6529999,15.0170002L16.8626099,14.5456047M13.5017796,14.5254908L13.9339371,14.7479525M13.5017796,14.5254908L13.0880003,15.3570004M7.2350001,14.4250002L6.796,15.2969999L6.6325169,15.821804M6.012208,14.371027L5.9580002,14.5930004L5.6999531,15.6256208M5.3569999,14.2150002L6.012208,14.371027M5.0250001,15.5159998L5.1300001,14.9499998L5.2030001,14.9569998L5.3569999,14.2150002M12.6890001,14.1149998L13.5017796,14.5254908M10.0377073,14.0517893L11.8000002,14.8109999M9.4910889,15.3207779L10.0377073,14.0517893M15.8640003,13.9809999L15.9709997,14.0570002L15.9469995,14.1029997L16.8626099,14.5456047M15.5389996,14.1099997L15.7370005,14.2139997L15.8640003,13.9809999M12.2077274,13.8600874L12.6890001,14.1149998M11.8000002,14.8109999L12.2077274,13.8600874M15.573,13.8400002L15.8640003,13.9809999M19.5478706,16.5372238L19.6246185,13.831727M18.90695,15.3761148L19.6246185,13.831727M6.1486492,13.812314L7.2350001,14.4250002M6.1486492,13.812314L6.012208,14.371027M16.8626099,14.5456047L17.1940002,13.8030005M19.6246185,13.831727L19.6272583,13.7386885M11.7840004,13.6350002L12.2077274,13.8600874M15.1485777,13.6267643L15.573,13.8400002M14.5469418,14.8062286L15.1485777,13.6267643M8.8964672,13.560133L10.0377073,14.0517893M14.0430002,13.5080004L13.5017796,14.5254908M13.9339371,14.7479525L14.3240004,14.0170002L14.5509996,13.5010004M19.1459999,13.4759998L19.6272583,13.7386885M18.402319,15.1387091L19.0020008,13.7880001L19.1459999,13.4759998M15.1485777,13.6267643L15.2770004,13.375M18.6650467,13.1906729L19.1459999,13.4759998M17.8946495,14.8998747L18.3610001,13.8669996L18.6650467,13.1906729M13.3789997,13.1639996L14.0430002,13.5080004M12.6890001,14.1149998L12.7819996,13.9359999L12.9420004,13.5970001L13.1029997,13.6750002L13.3789997,13.1639996M7.9123201,13.1361542L8.8964672,13.560133M7.9123201,13.1361542L7.2350001,14.4250002M15.573,13.8400002L15.8190002,13.3219995L15.4565592,13.1309834M15.2770004,13.375L15.4565592,13.1309834M14.8091011,13.106781L15.2770004,13.375M6.4696321,13.0269709L6.2319999,13.4709997L6.1486492,13.812314M13.3789997,13.1639996L13.085,13.0030003M14.3639154,12.8515816L14.8091011,13.106781M14.3639154,12.8515816L14.0430002,13.5080004M8.8964672,13.560133L8.9386053,12.83183M14.4169998,12.743L14.3639154,12.8515816M7.2081971,12.7395391L7.9123201,13.1361542M18.6650467,13.1906729L17.7065144,12.6450005M17.1940002,13.8030005L17.5769997,12.9390001L17.7065144,12.6450005M5.1874361,12.6099167L6.4696321,13.0269709M6.7588978,12.4864607L7.2081971,12.7395391M6.7588978,12.4864607L6.4696321,13.0269709M13.9110003,12.4790001L14.4169998,12.743M7.4172621,12.4762888L7.8506641,12.7446699M7.4172621,12.4762888L7.2081971,12.7395391M9.0972004,12.3850803L9.5534487,12.7267799M8.9386053,12.83183L8.9244738,12.6359501L9.0972004,12.3850803M4.25,12.3050003L5.1874361,12.6099167M5.3569999,14.2150002L3.7690001,13.7049999L4.25,12.3050003M9.5534487,12.7267799L9.8582888,12.2909603M14.4169998,12.743L14.7060003,12.25M13.3966837,12.2042065L13.9110003,12.4790001M15.4565592,13.1309834L15.8772621,12.1351805M16.9419994,12.118L16.4899998,13.0159998L16.4360008,13.0240002L16.2709999,13.4049997L17.1940002,13.8030005M8.9386053,12.83183L7.75176,12.0550976M7.75176,12.0550976L7.4172621,12.4762888M17.7065144,12.6450005L17.9696884,12.0475893M13.007,11.9960003L13.3966837,12.2042065M12.2077274,13.8600874L13.007,11.9960003M9.8582888,12.2909603L10.0545797,11.9907026M14.191,11.9700003L14.7060003,12.25M13.9110003,12.4790001L14.191,11.9700003M14.8091011,13.106781L15.2749996,12.1000004L15.3269997,12.0159998L15.4750004,12.0500002L15.5220003,11.9530001L15.8772621,12.1351805M9.3767023,11.9452953L9.8582888,12.2909603M9.0972004,12.3850803L9.3767023,11.9452953M9.5534487,12.7267799L10.3647604,12.9749203L10.8373804,11.9244013M9.3767023,11.9452953L9.4359465,11.8520765M13.007,11.9960003L12.6529999,11.8380003M15.8772621,12.1351805L16.0639992,11.717M19.6272583,13.7386885L19.6851063,11.6994572M10.0545797,11.9907026L9.5583115,11.6595411M9.4359465,11.8520765L9.5583115,11.6595411M8.0833921,11.63976L9.0972004,12.3850803M8.0833921,11.63976L7.75176,12.0550976M17.9696884,12.0475893L18.1510162,11.635972M10.3213997,11.5825596L10.8373804,11.9244013M10.0545797,11.9907026L10.3213997,11.5825596M19.4159222,11.538805L19.6851063,11.6994572M18.6650467,13.1906729L18.9669991,12.5190001L19.4159222,11.538805M14.191,11.9700003L14.4169998,11.5360003M12.6529999,11.8380003L12.0319996,11.5349998M12.0319996,11.5349998L11.5889997,12.4829998L11.8050003,12.6129999M9.4359465,11.8520765L9.2075806,11.6911201L9.0829287,11.6607199L8.7513046,11.3954697M5.8659868,11.3281698L6.7588978,12.4864607M5.1874361,12.6099167L5.4560661,11.6361103L5.8659868,11.3281698M15.2513304,11.3118668L15.6370001,11.5179996L15.8070002,11.6070004L16.0639992,11.717M14.7060003,12.25L15.2513304,11.3118668M7.3959999,11.2959995L6.7588978,12.4864607M13.8603544,11.2842188L13.3966837,12.2042065M14.4169998,11.5360003L13.8927059,11.2200298M13.8927059,11.2200298L13.8603544,11.2842188M9.8386745,11.2184L10.3213997,11.5825596M9.5583115,11.6595411L9.8386745,11.2184M7.4589009,11.1870003L8.0833921,11.63976M7.3959999,11.2959995L7.4589009,11.1870003M15.2513304,11.3118668L15.3559999,11.1470003M16.3017616,11.123909L16.8250008,11.4949999L17.1439991,11.71L17.3999996,11.8079996L17.4720001,11.8070002L17.9696884,12.0475893M16.0639992,11.717L16.2770004,11.1890001L16.3017616,11.123909M12.0319996,11.5349998L11.2035303,11.1105404M10.8373804,11.9244013L11.2035303,11.1105404M15.4517279,10.9671221L15.8360004,11.243M15.3559999,11.1470003L15.4517279,10.9671221M18.459528,10.9356441L18.8080006,11.1540003L19.4159222,11.538805M18.1510162,11.635972L18.459528,10.9356441M19.6851063,11.6994572L19.707737,10.9016447M19.4159222,11.538805L19.707737,10.9016447M13.1271353,10.8527298L13.8603544,11.2842188M12.6529999,11.8380003L12.7919998,11.5120001L13.0740004,10.9589996L13.1271353,10.8527298M15.3559999,11.1470003L14.8257446,10.850667M14.4169998,11.5360003L14.6879997,11.0889997L14.8257446,10.850667M9.3511257,10.8246183L9.8386745,11.2184M9.3511257,10.8246183L9.0457125,11.2711496M19.707737,10.9016447L19.7100048,10.8217096M10.3213997,11.5825596L10.77036,10.7723598M5.3715849,10.6868267L5.8659868,11.3281698M4.9313369,11.5090504L5.0630178,10.8767004L5.3715849,10.6868267M15.6397247,10.6454229L16.3017616,11.123909M15.4517279,10.9671221L15.6397247,10.6454229M15.6397247,10.6454229L15.5965776,10.6166334M10.77036,10.7723598L10.8647203,10.5992098M12.6410398,10.5644312L13.1271353,10.8527298M8.9821606,10.5338202L9.3511257,10.8246183M8.0833921,11.63976L8.9821606,10.5338202M14.8257446,10.850667L14.243,10.5249996L13.8927059,11.2200298M10.3505497,10.4686728L10.77036,10.7723598M9.8386745,11.2184L10.3505497,10.4686728M12.4594259,10.4567184L12.6410398,10.5644312M12.2512302,10.8542404L12.4594259,10.4567184M15.1669998,10.3299999L15.5965776,10.6166334M14.8257446,10.850667L14.9709997,10.5930004L15.1669998,10.3299999M5.0901632,10.321764L5.3715849,10.6868267M16.6480007,10.2989998L16.9279995,10.552L17.1100006,10.6969995L17.2689991,10.8730001L17.4500008,11.1090002L17.8279991,11.3900003L18.1510162,11.635972M16.3017616,11.123909L16.4440002,10.75L16.6480007,10.2989998M15.1669998,10.3299999L15.0657091,10.2674713M12.1054001,10.2467499L12.4594259,10.4567184M18.7706013,10.2303782L19.7100048,10.8217096M18.459528,10.9356441L18.5510006,10.7279997L18.7706013,10.2303782M5.0901632,10.321764L5.0691819,10.41014L4.3077641,10.2040005M4.3077641,10.2040005L3.743839,12.0125303L4.25,12.3050003M11.8282614,10.0615549L12.1054001,10.2467499M11.2035303,11.1105404L11.5598402,10.4594402L11.8282614,10.0615549M15.0657091,10.2674713L15.2250004,10.059M16.6480007,10.2989998L16.9459991,10.0389996M7.4589009,11.1870003L8.1350374,10.0153532M19.7100048,10.8217096L19.7342319,9.967659M17.0279999,9.9549999L17.2290001,10.125L17.6429996,10.4239998L18.459528,10.9356441M16.9459991,10.0389996L17.0279999,9.9549999M15.0657091,10.2674713L14.5319996,9.9379997M4.3077641,10.2040005L3.547796,9.882741M3.547796,9.882741L3.4498279,15.1688366M16.0209999,9.8280001L16.6480007,10.2989998M15.5965776,10.6166334L16.0209999,9.8280001M8.9821606,10.5338202L9.5630398,9.8128672M11.8282614,10.0615549L11.48915,9.810339M15.2250004,10.059L14.8459997,9.7840004M17.0279999,9.9549999L17.2169991,9.7259998M15.7853088,9.6567307L16.0209999,9.8280001M15.7853088,9.6567307L15.5459995,10.0270004M19.0654373,9.562274L19.7342319,9.967659M18.7706013,10.2303782L19.0654373,9.562274M15.6025696,9.5083771L15.7209997,9.6099997L15.7853088,9.6567307M15.2250004,10.059L15.6025696,9.5083771M6.0532022,9.4900789L7.3959999,11.2959995M6.0532022,9.4900789L5.2596159,10.0978498L5.1050048,10.2592497L5.0901632,10.321764M11.48915,9.810339L11.0319405,9.4706602M10.3505497,10.4686728L11.0319405,9.4706602M16.3169994,9.4689999L16.9459991,10.0389996M16.0209999,9.8280001L16.3169994,9.4689999M15.3622665,9.3021784L15.6025696,9.5083771M8.1350374,10.0153532L6.772264,9.1731348M8.6268063,9.163188L9.5630398,9.8128672M8.1350374,10.0153532L8.6268063,9.163188M11.0319405,9.4706602L10.6160746,9.1589956M10.6160746,9.1589956L9.6626434,10.4113703M19.0654373,9.562274L19.3062916,9.090313M17.2169991,9.7259998L16.552,9.0880003M16.4120007,9.2849998L16.552,9.0880003M8.6268063,9.163188L8.7021122,9.0623713M6.544517,9.0438137L6.0532022,9.4900789M12.0264416,9.0231791L11.48915,9.810339M14.9926939,8.9881172L15.2629995,9.217L15.3622665,9.3021784M14.9926939,8.9881172L14.6780005,9.3800001L14.4619999,9.6459999L14.0200005,10.4259996M10.6160746,9.1589956L10.287982,8.9131107M9.5630398,9.8128672L10.287982,8.9131107M16.3169994,9.4689999L15.7329998,8.8850002M15.7329998,8.8850002L15.3622665,9.3021784M14.7312241,8.7499294L14.8780003,8.8909998L14.9926939,8.9881172M19.0654373,9.562274L17.9060001,8.7220001M17.2169991,9.7259998L17.9060001,8.7220001M14.6852283,8.7057219L14.7312241,8.7499294M13.1271353,10.8527298L13.1599998,10.7869997L13.7889996,9.8599997L14.2889996,9.1920004L14.6852283,8.7057219M16.552,9.0880003L16.758667,8.6988859M10.287982,8.9131107L9.8828268,8.5975475M16.758667,8.6988859L16.8862286,8.4587135M11.1494913,8.3766632L12.0264416,9.0231791M11.1494913,8.3766632L10.6160746,9.1589956M15.7329998,8.8850002L15.6820002,8.79L15.6420002,8.7530003L15.493,8.6420002L15.3889999,8.5430002L15.1099997,8.3179998M14.7312241,8.7499294L15.1099997,8.3179998M18.1122017,8.2802267L18.4090004,8.4799995L18.6949997,8.6920004L18.8999996,8.842L19.3062916,9.090313M17.9060001,8.7220001L18.1122017,8.2802267M9.8828268,8.5975475L9.725832,8.4752684L9.1636944,8.2275248M8.7021122,9.0623713L9.0671844,8.4000759L9.1636944,8.2275248M16.8862286,8.4587135L16.5030003,8.2040005M15.1099997,8.3179998L15.2008905,8.2018261M14.137084,8.1869307L14.415,8.4460001L14.6852283,8.7057219M12.6410398,10.5644312L13.3952198,9.188612L13.78479,8.644908L14.137084,8.1869307M12.6530275,8.105197L12.0264416,9.0231791M5.0223222,8.1036558L6.0532022,9.4900789M5.0223222,8.1036558L4.3077641,10.2040005M17.0809994,8.092L17.9060001,8.7220001M16.8862286,8.4587135L17.0809994,8.092M9.1636944,8.2275248L9.2483673,8.087018M3.5814071,8.0692205L3.547796,9.882741M7.043314,7.9979448L8.7021122,9.0623713M9.0185366,7.9805012L9.2483673,8.087018M9.2483673,8.087018L9.3637047,7.8798819M18.327755,7.818418L19.5550003,8.6099997L19.3062916,9.090313M18.1122017,8.2802267L18.327755,7.818418M7.043314,7.9979448L6.8860431,8.2609034L6.1852441,7.7992458M15.5270004,7.7849998L16.758667,8.6988859M15.2008905,8.2018261L15.5270004,7.7849998M13.6739378,7.7551918L14.137084,8.1869307M12.1054001,10.2467499L12.7395,9.0152683L13.6739378,7.7551918M15.5270004,7.7849998L15.5609999,7.744M19.7342319,9.967659L19.7973919,7.7411528M15.3190002,7.527L15.2740002,7.579L15.5609999,7.744M8.2065783,7.5214062L9.0185366,7.9805012M14.165,7.5149999L14.4250002,7.8000002L14.5600004,7.6550002L15.2008905,8.2018261M14.9619999,7.507L15.2639999,7.7610002M15.0950003,7.9120002L14.835,7.6529999L14.9619999,7.507M18.327755,7.818418L18.5060005,7.4720001M8.5915565,7.4712501L9.3637047,7.8798819M11.7894554,7.4380651L12.6530275,8.105197M11.7894554,7.4380651L11.1494913,8.3766632M19.2955208,7.436564L19.7973919,7.7411528M9.8828268,8.5975475L10.6393805,7.406045M15.1020002,7.3280001L15.3190002,7.527M14.9619999,7.507L15.1020002,7.3280001M13.1941566,7.3124142L13.4860001,7.5799999L13.6739378,7.7551918M13.1941566,7.3124142L12.6530275,8.105197M15.3190002,7.527L15.4960003,7.3119998M8.2383413,7.2254648L8.5915565,7.4712501M12.0388098,7.0882711L11.7894554,7.4380651M17.5764389,7.0717092L18.5060005,7.4720001M17.0809994,8.092L17.3710003,7.4679999L17.5764389,7.0717092M4.2529998,7.0689998L5.0223222,8.1036558M4.2529998,7.0689998L3.5814071,8.0692205M18.680275,7.0631671L19.2955208,7.436564M18.5060005,7.4720001L18.680275,7.0631671M6.1852441,7.7992458L5.66609,7.4148331L5.5974889,7.33921L5.6095219,7.2458701L5.5875592,7.2002902L5.360157,7.0399351M15.5609999,7.744L15.6999998,7.3940001L15.8640003,7.007M10.6393805,7.406045L9.8741417,6.9631839M9.3637047,7.8798819L9.8741417,6.9631839M6.7296228,6.96101L6.1852441,7.7992458M15.8640003,7.007L15.4460001,6.927L15.3170004,7.1020002M13.5439301,6.8594022L13.9350004,7.1890001M13.5439301,6.8594022L13.1941566,7.3124142M11.5326204,6.9868431L11.6609097,6.809978L12.0388098,7.0882711M15.9359312,6.7816591L16.3010006,7.006L16.8220005,7.3249998M15.8640003,7.007L15.9359312,6.7816591M4.2529998,7.0689998L3.608146,6.6264238M3.608146,6.6264238L3.5814071,8.0692205M15.9359312,6.7816591L15.9770002,6.6529999L16.0006237,6.598434M12.3836756,6.5711508L12.7159996,6.8740001L13.1941566,7.3124142M12.3836756,6.5711508L12.0388098,7.0882711M9.8741417,6.9631839L9.1696234,6.4773788M9.1696234,6.4773788L8.5915565,7.4712501M16.0006237,6.598434L14.9809999,6.473M14.0550003,6.835L14.585,7.2600002L14.7539997,7.066L14.8299999,7.0300002L14.9280005,6.9120002L14.9809999,6.473M19.7973919,7.7411528L19.8334618,6.4696159M19.2955208,7.436564L19.8334618,6.4696159M5.8547659,6.449976L6.7296228,6.96101M9.8741417,6.9631839L10.1989317,6.3798909M9.1696234,6.4773788L8.9803562,6.369051M13.9549999,6.3270001L14.9809999,6.473M13.9549999,6.3270001L13.5439301,6.8594022M8.9803562,6.369051L8.9052429,6.316586M9.9764957,6.2520528L10.1989317,6.3798909M19.8334618,6.4696159L19.0699177,6.0947471M18.680275,7.0631671L18.9239998,6.5409999L19.0540009,6.1719999L19.0699177,6.0947471M16.0006237,6.598434L16.1189995,6.3249998L16.2212505,6.0893149M8.9803562,6.369051L9.1711073,6.0717611M9.6064482,6.038558L9.9764957,6.2520528M19.8334618,6.4696159L19.8362751,6.3704329L19.8458424,6.0331941M15.5710001,5.9920001L16.2212505,6.0893149M11.6892138,5.9327779L12.3836756,6.5711508M10.6393805,7.406045L11.1638498,6.5722342L11.6892138,5.9327779M11.6892138,5.9327779L11.5450001,5.9510002M4.9678168,5.9228268L5.8547659,6.449976M4.9678168,5.9228268L4.2529998,7.0689998M19.0699177,6.0947471L19.0949993,5.973L19.0990009,5.8390002M12.6246834,5.8145752L12.3836756,6.5711508M12.6246834,5.8145752L11.6892138,5.9327779M12.9380846,5.774405L12.9530001,6.1989999L13.1350002,6.3740001M12.9380846,5.774405L12.835,5.7880001L12.6246834,5.8145752M19.2619991,5.6999998L19.8458424,6.0331941M19.0990009,5.8390002L19.2619991,5.6999998M19.0990009,5.8390002L18.3246307,5.6464381M17.5764389,7.0717092L17.8640003,6.5170002L18.3246307,5.6464381M11.5450001,5.9510002L10.609724,5.6415162M10.1989317,6.3798909L10.609724,5.6415162M18.3246307,5.6464381L18.1140003,5.5970001M14.4879999,5.5700002L14.2379999,5.9840002L13.9549999,6.3270001M14.4879999,5.5700002L12.9380846,5.774405M5.2339149,5.511199L4.9678168,5.9228268M18.1140003,5.5970001L17.6034451,5.4671011M17.6034451,5.4671011L16.9799995,6.7030001M17.6034451,5.4671011L17.4820004,5.4390001M14.9006586,5.418766L14.5889997,5.5349998L14.4879999,5.5700002M10.609724,5.6415162L9.6640987,5.3286061M17.4820004,5.4390001L17.0319996,5.3249998L16.8929996,5.2820001L16.6360226,5.190371M16.2212505,6.0893149L16.2600002,6L16.4920006,5.5419998L16.6360226,5.190371M19.2619991,5.6999998L19.5488033,5.1472368M16.6360226,5.190371L16.5090008,5.1329999L16.3670006,5.1139998L16.2000008,5.0999999L16.0139999,5.1230001L15.6960001,5.2020001L15.0769997,5.3530002L14.9006586,5.418766M9.6640987,5.3286061L8.9399996,5.0890002L8.7835855,5.0881882M8.7835855,5.0881882L7.043314,7.9979448M16.6360226,5.190371L16.6800003,5.0830002M14.6610003,5.0549998L14.9006586,5.418766M4.5265012,5.0371218L5.2339149,5.511199M10.609724,5.6415162L10.6331596,5.5935211L10.7034597,5.464922L10.79,5.3479919L10.9223604,5.2220879L11.1044502,5.0831251L11.3450403,4.9679508M6.788403,4.9390068L5.8547659,6.449976M8.7835855,5.0881882L8.5550003,5.0869999L8.0236416,4.7520242M8.0236416,4.7520242L6.7296228,6.96101M6.788403,4.9390068L6.2738051,4.647501L6.0294609,4.9168949L5.7773108,5.1954622L5.5526562,5.4974699M16.6800003,5.0830002L15.7796097,4.6266069M18.7102337,4.5974021L19.5488033,5.1472368M18.7102337,4.5974021L18.1140003,5.5970001M13.198,4.573L13.3929996,4.6149998L13.5559998,4.6469998L13.6990004,4.6890001L13.809,4.7249999L13.9530001,4.7789998L14.1120005,4.8540001L14.2720003,4.9200001L14.415,4.9780002L14.4860001,5.013L14.6610003,5.0549998M13.198,4.573L12.6246834,5.8145752M19.8458424,6.0331941L19.8876877,4.5580668M19.5488033,5.1472368L19.8876877,4.5580668M3.6991789,4.482688L4.5265012,5.0371218M3.6485059,4.44873L3.6991789,4.482688M3.6485059,4.44873L3.608146,6.6264238M16.6800003,5.0830002L16.8859997,5.138L17.4349995,4.3189998M15.7796097,4.6266069L15.0819998,4.2729998M14.6610003,5.0549998L15.0819998,4.2729998M17.4644604,4.2521591L18.0230007,4.6139998L17.4820004,5.4390001M17.4349995,4.3189998L17.4644604,4.2521591M8.0236416,4.7520242L7.2178321,4.2440319M7.2178321,4.2440319L6.788403,4.9390068M17.4644604,4.2521591L17.5949993,4.0739999M19.0513325,4.0255418L19.8876877,4.5580668M19.0513325,4.0255418L18.7102337,4.5974021M7.2178321,4.2440319L6.5689998,3.835M6.5689998,3.835L5.2339149,5.511199M16.5489998,3.8050001L17.4349995,4.3189998M19.8876877,4.5580668L19.8896084,4.4903941L19.9120007,3.701L19.2561378,3.6821809M19.2561378,3.6821809L19.0513325,4.0255418M16.3569241,3.6810589L16.5489998,3.8050001M16.3569241,3.6810589L15.7796097,4.6266069M19.2561378,3.6821809L18.4994316,3.66047M18.4994316,3.66047L19.0513325,4.0255418M18.4994316,3.66047L17.8633022,3.6422169M17.5949993,4.0739999L17.8633022,3.6422169M17.8633022,3.6422169L16.807991,3.611937M16.807991,3.611937L17.5949993,4.0739999M16.807991,3.611937L16.7561836,3.610451L16.6703091,3.6079869M16.5489998,3.8050001L16.6703091,3.6079869M16.6703091,3.6079869L16.211174,3.5948131M16.211174,3.5948131L16.3569241,3.6810589M11.6251144,3.5709989L11.9694595,3.751684M16.211174,3.5948131L15.4755154,3.5709219M15.4755154,3.5709219L15.0819998,4.2729998M15.4755154,3.5709219L13.6920004,3.513M15.0819998,4.2729998L13.6920004,3.513M13.6920004,3.513L13.198,4.573M13.6920004,3.513L12.1245174,3.4754789M11.9694595,3.751684L12.1245174,3.4754789M12.1245174,3.4754789L11.6879988,3.46503M11.6251144,3.5709989L11.6879988,3.46503M11.6879988,3.46503L10.7841892,3.4390969M9.6640987,5.3286061L10.7841892,3.4390969M10.7841892,3.4390969L9.7828522,3.4103661M9.7828522,3.4103661L8.7835855,5.0881882M9.7828522,3.4103661L7.7992611,3.353451M7.2178321,4.2440319L7.7992611,3.353451M7.7992611,3.353451L6.9635701,3.329473M6.5689998,3.835L6.9635701,3.329473M6.9635701,3.329473L5.6504951,3.2917969M4.5265012,5.0371218L5.6504951,3.2917969M5.6504951,3.2917969L4.5018001,3.2588379M3.6991789,4.482688L4.5018001,3.2588379M4.5018001,3.2588379L3.671,3.2349999L3.6485059,4.44873M11.7447996,4.812386L11.8784599,5.174901L11.5450001,5.9510002M11.7447996,4.812386L11.7215538,4.7587409M11.3450403,4.9679508L11.5410604,4.8256912L11.7215538,4.7587409M11.7215538,4.7587409L11.9124603,4.7007518L12.1021299,4.6366978L12.2367535,4.6037641M12.2367535,4.6037641L12.3080902,4.5863128L12.4647598,4.5699968L12.7875404,4.5581861L12.9984198,4.5517359L13.1107798,4.5683851L13.198,4.573M12.3289022,3.8954501L12.45576,3.953624M12.2367535,4.6037641L12.1689796,4.2499371L12.3289022,3.8954501M11.9694595,3.751684L12.3289022,3.8954501M11.3450403,4.9679508L11.0809002,4.4880772L11.6251144,3.5709989L11.6251144,3.5709989"); | |
svg.selectAll("path") // select all paths | |
.data([data]) // Pass the correct data. This data is not used for the path | |
.enter() | |
.append("path") | |
.attr("d", line_path) // define the path | |
.attr("fill", "none") // fill color set to none | |
.attr("stroke", "#00abc8") // line color to draw the map | |
.attr("stroke-width", 0.1) // line width to draw the map | |
.attr("transform", "scale(40)"); // Scale the map by 40 times | |
// Plot the pump locations. load the data from pumps.csv | |
d3.csv("Pumps.csv", function(data) { | |
data.forEach(function(d) { | |
d.x = +d.x*40; | |
d.y = +d.y*40; | |
}); | |
//console.log(data); | |
// add text where pumps are located | |
var text = svg.selectAll("text") | |
.data(data) | |
.enter() | |
.append("text") | |
.text("Pump") | |
.attr("dx", function(d) { return d.x; }) | |
.attr("dy", function(d) { return d.y; }) | |
.attr("fill", "black") | |
.attr("font-size", "15px"); | |
// add symbols where pumps are located | |
svg.selectAll(".symbol") | |
.data(data) | |
.enter().append("path") | |
.attr("d", d3.svg.symbol().type("square")) | |
.attr("transform", function(d) { return "translate(" + d.x + "," + d.y + ")"; }); | |
var Heading1 = svg.selectAll("title") | |
.data(data) | |
.enter() | |
.append("text") | |
.text("Map of London showing location of Pumps(squares) and locations of deaths(dots)- To pan (click and move) / zoom (scroll)") | |
.attr("dx", 50) | |
.attr("dy", 50) | |
.attr("fill", "black") | |
.attr("font-size", "25px"); | |
}); | |
<!-- console.log(data); --> | |
// Draw Dots for death and show information on number of deaths and gender | |
svg.selectAll(".dot") | |
.data(data) | |
.enter().append("circle") | |
.attr("class", "dot") | |
.attr("r", 2) | |
.attr("cx", function(d) { return d.x; }) | |
.attr("cy", function(d) { return d.y; }) | |
.style("fill", "red") | |
.on("mouseover", function(d) { | |
tooltip.transition() | |
.duration(300) | |
.style("opacity", .9); | |
tooltip.html("Age range = " + d["Agerange"] + "<br/>" + "Gender = " + d["GenderName"] ) | |
.style("left", (d3.event.pageX + 5) + "px") | |
.style("top", (d3.event.pageY - 28) + "px"); | |
}) | |
.on("mouseout", function(d) { | |
tooltip.transition() | |
.duration(500) | |
.style("opacity", 0); | |
}); | |
}); | |
var margin = {top: 100, right: 20, bottom: 30, left: 150}, | |
width = 1500 - margin.left - margin.right, | |
height = 800 - margin.top - margin.bottom; | |
// Parse the date / time | |
// add the graph canvas to the body of the webpage | |
var svg_2 = 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 + ")"); | |
// add the tooltip area to the webpage | |
var tooltip = d3.select("body").append("div") | |
.attr("class", "tooltip") | |
.style("opacity", 0); | |
// setup x | |
var parseDate = d3.time.format("%d-%b").parse; | |
var xValue = function(d) { return d.Date;}, // data -> value | |
//var x = d3.time.scale().range([0, width]); | |
xScale = d3.time.scale().range([0, width]), // value -> display | |
xAxis = d3.svg.axis().scale(xScale).orient("bottom").ticks(9); // Define the axes | |
// setup y | |
var yValue = function(d) { return d.DeathCount;}, // data -> value | |
yScale = d3.scale.linear().domain([0,200]).range([height, 0]), // value -> display | |
yAxis = d3.svg.axis().scale(yScale).orient("left").ticks(20); | |
// Define the line | |
var valueline = d3.svg.line() | |
.x(function(d) { return xScale(d.date); }) | |
.y(function(d) { return yScale(d.NumberofDeath); }); | |
d3.csv("DeathDays_ori.csv", function(error, data) { | |
console.log(data) | |
data.forEach(function(d) { | |
d.date = parseDate(d.date); | |
d.NumberofDeath = + d.NumberofDeath; | |
}); | |
console.log(data); | |
// Scale the range of the data | |
xScale.domain(d3.extent(data, function(d) { return d.date; })); | |
yScale.domain([0, d3.max(data, function(d) { return d.NumberofDeath; })]); | |
var Heading2 = svg_2.selectAll("text") | |
.data(data) | |
.enter() | |
.append("text") | |
.text("Line graph of Number of deaths vs Date") | |
.attr("dx", 50) | |
.attr("dy", 1) | |
.attr("fill", "black") | |
.attr("font-size", "25px"); | |
// Add the valueline path. | |
svg_2.append("path") | |
.data(data) | |
.attr("class", "line") | |
.attr("d", valueline(data)) | |
.attr("stroke", "steelblue") | |
.attr("stroke-width", "2") | |
.attr("fill","none") | |
.on("mouseover", function(d) { | |
tooltip.transition() | |
.duration(300) | |
.style("opacity", .9); | |
tooltip.html("Number of Deaths = " + d["NumberofDeath"] + "<br/>" + "Date = " + d["date"] ) | |
.style("left", (d3.event.pageX + 5) + "px") | |
.style("top", (d3.event.pageY - 28) + "px"); | |
}) | |
.on("mouseout", function(d) { | |
tooltip.transition() | |
.duration(500) | |
.style("opacity", 0); | |
}); | |
// Add the X Axis | |
svg_2.append("g") | |
.attr("class", "x axis") | |
.attr("transform", "translate(0," + height + ")") | |
.call(xAxis) | |
.append("text") | |
.attr("class", "label") | |
.attr("x", width) | |
.attr("y", -6) | |
.style("text-anchor", "end") | |
.text("Date"); | |
// Add the Y Axis | |
svg_2.append("g") | |
.attr("class", "y axis") | |
.call(yAxis) | |
.append("text") | |
.attr("class", "label") | |
.attr("transform", "rotate(-90)") | |
.attr("y", 6) | |
.attr("dy", ".71em") | |
.style("text-anchor", "end") | |
.text("DeathCount"); | |
}); | |
//////////////////////////////////////////// Code for Bar Chart /////////////////// | |
var margin = {top: 20, right: 20, bottom: 30, left: 150}, | |
bar_width = 1000 - margin.left - margin.right, | |
bar_height = 500 - margin.top - margin.bottom; | |
// Parse the date / time | |
// add the graph canvas to the body of the webpage | |
var svg_3 = d3.select("body").append("svg") | |
.attr("width", bar_width) | |
.attr("height", bar_height); | |
var Death_Counts = [ 65,78,29,19,34,24,22,35,46,45,88,86]; | |
var selection = svg_3.selectAll('rect') // the UPDATE selection | |
.data(Death_Counts); | |
selection.enter() // the ENTER selection | |
.append('rect') | |
.attr('x', function(d, i){ | |
return 25 + i * 25; | |
}) | |
.attr('width', 15) | |
.attr('fill', function(d, i){ | |
if (i%2==0) {return "blue"} else {return "red"} | |
}) | |
//.merge(selection) // ENTER + UPDATE selections | |
// everything below now happens to all five bars | |
.attr('height', function(d){ | |
return d ; | |
}) | |
.attr('y', function(d){ | |
return 350 - d; | |
}); | |
var Bar_text = svg_3.selectAll("text") | |
.data(Death_Counts) | |
.enter() | |
.append("text") | |
.text( function(d, i){ | |
if (i%2==0) {return "M"} else {return "F"} | |
}) | |
.attr('x', function(d, i){ | |
return 25 + i * 25 ; | |
}) | |
.attr('y', function(d){ | |
return 350 - d -10; }) | |
.attr("fill", "black") | |
.attr("font-size", "18px"); | |
// Add the X Axis | |
svg_3.append("g") | |
.attr("class", "x axis") | |
.append("text") | |
.attr("class", "label") | |
.attr("x", 200) | |
.attr("y", 375) | |
.style("text-anchor", "end") | |
.text("Age Groups"); | |
// Add the Y Axis | |
svg_3.append("g") | |
.attr("class", "y axis") | |
.append("text") | |
.attr("class", "label") | |
.attr("transform", "rotate(-90)") | |
.attr("y", 6) | |
.attr("dy", ".71em") | |
.style("text-anchor", "end") | |
.text("Number of Deaths"); | |
var Heading3 = svg_3.selectAll("title") | |
.data(Death_Counts) | |
.enter() | |
.append("text") | |
.text("Bar Graph of Number of deaths vs Age Groups for Male and Female") | |
.attr("dx", 50) | |
.attr("dy", 50) | |
.attr("fill", "black") | |
.attr("font-size", "25px"); | |
</script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x | y | |
---|---|---|
8.6512012 | 17.8915997 | |
10.9847803 | 18.5178509 | |
13.37819 | 17.3945408 | |
14.8798304 | 17.8099194 | |
8.694768 | 14.9054699 | |
8.8644161 | 12.75354 | |
12.5713596 | 11.72717 | |
10.6609697 | 7.428647 | |
13.5214596 | 7.95825 | |
16.4348907 | 9.2521296 | |
18.9143906 | 9.7378187 | |
16.0051098 | 5.0468378 | |
8.9994402 | 5.1010232 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment