map.js 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. var bombs = new Backbone.Collection([
  2. {
  3. name: 'Gerboise Bleue',
  4. radius: 0,
  5. yeild: 70,
  6. country: 'France',
  7. significance: 'First fission weapon test by France',
  8. date: '1960-02-13',
  9. fillKey: 'FRA',
  10. latitude: -0.325,
  11. longitude: 26.1840
  12. }, {
  13. name: 'Canopus',
  14. radius: 0,
  15. yeild: 2600,
  16. country: 'France',
  17. significance: 'First "staged" thermonuclear test by France',
  18. fillKey: 'FRA',
  19. date: '1968-08-24',
  20. latitude: -22.15,
  21. longitude: -138.45
  22. }, {
  23. name: 'Smiling Buddha',
  24. radius: 0,
  25. yeild: 12,
  26. country: 'India',
  27. significance: 'First fission nuclear explosive test by India',
  28. fillKey: 'IND',
  29. date: '1974-05-18',
  30. latitude: 27.095,
  31. longitude: 71.753
  32. }, {
  33. name: 'Pokhran-II',
  34. radius: 0,
  35. yeild: 60,
  36. country: 'India',
  37. fillKey: 'IND',
  38. significance: 'First potential fusion/boosted weapon test by India; first deployable fission weapon test by India',
  39. date: '1998-05-11',
  40. latitude: 27.07884,
  41. longitude: 71.72211
  42. }, {
  43. name: '2006 North Korean nuclear test',
  44. radius: 0,
  45. yeild: 1,
  46. country: 'North Korea',
  47. fillKey: 'PRK',
  48. significance: 'First fission plutonium-based device tested by North Korea; likely resulted as a fizzle',
  49. date: '2006-10-09',
  50. latitude: 40.5743,
  51. longitude: 129.2012
  52. }, {
  53. name: '2009 North Korean nuclear test',
  54. radius: 0,
  55. yeild: 15,
  56. country: 'North Korea',
  57. significance: 'First successful fission device tested by North Korea',
  58. date: '2009-05-25',
  59. fillKey: 'PRK',
  60. latitude: 41.306,
  61. longitude: 129.029
  62. }, {
  63. name: 'Chagai-I',
  64. radius: 0,
  65. yeild: 40,
  66. country: 'Pakistan',
  67. significance: 'First fission weapon (boosted) test by Pakistan',
  68. fillKey: 'PAK',
  69. date: '1998-05-28',
  70. latitude: 30.12,
  71. longitude: 67.01
  72. }, {
  73. name: 'Chagai-II',
  74. radius: 0,
  75. yeild: 20,
  76. country: 'Pakistan',
  77. significance: 'Second fission weapon (boosted) test by Pakistan',
  78. fillKey: 'PAK',
  79. date: '1998-05-30',
  80. latitude: 30.22,
  81. longitude: 67.11
  82. }, {
  83. name: '596',
  84. radius: 0,
  85. yeild: 22,
  86. country: 'PR China',
  87. significance: 'First fission weapon test by the People\'s Republic of China',
  88. fillKey: 'PRC',
  89. date: '1964-10-16',
  90. latitude: 42.35,
  91. longitude: 88.30
  92. }, {
  93. name: 'Test No. 6',
  94. radius: 0,
  95. yeild: 3300,
  96. country: 'PR China',
  97. fillKey: 'PRC',
  98. significance: 'First "staged" thermonuclear weapon test by the People\'s Republic of China',
  99. date: '1967-06-17',
  100. latitude: 40.10,
  101. longitude: 90.35
  102. }, {
  103. name: 'Hurricane',
  104. radius: 0,
  105. yeild: 25,
  106. country: 'UK',
  107. significance: 'First fission weapon test by the UK',
  108. fillKey: 'GBR',
  109. date: '1952-10-03',
  110. latitude: -20.25,
  111. longitude: 115.33
  112. }, {
  113. name: 'Grapple X',
  114. radius: 0,
  115. yeild: 1800,
  116. country: 'UK',
  117. fillKey: 'GBR',
  118. significance: 'First (successful) "staged" thermonuclear weapon test by the UK',
  119. date: '1957-11-08',
  120. latitude: 1.53,
  121. longitude: -157.24
  122. },
  123. {
  124. name: 'Trinity',
  125. radius: 0,
  126. yeild: 19,
  127. country: 'USA',
  128. fillKey: 'USA',
  129. significance: 'First fission device test, first plutonium implosion detonation ',
  130. date: '1945-07-16',
  131. latitude: 33.4038,
  132. longitude: -106.2831
  133. }, {
  134. name: 'Little Boy',
  135. radius: 0,
  136. yeild: 13,
  137. country: 'USA',
  138. fillKey: 'USA',
  139. significance: 'Bombing of Hiroshima, Japan, first detonation of an enriched uranium gun-type device, first use of a nuclear device in military combat.',
  140. date: '1945-08-06',
  141. latitude: 34.237,
  142. longitude: 132.2719
  143. }, {
  144. name: 'Fat Man',
  145. radius: 0,
  146. yeild: 20,
  147. fillKey: 'USA',
  148. country: 'USA',
  149. significance: 'Bombing of Nagasaki, Japan, second and last use of a nuclear device in military combat.',
  150. date: '1945-08-09',
  151. latitude: 32.4625,
  152. longitude: 129.5147
  153. }, {
  154. name: 'Ivy Mike',
  155. radius: 0,
  156. yeild: 10400,
  157. country: 'USA',
  158. fillKey: 'USA',
  159. significance: 'First cryogenic fusion fuel "staged" thermonuclear weapon, primarily a test device and not weaponized',
  160. date: '1952-11-01',
  161. latitude: 11.40,
  162. longitude: 162.1113
  163. }, {
  164. name: 'Castle Bravo',
  165. radius: 0,
  166. yeild: 15000,
  167. country: 'USA',
  168. significance: 'First dry fusion fuel "staged" thermonuclear weapon; a serious nuclear fallout accident occurred',
  169. fillKey: 'USA',
  170. date: '1954-03-01',
  171. latitude: 11.415,
  172. longitude: 165.1619
  173. }, {
  174. name: 'RDS-1',
  175. radius: 0,
  176. yeild: 22,
  177. country: 'USSR',
  178. fillKey: 'RUS',
  179. significance: 'First fission weapon test by the USSR',
  180. date: '1949-08-29',
  181. latitude: 50.2615,
  182. longitude: 77.4851
  183. }, {
  184. name: 'Joe 4',
  185. radius: 0,
  186. yeild: 400,
  187. country: 'USSR',
  188. fillKey: 'RUS',
  189. significance: 'First fusion weapon test by the USSR (not "staged")',
  190. date: '1953-08-12',
  191. latitude: 50.07,
  192. longitude: 78.43
  193. }, {
  194. name: 'RDS-37',
  195. radius: 0,
  196. yeild: 1600,
  197. country: 'USSR',
  198. fillKey: 'RUS',
  199. significance: 'First "staged" thermonuclear weapon test by the USSR (deployable)',
  200. date: '1955-11-22',
  201. latitude: 50.07,
  202. longitude: 78.43
  203. }, {
  204. name: 'Tsar Bomba',
  205. radius: 0,
  206. yeild: 50000,
  207. country: 'USSR',
  208. fillKey: 'RUS',
  209. significance: 'Largest thermonuclear weapon ever tested—scaled down from its initial 100 Mt design by 50%',
  210. date: '1961-10-31',
  211. latitude: 73.482,
  212. longitude: 54.5854
  213. }
  214. ]);
  215. //prep the data
  216. var yields = bombs.pluck('yeild');
  217. var min = d3.min(yields);
  218. var max = d3.max(yields);
  219. var scale = d3.scale.pow()
  220. .domain([min, max])
  221. .range([10, 45]);
  222. bombs.each(function (val, idx) {
  223. bombs.at(idx).set('radius', scale(val.get('yeild')));
  224. });
  225. $("#container10").datamap({
  226. scope: 'world',
  227. bubbles: bombs.toJSON(),
  228. bubble_config: {
  229. popupTemplate: _.template([
  230. '<div class="hoverinfo"><strong><%= data.name %></strong>',
  231. '<br/>Payload: <%= data.yeild %> kilotons',
  232. '<br/>Country: <%= data.country %>',
  233. '<br/>Date: <%= data.date %>',
  234. '</div>'].join(''))
  235. },
  236. geography_config: {
  237. popupOnHover: false,
  238. highlightOnHover: false
  239. },
  240. fills: {
  241. 'USA': '#ffdd00',
  242. 'RUS': '#00C6D7',
  243. 'PRK': '#ff7f0e',
  244. 'PRC': '#000000',
  245. 'IND': '#052963',
  246. 'GBR': '#8c564b',
  247. 'FRA': '#d62728',
  248. 'PAK': '#7f7f7f',
  249. defaultFill: '#002561'
  250. },
  251. data: {
  252. 'RUS': {fillKey: 'RUS'},
  253. 'PRK': {fillKey: 'PRK'},
  254. 'CHN': {fillKey: 'PRC'},
  255. 'IND': {fillKey: 'IND'},
  256. 'GBR': {fillKey: 'GBR'},
  257. 'FRA': {fillKey: 'FRA'},
  258. 'PAK': {fillKey: 'PAK'},
  259. 'USA': {fillKey: 'USA'}
  260. }
  261. });