Skip to content

Instantly share code, notes, and snippets.

@cavedave
Last active October 5, 2016 13:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save cavedave/6b3862936fefea14c241ea8537c4053d to your computer and use it in GitHub Desktop.
Save cavedave/6b3862936fefea14c241ea8537c4053d to your computer and use it in GitHub Desktop.
Make a map of where a logo turtle would be pushed by the wind in the major cities. This takes direction and strength ad noon each day and draws a line. Initially just an image but maybe a video later. Data is from http://brightdata.brightwindanalysis.com/ Inspired by Richard Long: Circle of Autumn Winds, 1994 http://www.stedelijk.nl/kunstwerk/30…
Date Time WS50m_m/s WD50m_deg T2M_degC PS_hPa
01/01/2015 12:00:00 12.773 206 7.66 1018.75
02/01/2015 12:00:00 10.259 275 8.01 1021.34
03/01/2015 12:00:00 1.895 257 6.14 1005.35
04/01/2015 12:00:00 1.98 232 2.79 1026.29
05/01/2015 12:00:00 5.994 212 7.96 1018.73
06/01/2015 12:00:00 8.564 242 9.53 1008.69
07/01/2015 12:00:00 9.663 203 7.32 1014.26
08/01/2015 12:00:00 7.525 288 7.51 1010.45
09/01/2015 12:00:00 13.216 255 10.47 1010.38
10/01/2015 12:00:00 16.201 287 9.2 1004.3
11/01/2015 12:00:00 11.727 263 6.09 1013.56
12/01/2015 12:00:00 15.515 231 10.35 999.86
13/01/2015 12:00:00 7.13 253 7.13 993.05
14/01/2015 12:00:00 10.183 255 4.84 998.58
15/01/2015 12:00:00 13.768 224 8.47 981.08
16/01/2015 12:00:00 4.982 272 5.05 995.16
17/01/2015 12:00:00 8.199 221 3.94 1002.72
18/01/2015 12:00:00 5.527 356 2.42 1001.78
19/01/2015 12:00:00 2.894 306 2.78 1004.59
20/01/2015 12:00:00 5.037 161 3.07 1001.24
21/01/2015 12:00:00 6.072 131 3.38 998.37
22/01/2015 12:00:00 4.714 39 3.99 1011.49
23/01/2015 12:00:00 5.692 207 3.21 1015.53
24/01/2015 12:00:00 9.751 316 5.39 1017.09
25/01/2015 12:00:00 7.669 256 7.04 1019.91
26/01/2015 12:00:00 9.371 323 8.17 1013.44
27/01/2015 12:00:00 6.205 303 8.04 1017.05
28/01/2015 12:00:00 17.832 280 6.93 991.79
29/01/2015 12:00:00 11.425 247 4.25 971.94
30/01/2015 12:00:00 7.549 296 4.23 970.15
31/01/2015 12:00:00 9.174 331 3.05 974.13
01/02/2015 12:00:00 13.695 327 3.61 989.66
02/02/2015 12:00:00 5.896 322 2.12 996.22
03/02/2015 12:00:00 8.105 19 3.19 998.12
04/02/2015 12:00:00 8.428 354 3.62 1010.04
05/02/2015 12:00:00 8.3 31 3.5 1015.39
06/02/2015 12:00:00 12.916 50 4.09 1021.17
07/02/2015 12:00:00 7.92 27 5.67 1026.49
08/02/2015 12:00:00 6.766 4 6.36 1029.03
09/02/2015 12:00:00 4.634 343 6.38 1024.45
10/02/2015 12:00:00 1.911 145 5.99 1023.79
11/02/2015 12:00:00 2.594 169 5.08 1015.08
12/02/2015 12:00:00 0.999 177 4.83 1010.91
13/02/2015 12:00:00 13.281 174 7.36 993.11
14/02/2015 12:00:00 5.963 103 7.92 993.97
15/02/2015 12:00:00 3.22 88 8 1005.17
16/02/2015 12:00:00 9.278 200 8.5 1005.09
17/02/2015 12:00:00 5.019 325 7.56 1027.92
18/02/2015 12:00:00 7.612 229 8.52 1027.95
19/02/2015 12:00:00 13.347 210 7.37 1011.47
20/02/2015 12:00:00 1.586 326 5.92 996.84
21/02/2015 12:00:00 7.817 309 5.41 991.66
22/02/2015 12:00:00 12.193 200 5.73 995.56
23/02/2015 12:00:00 11.953 238 5.96 982.55
24/02/2015 12:00:00 11.428 280 8.44 996.63
25/02/2015 12:00:00 4.433 304 10.31 1005.16
26/02/2015 12:00:00 9.407 248 11.21 998.91
27/02/2015 12:00:00 4.929 280 7.71 1010.72
28/02/2015 12:00:00 12.193 194 6.77 998.74
01/03/2015 12:00:00 13.212 252 9.94 992.62
02/03/2015 12:00:00 14.636 268 6.46 998.53
03/03/2015 12:00:00 11.458 285 6.15 1004.72
04/03/2015 12:00:00 9.759 312 8.27 1019.58
05/03/2015 12:00:00 6.598 263 10.04 1029.04
06/03/2015 12:00:00 8.715 231 10.51 1024.74
07/03/2015 12:00:00 11.001 224 11.06 1015.94
08/03/2015 12:00:00 7.922 243 11.83 1013.14
09/03/2015 12:00:00 10.114 206 10.34 1015.01
10/03/2015 12:00:00 3.224 348 10.52 1022.07
11/03/2015 12:00:00 8.133 165 11.24 1018.76
12/03/2015 12:00:00 10.1 153 11.39 1016.13
13/03/2015 12:00:00 8.428 88 9.22 1013.24
14/03/2015 12:00:00 8.566 51 8.41 1020.72
15/03/2015 12:00:00 7.706 65 8.15 1018.03
16/03/2015 12:00:00 5.019 109 7.95 1014.05
17/03/2015 12:00:00 2.975 90 11.22 1015.55
18/03/2015 12:00:00 6.604 18 9.37 1023.03
19/03/2015 12:00:00 8.184 17 7.87 1023.15
20/03/2015 12:00:00 3.084 5 10.06 1017.83
21/03/2015 12:00:00 10.577 6 8.86 1016
22/03/2015 12:00:00 5.127 68 9.07 1016.55
23/03/2015 12:00:00 4.664 267 10.31 1006.4
24/03/2015 12:00:00 4.185 329 8.68 999.93
25/03/2015 12:00:00 3.83 349 8.07 1002.83
26/03/2015 12:00:00 11.591 305 11.54 992.81
27/03/2015 12:00:00 5.71 256 10.4 1010.7
28/03/2015 12:00:00 15.869 232 14.36 1001.16
29/03/2015 12:00:00 20.925 260 12.94 986.26
30/03/2015 12:00:00 8.777 267 9.26 1001.98
31/03/2015 12:00:00 17.563 288 11.2 999.85
01/04/2015 12:00:00 12.307 274 9.48 1013.77
02/04/2015 12:00:00 3.113 341 9.45 1012.84
03/04/2015 12:00:00 3.437 189 11.03 1005.29
04/04/2015 12:00:00 8.533 32 9.87 1012.97
05/04/2015 12:00:00 3.353 63 10.59 1017.96
06/04/2015 12:00:00 7.303 17 15.17 1022.41
07/04/2015 12:00:00 1.406 300 14.93 1027.58
08/04/2015 12:00:00 2.847 132 16.42 1023.53
09/04/2015 12:00:00 1.141 129 15.69 1017.56
10/04/2015 12:00:00 5.969 165 17.85 1008.16
11/04/2015 12:00:00 11.076 303 11.1 1009.8
12/04/2015 12:00:00 13.414 223 13.6 1015.66
13/04/2015 12:00:00 4.557 238 14.77 1022.05
14/04/2015 12:00:00 8.068 251 18.48 1016.31
15/04/2015 12:00:00 5.671 253 21.41 1007.32
16/04/2015 12:00:00 6.143 83 15.64 1006.12
17/04/2015 12:00:00 9.069 70 12.77 1011.48
18/04/2015 12:00:00 9.731 76 13.41 1018.62
19/04/2015 12:00:00 4.859 24 10.71 1014.07
20/04/2015 12:00:00 5.993 70 16.56 1020.77
21/04/2015 12:00:00 6.299 46 16.15 1025.07
22/04/2015 12:00:00 8.893 61 15.05 1020.76
23/04/2015 12:00:00 2.024 90 13.91 1010.65
24/04/2015 12:00:00 7.57 231 16.79 1001.88
25/04/2015 12:00:00 9.321 241 16.2 996.09
26/04/2015 12:00:00 4.302 29 10.85 998.96
27/04/2015 12:00:00 1.235 348 12.29 1002.22
28/04/2015 12:00:00 8.541 264 10.74 1008.58
29/04/2015 12:00:00 9.87 243 10.39 1003.05
30/04/2015 12:00:00 7.876 262 12.45 1001.45
01/05/2015 12:00:00 7.38 70 10.45 1000.29
02/05/2015 12:00:00 7.212 120 11.9 1000.68
03/05/2015 12:00:00 11.934 232 16.62 987.22
04/05/2015 12:00:00 6.633 204 16.83 995.66
05/05/2015 12:00:00 17.303 235 14.77 989.24
06/05/2015 12:00:00 17.766 228 12.21 994
07/05/2015 12:00:00 8.291 229 15.04 1007.89
08/05/2015 12:00:00 5.82 141 16.28 1003.79
09/05/2015 12:00:00 13.319 259 15.79 1006.78
10/05/2015 12:00:00 7.847 203 17.51 1014.25
11/05/2015 12:00:00 8.993 236 19.65 1009.21
12/05/2015 12:00:00 10.375 262 15.03 1010.16
13/05/2015 12:00:00 0.89 33 17.39 1008.59
14/05/2015 12:00:00 10.779 101 10.3 1000.7
15/05/2015 12:00:00 3.921 307 14.7 1012.64
16/05/2015 12:00:00 8.027 306 16.69 1015.19
17/05/2015 12:00:00 6.908 251 15.03 1015.35
18/05/2015 12:00:00 12.112 249 13.67 993.06
19/05/2015 12:00:00 10.216 258 12.08 995.8
20/05/2015 12:00:00 7.791 302 13.12 1007.86
21/05/2015 12:00:00 5.728 259 17.25 1016.63
22/05/2015 12:00:00 4.487 257 18.34 1015.31
23/05/2015 12:00:00 4.388 51 16.39 1015.27
24/05/2015 12:00:00 5.056 252 18.04 1009.72
25/05/2015 12:00:00 5.744 315 15.18 1009.63
26/05/2015 12:00:00 5.396 324 17.75 1013.67
27/05/2015 12:00:00 4.436 246 17.2 1013.5
28/05/2015 12:00:00 8.301 274 15.92 1005.53
29/05/2015 12:00:00 13.751 245 12.71 995.58
30/05/2015 12:00:00 5.153 256 15.77 1005.78
31/05/2015 12:00:00 11.409 256 16.23 995.88
01/06/2015 12:00:00 11.771 216 13.53 1004.72
02/06/2015 12:00:00 18.583 231 17.77 995.4
03/06/2015 12:00:00 5.75 270 17.82 1013.95
04/06/2015 12:00:00 5.902 133 19.48 1015.57
05/06/2015 12:00:00 8.826 235 21.56 1006.48
06/06/2015 12:00:00 9.943 250 17.35 1016.2
07/06/2015 12:00:00 3.957 347 18.14 1022.78
08/06/2015 12:00:00 5.615 35 17.66 1023.19
09/06/2015 12:00:00 9.231 45 15.52 1022.7
10/06/2015 12:00:00 8.812 62 16.92 1018.79
11/06/2015 12:00:00 9.191 86 20.95 1009.6
12/06/2015 12:00:00 6.695 83 21.89 1000.23
13/06/2015 12:00:00 9.018 248 17.32 1000.9
14/06/2015 12:00:00 5.639 344 16.72 1003.82
15/06/2015 12:00:00 4.029 55 17.67 1013.21
16/06/2015 12:00:00 1.803 277 21.01 1015.81
17/06/2015 12:00:00 8.738 265 22.92 1012.65
18/06/2015 12:00:00 5.693 319 19.09 1011.82
19/06/2015 12:00:00 6.597 311 18.49 1012.63
20/06/2015 12:00:00 4.725 230 17.13 1011.88
21/06/2015 12:00:00 8.005 277 19.05 1006.5
22/06/2015 12:00:00 8.331 298 16.21 1000.08
23/06/2015 12:00:00 4.561 335 18.36 1009.2
24/06/2015 12:00:00 6.2 229 21.59 1011.17
25/06/2015 12:00:00 4.552 212 22.48 1012.25
26/06/2015 12:00:00 8.235 214 21.97 1007.59
27/06/2015 12:00:00 5.039 277 22.06 1010.87
28/06/2015 12:00:00 7.657 217 20.49 1009.57
29/06/2015 12:00:00 4.44 233 22.06 1013.18
30/06/2015 12:00:00 5.701 136 25 1010.51
01/07/2015 12:00:00 9.647 147 29.43 1003.4
02/07/2015 12:00:00 3.996 157 23.32 1009.17
03/07/2015 12:00:00 4.954 105 24.55 1014.77
04/07/2015 12:00:00 9.294 226 25.08 1009.81
05/07/2015 12:00:00 4.327 242 18.84 1007.82
06/07/2015 12:00:00 7.585 214 21.76 1010.07
07/07/2015 12:00:00 12.333 239 22.05 998.56
08/07/2015 12:00:00 10.527 276 20.59 1001.7
09/07/2015 12:00:00 3.182 301 19.73 1014.15
10/07/2015 12:00:00 6.56 157 22.78 1011.14
11/07/2015 12:00:00 7.439 267 23.95 1008.04
12/07/2015 12:00:00 10.727 233 20.31 1007.46
13/07/2015 12:00:00 11.606 245 22.99 1004.89
14/07/2015 12:00:00 5.314 256 21.8 1008.2
15/07/2015 12:00:00 4.811 290 22.89 1008.85
16/07/2015 12:00:00 7.373 113 22.17 1007.71
17/07/2015 12:00:00 11.818 231 23.44 1002.81
18/07/2015 12:00:00 5.979 239 21.42 1008.05
19/07/2015 12:00:00 10.35 249 22.7 1000.46
20/07/2015 12:00:00 8.636 219 24.37 1000.1
21/07/2015 12:00:00 9.866 225 23.61 1003.36
22/07/2015 12:00:00 8.778 237 22.16 1005.2
23/07/2015 12:00:00 5.499 244 18.74 1008.75
24/07/2015 12:00:00 6.429 91 17.73 1000.01
25/07/2015 12:00:00 9.182 311 18.91 1005.14
26/07/2015 12:00:00 12.368 178 14.88 996.26
27/07/2015 12:00:00 12.413 257 20.89 991.14
28/07/2015 12:00:00 11.263 264 18.96 996.64
29/07/2015 12:00:00 7.029 285 18.54 1002.01
30/07/2015 12:00:00 5.657 309 17.96 1009.41
31/07/2015 12:00:00 3.495 171 20.1 1009.28
01/08/2015 12:00:00 4.996 234 20.21 1007.56
02/08/2015 12:00:00 6.141 168 22.49 1008.59
03/08/2015 12:00:00 11.037 215 22.62 1002.84
04/08/2015 12:00:00 11.411 237 21.1 1004
05/08/2015 12:00:00 6.679 163 21.15 1004.3
06/08/2015 12:00:00 8.381 233 23.05 1003.78
07/08/2015 12:00:00 2.062 217 23.21 1008.76
08/08/2015 12:00:00 3.176 156 23.91 1014.47
09/08/2015 12:00:00 5.698 223 24.75 1010.85
10/08/2015 12:00:00 8.038 219 24.18 1007.32
11/08/2015 12:00:00 0.962 32 20.28 1011.33
12/08/2015 12:00:00 7.246 65 21.26 1014.29
13/08/2015 12:00:00 9.566 67 23.22 1004.99
14/08/2015 12:00:00 7.88 202 22.08 995.88
15/08/2015 12:00:00 4.732 307 19.08 1003.87
16/08/2015 12:00:00 1.383 76 19.79 1007.87
17/08/2015 12:00:00 5.647 2 20.44 1008.16
18/08/2015 12:00:00 7.488 279 18.97 1004.98
19/08/2015 12:00:00 7.473 211 20.31 1008.74
20/08/2015 12:00:00 6.489 214 22.37 1011.2
21/08/2015 12:00:00 8.771 192 24.77 1011.04
22/08/2015 12:00:00 7.912 153 27.41 1005.19
23/08/2015 12:00:00 8.128 184 19.91 991.59
24/08/2015 12:00:00 6.72 64 16.16 987.76
25/08/2015 12:00:00 10.721 171 15.65 999.53
26/08/2015 12:00:00 14.246 201 19.18 995.34
27/08/2015 12:00:00 9.217 233 18.13 998.56
28/08/2015 12:00:00 8.48 229 19.77 1008.35
29/08/2015 12:00:00 4.707 171 19.68 1011.33
30/08/2015 12:00:00 3.903 58 20.43 1008.37
31/08/2015 12:00:00 7.78 12 16.3 1002.88
01/09/2015 12:00:00 4.595 319 17.72 1009.51
02/09/2015 12:00:00 3.599 307 17.17 1008.64
03/09/2015 12:00:00 5.2 297 16.13 1006.37
04/09/2015 12:00:00 6.824 319 16.3 1008.61
05/09/2015 12:00:00 6.612 3 16.18 1012.82
06/09/2015 12:00:00 4.74 321 17.69 1019.52
07/09/2015 12:00:00 6.159 5 18.64 1021.35
08/09/2015 12:00:00 3.574 49 17.45 1018.4
09/09/2015 12:00:00 7.402 96 19.29 1013.51
10/09/2015 12:00:00 8.398 95 19.97 1011.89
11/09/2015 12:00:00 7.263 127 20.15 1006.08
12/09/2015 12:00:00 9.258 226 19.83 998.17
13/09/2015 12:00:00 5.615 101 16.15 996.74
14/09/2015 12:00:00 9.412 198 16.79 983.67
15/09/2015 12:00:00 9.386 248 17.87 987.93
16/09/2015 12:00:00 9.828 58 14.77 978.92
17/09/2015 12:00:00 6.828 270 17.21 992.77
18/09/2015 12:00:00 3.055 302 17.42 1002.22
19/09/2015 12:00:00 4.329 345 17.9 1016.67
20/09/2015 12:00:00 5.951 236 18.72 1015.8
21/09/2015 12:00:00 9.2 215 13.67 1002.56
22/09/2015 12:00:00 6.874 2 13.68 991.55
23/09/2015 12:00:00 7.979 267 16.85 1003.51
24/09/2015 12:00:00 8.899 261 17 1005.62
25/09/2015 12:00:00 4.323 301 16.58 1014.22
26/09/2015 12:00:00 3.6 62 16.98 1019.27
27/09/2015 12:00:00 7.096 80 17.79 1024.96
28/09/2015 12:00:00 7.529 90 17.55 1028.03
29/09/2015 12:00:00 8.741 77 17.68 1026.26
30/09/2015 12:00:00 10.204 82 17.19 1023.88
01/10/2015 12:00:00 9.321 65 17.34 1022.43
02/10/2015 12:00:00 4.805 67 17.49 1015.57
03/10/2015 12:00:00 1.137 166 16.65 1005.39
04/10/2015 12:00:00 3.327 190 16.47 1005.65
05/10/2015 12:00:00 9.072 191 17.67 996.26
06/10/2015 12:00:00 9.904 189 18.43 987.59
07/10/2015 12:00:00 9.561 292 14.59 1000.91
08/10/2015 12:00:00 2.953 307 15.73 1012.68
09/10/2015 12:00:00 3.059 65 16.26 1013.82
10/10/2015 12:00:00 6.931 74 15.05 1010.61
11/10/2015 12:00:00 6.534 65 14.98 1008.21
12/10/2015 12:00:00 5.661 8 13.76 1010.65
13/10/2015 12:00:00 10.099 32 12.85 1014
14/10/2015 12:00:00 10.302 18 12.94 1012.7
15/10/2015 12:00:00 6.694 39 12.02 1012.3
16/10/2015 12:00:00 10.175 25 12.41 1012.02
17/10/2015 12:00:00 8.895 13 12.58 1011.02
18/10/2015 12:00:00 4.67 49 14.36 1011.93
19/10/2015 12:00:00 4.794 30 14.73 1015.24
20/10/2015 12:00:00 5.271 346 14.11 1017.38
21/10/2015 12:00:00 8.36 226 12.01 1006.68
22/10/2015 12:00:00 8.029 306 14.48 1008.28
23/10/2015 12:00:00 5.596 216 13.61 1011.94
24/10/2015 12:00:00 8.48 214 14.04 1003.86
25/10/2015 12:00:00 2.132 207 11.28 1017.18
26/10/2015 12:00:00 8.895 140 15.22 1004.86
27/10/2015 12:00:00 7.274 142 15.25 1000.89
28/10/2015 12:00:00 6.217 251 14.58 997.58
29/10/2015 12:00:00 11.713 181 13.89 1003.38
30/10/2015 12:00:00 8.814 170 13.91 1010.45
31/10/2015 12:00:00 3.985 159 14.98 1013.22
01/11/2015 12:00:00 1.155 127 16.43 1019.94
02/11/2015 12:00:00 3.66 117 14.95 1014.87
03/11/2015 12:00:00 5.263 149 14.32 1006.29
04/11/2015 12:00:00 3.234 256 12.92 1004.8
05/11/2015 12:00:00 10.29 198 15.1 1003.78
06/11/2015 12:00:00 12.445 202 15.89 1004.37
07/11/2015 12:00:00 17.387 215 15.61 1006.52
08/11/2015 12:00:00 10.129 180 14.49 1009.97
09/11/2015 12:00:00 14.328 235 12.98 1011.84
10/11/2015 12:00:00 12.495 235 16.43 1012
11/11/2015 12:00:00 10.966 232 14.46 1011.7
12/11/2015 12:00:00 10.509 205 15 1011.89
13/11/2015 12:00:00 14.301 259 10.39 1010.77
14/11/2015 12:00:00 9.369 226 9.71 1013.69
15/11/2015 12:00:00 15.023 247 15.77 1002.99
16/11/2015 12:00:00 9.986 255 12.93 1001.54
17/11/2015 12:00:00 12.949 214 12.97 994.44
18/11/2015 12:00:00 17.142 224 14 1001.02
19/11/2015 12:00:00 7.714 253 11.07 1003.68
20/11/2015 12:00:00 7.484 271 7.48 997.07
21/11/2015 12:00:00 16.45 338 4.77 997.68
22/11/2015 12:00:00 4.388 333 4.6 1005.24
23/11/2015 12:00:00 3.885 232 4.21 1015.55
24/11/2015 12:00:00 6.873 270 7.4 1001.79
25/11/2015 12:00:00 9.706 321 9.46 1001.16
26/11/2015 12:00:00 3.681 302 8.68 1010.68
27/11/2015 12:00:00 10.598 226 12.37 999.98
28/11/2015 12:00:00 10.042 217 6.51 1002.89
29/11/2015 12:00:00 18.276 251 11.55 997.84
30/11/2015 12:00:00 18.308 241 11.48 1003.43
01/12/2015 12:00:00 12.105 244 12.94 1013.64
02/12/2015 12:00:00 11.314 216 12.13 1013.31
03/12/2015 12:00:00 10.034 189 11.27 1011.35
04/12/2015 12:00:00 10.264 236 10.89 1018.5
05/12/2015 12:00:00 17.822 221 11.36 1009.67
06/12/2015 12:00:00 12.647 234 12.96 1007.5
07/12/2015 12:00:00 8.243 181 13.06 1015.75
08/12/2015 12:00:00 11.05 224 12.44 1011.33
09/12/2015 12:00:00 9.932 219 10.29 1024.51
10/12/2015 12:00:00 13.461 213 10.65 1015.14
11/12/2015 12:00:00 9.382 247 8.78 1012.02
12/12/2015 12:00:00 12.596 216 11.04 1007.7
13/12/2015 12:00:00 2.247 153 8.03 1009.85
14/12/2015 12:00:00 5.614 175 8.51 1006.63
15/12/2015 12:00:00 8.119 156 10.52 1008.14
16/12/2015 12:00:00 11.11 240 13.46 1010.23
17/12/2015 12:00:00 9.788 198 12.64 1007.01
18/12/2015 12:00:00 8.281 209 12.27 1009.79
19/12/2015 12:00:00 12.444 193 13.69 1003.42
20/12/2015 12:00:00 10.733 223 12.34 1002.06
21/12/2015 12:00:00 15.14 214 10.78 1003.84
22/12/2015 12:00:00 17.176 218 13.49 1003.54
23/12/2015 12:00:00 9.27 225 10.47 1012.52
24/12/2015 12:00:00 14.977 238 10.27 1000.12
25/12/2015 12:00:00 9.736 188 9.25 1009.05
26/12/2015 12:00:00 15.033 216 13.7 1009.35
27/12/2015 12:00:00 10.465 219 13.08 1011.77
28/12/2015 12:00:00 9.928 157 10.96 1007.11
29/12/2015 12:00:00 8.268 206 11.06 1010.23
30/12/2015 12:00:00 18.031 177 11.37 1001.47
31/12/2015 12:00:00 11.8 218 10.26 1005.27
#!/usr/bin/python
"""
Make a map of where a turtle would be pushed each day
by the wind in a certain location
Where the wind would push you in 2015 London. Power and direction are taken into account each day at noon. Code and data is at https://gist.github.com/cavedave/6b3862936fefea14c241ea8537c4053d
"""
from tkinter import *
from turtle import *
import turtle
import os
import tempfile
import shutil
import cairosvg
from canvasvg import canvasvg
import csv
import pandas as pd
import numpy as np
silly = turtle.Turtle()
silly.right(270)#start pointing north. turtle starts pointing ->
silly.pensize(2)
df = pd.read_csv('london2015d.csv')
#print(df)
silly.hideturtle()
silly.speed(0)
silly.penup()
silly.goto(-450,-330)
silly.pendown()
#write in the start day
silly.penup()
silly.write("Jan 1st", True, align="left",font=("Arial", 15, "normal"))
silly.pendown()
for index, row in df.iterrows():
#ddhm Mean wind direction over 10 minutes at time of highest mean
#point in a direction opposite of the wind angle. they say where it comes from.
go=row['WD50m_deg']+180
silly.right(go)
silly.forward((row['WS50m_m/s']))
#we want to point back at the start for next days wind
backN=360- go
silly.right(backN)
#wdsp Mean Wind Speed
if index ==182:
silly.penup()
silly.write("Jul 1st", True, align="left",font=("Arial", 15, "normal"))
silly.pendown()
#write in the last day
silly.penup()
silly.write("Dec 31st", True, align="left",font=("Arial", 15, "normal"))
silly.penup()
# Make a header
silly.penup()
silly.goto(-140,120)
silly.write("London Wind Map for 2015", True, align="left",font=("Arial", 25, "normal"))
silly.penup()
# Make a compass
silly.penup()
silly.goto(670,-320)
silly.write("⇑N", True, align="left",font=("Arial", 30, "normal"))
silly.penup()
silly.goto(-140,80)
silly.write("If you were pushed by the wind each day\nthis is the path you'd take", True, align="left",font=("Arial", 15, "normal"))
silly.penup()
silly.goto(0,-350)
silly.pendown()
# get image
ts= silly.getscreen()
ts.getcanvas().postscript(file="london.eps")
#finish up
turtle.done()
Date Time WS50m_m/s WD50m_deg T2M_degC PS_hPa
01/01/2015 12:00 6.911 34 6.13 1003.31
02/01/2015 12:00 1.613 266 9.29 1006.38
03/01/2015 12:00 2.448 205 12.5 1003.51
04/01/2015 12:00 6.835 352 13.77 994.05
05/01/2015 12:00 4.665 18 10.5 1004.09
06/01/2015 12:00 3.276 337 12.12 999.17
07/01/2015 12:00 3.642 176 11.56 1004.34
08/01/2015 12:00 3.178 206 12.98 1008.21
09/01/2015 12:00 1.227 286 13.63 1008.14
10/01/2015 12:00 0.934 7 14.19 998.78
11/01/2015 12:00 6.834 221 14.22 990.92
12/01/2015 12:00 1.133 353 14.12 1005.86
13/01/2015 12:00 2.835 181 12.89 1004.09
14/01/2015 12:00 3.897 220 13.05 997.86
15/01/2015 12:00 4.225 199 13.7 998.12
16/01/2015 12:00 10.012 147 13.59 994.36
17/01/2015 12:00 6.295 231 14.2 992.24
18/01/2015 12:00 2.291 7 10.88 991.3
19/01/2015 12:00 3.782 151 12.26 987.55
20/01/2015 12:00 6.997 155 10.14 983.48
21/01/2015 12:00 7.201 153 10.63 985.49
22/01/2015 12:00 4.733 134 10.4 983.73
23/01/2015 12:00 8.763 17 13.14 974.25
24/01/2015 12:00 5.27 17 13.08 982.45
25/01/2015 12:00 6.789 50 9.06 987.27
26/01/2015 12:00 2.721 48 10 992.96
27/01/2015 12:00 5.463 348 9.36 989.29
28/01/2015 12:00 9.737 20 8.02 987.95
29/01/2015 12:00 8.468 181 6.53 979.3
30/01/2015 12:00 18.295 261 10.15 957.27
31/01/2015 12:00 4.735 159 8.67 961.57
01/02/2015 12:00 8.554 267 8.02 966.94
02/02/2015 12:00 5.656 323 8.61 977.58
03/02/2015 12:00 7.017 154 8.15 978.28
04/02/2015 12:00 7.314 189 10.43 978.12
05/02/2015 12:00 8.018 185 9.84 974.43
06/02/2015 12:00 1.765 221 8.34 977.25
07/02/2015 12:00 3.055 108 8.83 988.73
08/02/2015 12:00 5.012 306 8.86 985.44
09/02/2015 12:00 11.6 20 5.47 995.97
10/02/2015 12:00 5.867 19 13.24 997.31
11/02/2015 12:00 1.74 104 14.06 998.28
12/02/2015 12:00 1.947 254 12.95 998.83
13/02/2015 12:00 2.403 186 10.59 997.91
14/02/2015 12:00 4.555 175 11.67 993.01
15/02/2015 12:00 6.092 152 10.59 988.21
16/02/2015 12:00 10.12 123 11.41 988.53
17/02/2015 12:00 3.739 76 16.42 997.76
18/02/2015 12:00 1.754 53 14.71 1004.91
19/02/2015 12:00 1.795 266 12.63 1006.59
20/02/2015 12:00 2.519 252 12.61 999.48
21/02/2015 12:00 7.655 150 8.83 986.38
22/02/2015 12:00 3.268 13 11.33 970.36
23/02/2015 12:00 2.767 273 15.69 978.15
24/02/2015 12:00 6.082 173 11.91 973.59
25/02/2015 12:00 5.427 27 13.03 978.12
26/02/2015 12:00 2.141 78 14.2 987.15
27/02/2015 12:00 2.777 287 15.13 984.08
28/02/2015 12:00 3.088 240 15.11 990.58
01/03/2015 12:00 3.99 259 13.18 994.62
02/03/2015 12:00 8.64 208 12.43 992.61
03/03/2015 12:00 3.01 241 17.59 996.16
04/03/2015 12:00 6.042 160 14.26 995.02
05/03/2015 12:00 14.246 35 7.55 982.16
06/03/2015 12:00 13.846 32 9.6 997.14
07/03/2015 12:00 11.119 36 9.85 999.94
08/03/2015 12:00 1.704 253 13.97 996.42
09/03/2015 12:00 0.952 234 14.68 997.49
10/03/2015 12:00 3.625 329 13.99 997.67
11/03/2015 12:00 2.69 261 16.1 995.72
12/03/2015 12:00 8.256 33 11.98 993.73
13/03/2015 12:00 1.417 296 15.02 993.16
14/03/2015 12:00 2.356 206 13.68 995.68
15/03/2015 12:00 11.914 131 11.39 996.83
16/03/2015 12:00 7.863 120 11.99 997.49
17/03/2015 12:00 5.249 129 14.52 996.75
18/03/2015 12:00 3.295 256 17.26 997.75
19/03/2015 12:00 2.771 280 18.23 996.6
20/03/2015 12:00 3.2 203 16.25 997.99
21/03/2015 12:00 5.302 151 12.81 995.12
22/03/2015 12:00 2.773 79 11.88 986.7
23/03/2015 12:00 2.892 215 17.23 989.04
24/03/2015 12:00 6.465 148 17.8 986.49
25/03/2015 12:00 15.282 165 14.29 970.99
26/03/2015 12:00 5.701 173 18.29 982.01
27/03/2015 12:00 9.376 333 15.11 979.66
28/03/2015 12:00 8.403 32 16.53 988.68
29/03/2015 12:00 4.005 282 19.11 988.98
30/03/2015 12:00 4.159 281 18.4 982.38
31/03/2015 12:00 6.105 208 19 989.13
01/04/2015 12:00 7.881 320 19.74 988.17
02/04/2015 12:00 4.784 221 17.9 992.2
03/04/2015 12:00 1.835 195 19.12 991.37
04/04/2015 12:00 9.112 175 13.78 985.29
05/04/2015 12:00 4.574 75 10.81 978.68
06/04/2015 12:00 7.311 24 12.8 990.81
07/04/2015 12:00 9.639 16 9.84 1001.1
08/04/2015 12:00 6.455 359 14.58 1002.09
09/04/2015 12:00 2.056 24 18.56 1002.84
10/04/2015 12:00 3.364 232 18.07 1004.32
11/04/2015 12:00 3.999 200 16.3 1002.6
12/04/2015 12:00 3.255 225 20.16 1003.5
13/04/2015 12:00 3.381 273 21.65 1003.09
14/04/2015 12:00 5.249 301 22.37 1000.95
15/04/2015 12:00 3.942 212 21.13 1000.2
16/04/2015 12:00 3.971 214 20.82 997.16
17/04/2015 12:00 6.713 163 20.55 992.36
18/04/2015 12:00 4.159 261 19.9 989.98
19/04/2015 12:00 3.594 258 17.12 991.59
20/04/2015 12:00 4.335 251 18.84 993.89
21/04/2015 12:00 4.367 335 21.75 998.99
22/04/2015 12:00 5.265 242 21.98 999.72
23/04/2015 12:00 7.122 185 20.48 994.65
24/04/2015 12:00 2.208 221 20.73 991.48
25/04/2015 12:00 3.275 236 20.31 993.61
26/04/2015 12:00 5.534 189 20.73 990.8
27/04/2015 12:00 8.596 162 16.04 984.7
28/04/2015 12:00 4.102 280 17.85 981.22
29/04/2015 12:00 4.09 200 19.18 993.05
30/04/2015 12:00 5.187 254 18.1 994.49
01/05/2015 12:00 7.682 206 19.21 994.29
02/05/2015 12:00 4.915 224 21.47 989.48
03/05/2015 12:00 4.007 216 23.29 991.3
04/05/2015 12:00 4.765 197 25.96 992.22
05/05/2015 12:00 10.382 157 27.62 989.32
06/05/2015 12:00 1.48 179 25.6 990.16
07/05/2015 12:00 5.767 294 27.38 990.93
08/05/2015 12:00 3.667 244 25.44 992.35
09/05/2015 12:00 5.1 304 25.45 991.18
10/05/2015 12:00 5.635 38 26.05 996.57
11/05/2015 12:00 4.57 283 26.18 1000.17
12/05/2015 12:00 4.765 274 26.23 1000.16
13/05/2015 12:00 4.738 262 25.71 998.2
14/05/2015 12:00 4.003 205 24.73 990.54
15/05/2015 12:00 6.655 156 22.3 982.64
16/05/2015 12:00 2.982 179 21.33 992.55
17/05/2015 12:00 0.247 57 30.64 989.19
18/05/2015 12:00 3.585 299 28.84 987.86
19/05/2015 12:00 6.306 188 25.94 985.72
20/05/2015 12:00 6.706 201 23.58 987.38
21/05/2015 12:00 6.812 229 18.99 991.03
22/05/2015 12:00 4.678 304 15.23 986.59
23/05/2015 12:00 5.739 255 16.53 988.07
24/05/2015 12:00 1.761 266 17.39 990.52
25/05/2015 12:00 4.077 270 22.67 989.07
26/05/2015 12:00 2.678 248 21.78 985.67
27/05/2015 12:00 1.583 43 19.75 989.26
28/05/2015 12:00 6.47 354 23.14 992.89
29/05/2015 12:00 4.413 234 24.71 992.46
30/05/2015 12:00 5.577 240 23.82 992.9
31/05/2015 12:00 3.919 239 26.51 993.24
01/06/2015 12:00 2.682 247 26.02 994.24
02/06/2015 12:00 4.82 261 27.89 995.88
03/06/2015 12:00 3.731 260 29.17 997.31
04/06/2015 12:00 3.616 248 30.29 996.53
05/06/2015 12:00 1.514 220 32.25 994.48
06/06/2015 12:00 3.27 251 30.05 996.76
07/06/2015 12:00 3.28 246 30.99 995.18
08/06/2015 12:00 4.085 238 28.26 991.91
09/06/2015 12:00 4.655 250 27.4 990.86
10/06/2015 12:00 3.227 260 29.52 993.5
11/06/2015 12:00 3.62 230 29.31 992.88
12/06/2015 12:00 4.936 138 26.47 993.43
13/06/2015 12:00 4.461 181 30.87 990.9
14/06/2015 12:00 8.516 201 25.09 988.94
15/06/2015 12:00 4.96 228 24.57 992.33
16/06/2015 12:00 5.77 252 26.15 992.85
17/06/2015 12:00 2.172 279 24.94 989.05
18/06/2015 12:00 7.537 1 25.98 989.9
19/06/2015 12:00 4.438 264 27.8 987.43
20/06/2015 12:00 4.435 280 26.02 987.64
21/06/2015 12:00 4.056 292 27.55 991.14
22/06/2015 12:00 5.065 226 27.2 993.68
23/06/2015 12:00 8.483 190 26.95 988.8
24/06/2015 12:00 2.595 299 28.1 991.09
25/06/2015 12:00 5.693 242 26.7 995.53
26/06/2015 12:00 3.49 309 29.33 993.27
27/06/2015 12:00 4.095 303 30.97 991.67
28/06/2015 12:00 3.208 249 31.14 991.01
29/06/2015 12:00 5.155 281 31.26 994.7
30/06/2015 12:00 6.126 268 31.39 995.07
01/07/2015 12:00 4.036 229 32.66 995.72
02/07/2015 12:00 5.466 254 32.46 997.57
03/07/2015 12:00 5.059 261 33.91 998.13
04/07/2015 12:00 5.388 282 34.69 996.69
05/07/2015 12:00 5.292 240 33.39 995.34
06/07/2015 12:00 5.623 280 34.81 994.71
07/07/2015 12:00 5.13 245 34.28 992.8
08/07/2015 12:00 4.879 225 32.98 988.02
09/07/2015 12:00 4.076 215 32.79 986.15
10/07/2015 12:00 5.237 242 33.59 990.74
11/07/2015 12:00 5.085 262 33.4 993.16
12/07/2015 12:00 4.94 243 33.73 991.86
13/07/2015 12:00 5.085 231 31.93 990.97
14/07/2015 12:00 4.347 240 35.38 990.44
15/07/2015 12:00 4.481 221 35.26 992.93
16/07/2015 12:00 5.127 231 35.89 994.35
17/07/2015 12:00 4.944 242 36.32 994.89
18/07/2015 12:00 4.729 240 36.77 992.93
19/07/2015 12:00 3.798 259 36.33 990.54
20/07/2015 12:00 5.154 255 36.6 988.74
21/07/2015 12:00 4.77 237 36.44 990.56
22/07/2015 12:00 4.925 248 35.13 989.44
23/07/2015 12:00 5.145 233 35.88 986.27
24/07/2015 12:00 4.539 257 33.8 985.85
25/07/2015 12:00 5.007 246 31.66 987.46
26/07/2015 12:00 5.524 221 32.02 987.62
27/07/2015 12:00 6.317 263 31.64 986.18
28/07/2015 12:00 6.292 207 31.63 985.68
29/07/2015 12:00 5.997 261 33.46 986.65
30/07/2015 12:00 4.777 233 33.54 987.09
31/07/2015 12:00 3.707 242 34.79 986.16
01/08/2015 12:00 6.102 228 32.08 990.84
02/08/2015 12:00 5.631 219 33.74 992.03
03/08/2015 12:00 5.384 258 35.13 990.2
04/08/2015 12:00 4.64 265 35.94 989.2
05/08/2015 12:00 4.977 264 36.63 989.42
06/08/2015 12:00 4.63 248 37.37 989.46
07/08/2015 12:00 4.108 245 36.55 990.2
08/08/2015 12:00 3.469 257 36.49 991.59
09/08/2015 12:00 5.156 237 35 991.09
10/08/2015 12:00 5.881 169 29.74 988.52
11/08/2015 12:00 4.042 151 28.69 988.29
12/08/2015 12:00 0.277 284 35.45 990.36
13/08/2015 12:00 4.172 266 36.68 989.47
14/08/2015 12:00 6.062 226 33.9 987.72
15/08/2015 12:00 4.874 209 29.78 986.19
16/08/2015 12:00 4.026 237 25.7 985.95
17/08/2015 12:00 5.625 247 28.23 987.6
18/08/2015 12:00 5.02 226 29.52 989.86
19/08/2015 12:00 3.499 236 26.28 990.18
20/08/2015 12:00 4.913 293 28.92 993.68
21/08/2015 12:00 4.603 318 30.45 994.16
22/08/2015 12:00 2.849 287 30.25 992.15
23/08/2015 12:00 5.521 203 29.65 990.47
24/08/2015 12:00 9.918 174 29.65 990.72
25/08/2015 12:00 5.757 229 30.26 992.33
26/08/2015 12:00 5.186 208 31 993.02
27/08/2015 12:00 4.824 188 32.24 993.28
28/08/2015 12:00 4.98 182 32.21 996.11
29/08/2015 12:00 3.561 228 33.9 997.49
30/08/2015 12:00 4.21 260 34.82 996.45
31/08/2015 12:00 4.313 252 34.79 993.6
01/09/2015 12:00 5.575 247 33.36 990.63
02/09/2015 12:00 5.966 208 30.76 989.92
03/09/2015 12:00 5.552 211 30.37 990.29
04/09/2015 12:00 4.963 182 27 991
05/09/2015 12:00 7.071 254 27.41 988.98
06/09/2015 12:00 4.234 223 25.4 992.8
07/09/2015 12:00 3.633 253 27.61 993.35
08/09/2015 12:00 3.991 242 25.72 993.84
09/09/2015 12:00 1.708 254 25.57 989.51
10/09/2015 12:00 3.472 314 27.56 988.78
11/09/2015 12:00 4.427 218 27.09 995.36
12/09/2015 12:00 3.945 219 28.52 997.85
13/09/2015 12:00 8.939 167 26.18 994.26
14/09/2015 12:00 11.895 160 25.81 989.35
15/09/2015 12:00 6.787 190 29.9 990.73
16/09/2015 12:00 10.697 171 29.41 988.76
17/09/2015 12:00 11.058 177 32.37 989.17
18/09/2015 12:00 6.416 176 29.63 992.38
19/09/2015 12:00 4.999 242 30.77 992.35
20/09/2015 12:00 3.936 295 27.81 987.24
21/09/2015 12:00 5.781 18 28.76 987.44
22/09/2015 12:00 4.223 283 26.97 986.11
23/09/2015 12:00 8.45 231 23.98 985.27
24/09/2015 12:00 5.498 289 23.43 986.18
25/09/2015 12:00 3.789 332 24.06 987.9
26/09/2015 12:00 2.243 231 23.87 991.03
27/09/2015 12:00 1.856 266 24.87 993.52
28/09/2015 12:00 1.409 285 23.77 996.11
29/09/2015 12:00 1.26 292 23.16 996.98
30/09/2015 12:00 4.677 251 22.28 996.92
01/10/2015 12:00 9.004 115 18.11 995.23
02/10/2015 12:00 12.23 154 23.2 995.09
03/10/2015 12:00 4.111 243 23.95 998.75
04/10/2015 12:00 7.722 184 24.54 997.73
05/10/2015 12:00 5.712 195 24.87 992.58
06/10/2015 12:00 6.409 203 25.86 987.11
07/10/2015 12:00 3.933 295 24.38 985.07
08/10/2015 12:00 3.383 246 25 989.56
09/10/2015 12:00 4.108 167 21.66 991.26
10/10/2015 12:00 2.503 79 19.77 976.37
11/10/2015 12:00 8.705 332 20.96 982.61
12/10/2015 12:00 3.596 216 22.43 991.93
13/10/2015 12:00 11.07 168 21.89 989.92
14/10/2015 12:00 6.464 189 21.97 984.86
15/10/2015 12:00 7.426 243 19.41 987.82
16/10/2015 12:00 7.102 239 18.2 992.74
17/10/2015 12:00 4.216 218 19.52 994.86
18/10/2015 12:00 4.661 153 20.09 992.81
19/10/2015 12:00 2.767 261 23.01 987.48
20/10/2015 12:00 1.695 188 21.33 987.62
21/10/2015 12:00 1.747 39 18.85 986.52
22/10/2015 12:00 5.899 24 17.95 983.64
23/10/2015 12:00 5.878 36 19.8 991.78
24/10/2015 12:00 3.032 248 20.25 996.58
25/10/2015 12:00 2.435 283 19.67 998.14
26/10/2015 12:00 2.414 170 18.23 996.54
27/10/2015 12:00 4.653 157 20.85 994.97
28/10/2015 12:00 7.358 150 17.33 993.1
29/10/2015 12:00 3.618 219 18.17 990.34
30/10/2015 12:00 5.016 78 21.79 994.05
31/10/2015 12:00 2.741 72 20.75 998.9
01/11/2015 12:00 1.65 61 21.24 1002.18
02/11/2015 12:00 1.284 263 20.34 1005.11
03/11/2015 12:00 3.097 199 20.84 1003.17
04/11/2015 12:00 1.748 263 21.08 998.16
05/11/2015 12:00 2.615 311 20.64 996.66
06/11/2015 12:00 3.855 327 21.78 998.53
07/11/2015 12:00 1.204 251 22.98 1001.72
08/11/2015 12:00 2.043 208 22.61 1005.49
09/11/2015 12:00 2.884 289 21.69 1003.28
10/11/2015 12:00 2.677 296 20.12 1000.8
11/11/2015 12:00 1.903 279 19.74 999.94
12/11/2015 12:00 1.796 275 19.45 1001.49
13/11/2015 12:00 2.407 239 18.68 1003.25
14/11/2015 12:00 2.741 320 18.43 1001.05
15/11/2015 12:00 3.26 306 18.34 996.83
16/11/2015 12:00 1.491 278 18.27 995.06
17/11/2015 12:00 2.181 256 17.78 996.52
18/11/2015 12:00 1.555 258 17.71 997.98
19/11/2015 12:00 1.565 232 18.24 998.88
20/11/2015 12:00 6.941 205 17.4 992.99
21/11/2015 12:00 11.034 221 16.03 969.68
22/11/2015 12:00 5.565 337 11.22 979.96
23/11/2015 12:00 4.227 176 11.6 992.12
24/11/2015 12:00 0.212 30 14.15 993.63
25/11/2015 12:00 5.858 302 12.65 982.84
26/11/2015 12:00 10.289 23 9.05 971.88
27/11/2015 12:00 9.485 33 11.85 979.26
28/11/2015 12:00 4.657 312 12.05 988.89
29/11/2015 12:00 2.621 303 13.65 1000.07
30/11/2015 12:00 2.426 284 13.72 1003.35
01/12/2015 12:00 2.208 193 16.18 1001.56
02/12/2015 12:00 0.833 231 15.63 1005.15
03/12/2015 12:00 1.731 215 14.79 1006.87
04/12/2015 12:00 0.829 243 14.2 1008.1
05/12/2015 12:00 1.377 149 14.68 1009.27
06/12/2015 12:00 1.475 227 15.64 1010.14
07/12/2015 12:00 2.254 176 15.97 1009.99
08/12/2015 12:00 3.671 178 15.28 1008.29
09/12/2015 12:00 3.319 323 14.95 1006.59
10/12/2015 12:00 4.686 22 14.38 1006.18
11/12/2015 12:00 3.651 336 13.83 1005.7
12/12/2015 12:00 2.399 301 13.55 1003.22
13/12/2015 12:00 1.794 171 12.23 1000.25
14/12/2015 12:00 1.525 159 14.28 999.43
15/12/2015 12:00 3.139 319 14.52 1003.02
16/12/2015 12:00 3.828 341 14.3 1004.07
17/12/2015 12:00 2.492 251 14.39 1005.09
18/12/2015 12:00 2.248 319 14.53 1003.63
19/12/2015 12:00 3.446 326 14.55 1002.3
20/12/2015 12:00 2.314 190 14.71 1004.78
21/12/2015 12:00 2.595 255 15.36 1008.88
22/12/2015 12:00 4.205 327 14.88 1010.98
23/12/2015 12:00 1.92 266 15.13 1008.92
24/12/2015 12:00 2.188 210 13.67 1008.12
25/12/2015 12:00 1.633 340 14.86 1009.61
26/12/2015 12:00 1.362 231 14.29 1007.91
27/12/2015 12:00 1.72 289 15.24 1008.17
28/12/2015 12:00 1.207 206 14.24 1006.55
29/12/2015 12:00 4.671 322 12.05 1003.35
30/12/2015 12:00 1.36 68 13.16 999.87
31/12/2015 12:00 2.108 266 11.21 1001.27
#!/usr/bin/python
"""
Make a map of where a turtle would be pushed each day
by the wind in a certain location
"""
from tkinter import *
from turtle import *
import turtle
import os
import tempfile
import shutil
import cairosvg
from canvasvg import canvasvg
import csv
import pandas as pd
import numpy as np
silly = turtle.Turtle()
silly.right(270)#start pointing north. turtle starts pointing ->
silly.pensize(2)
df = pd.read_csv('rome2015d.csv')
#print(df)
silly.hideturtle()
silly.speed(0)
silly.penup()
silly.goto(-350,-260)
silly.pendown()
#write in the start day
silly.penup()
silly.write("Jan 1st", True, align="right",font=("Arial", 10, "normal"))
silly.goto(-350,-230)
silly.pendown()
for index, row in df.iterrows():
#ddhm Mean wind direction over 10 minutes at time of highest mean
#point in a direction opposite of the wind angle. they say where it comes from.
go=row['WD50m_deg']+180
silly.right(go)
silly.forward((row['WS50m_m/s']))
#we want to point back at the start for next days wind
backN=360- go
silly.right(backN)
#wdsp Mean Wind Speed
if index ==182:
silly.penup()
silly.write("Jul 1st", True, align="left",font=("Arial", 10, "normal"))
silly.pendown()
#write in the last day
silly.penup()
silly.write("Dec 31st", True, align="left",font=("Arial", 10, "normal"))
silly.penup()
# Make a header
silly.penup()
silly.goto(-250,120)
silly.write("Rome Wind Map for 2015", True, align="left",font=("Arial", 20, "normal"))
silly.penup()
silly.goto(-250,70)
silly.write("If you were pushed by the wind each day\nthis is the path you'd take", True, align="left",font=("Arial", 10, "normal"))
silly.penup()
silly.goto(0,-350)
silly.pendown()
# Make a compass
silly.penup()
silly.goto(180,-190)
silly.write("⇑N", True, align="left",font=("Arial", 30, "normal"))
# get image
ts= silly.getscreen()
ts.getcanvas().postscript(file="london.eps")
#finish up
turtle.done()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment