This Ain’t a Scene… It’s an Arms Race


Gun control has become a hot topic recently in the United States. Due to the increase of deaths at the ends of firearms there have been a lot of studies showing how guns flow through America. I wondered what of the larger weaponry. Items like missiles, tanks, and jet fighters Who is buying these heavy duty weaponry? Or do governments just produce their own weapons?

My intuition led me to believe that most heavy weaponry would be produced by China and USA and would be headed toward warzones like Syria, parts of Africa, and parts of the Middle East. These conflict zones surely need the most weaponry. In order to explore this hypothesis I needed data. Luck for me, there is an entire database full of heavy weaponry purchasing and selling. The Stockholm International Peace Research Institute monitors major weapons acquisitions [1]. Using this database I could trace who the major players are and where arms are moving.

After a little clean up I was able to make the plot at the top of the post. In that plot are the major trades ( that were recorded) starting in 1975, however the bulk of the trades were from the 2000’s onward. There are a few different symbols flying around there. The picture below has example of all the icons. All icons were found on the link below [2].

arms symbols

Starting from the top left we have:  Ships, Missiles, Radar Tech, Armored Vehicles, Air Defense, Hand Held Rockets, Aircraft, Military Tech, Engines, and Naval weaponry.  As you can see in the map above, lots of arms are bought and sold by the world.

Some of the more interesting points are where the arms are going and where they are coming from. USA is a big exporter and importer of arms. As expected a lot of arms flow into the Middle East. Hardly any heavy weaponry flows toward South America or, surprisingly, Africa (I guess I’ve seen Lord of War too many times).  A good amount of arms are also making their way toward South East Asia and not surprisingly, South Korea.

It would be interesting to further explore this data to see if the next conflict arises near where many of the arms are flowing toward. Or even if past arms data coincided with the Iraq/Afghanistan war.

The map above was created in D3, and, as we know, I am a very new javascript programmer so I relied heavily on the tutorial found here [3]. This post made it easier to get a map up and running and to make the animations and plotting smooth.

– Marcello

[1] http://www.sipri.org/databases/armstransfers/armstransfers

[2]http://www.freepik.com/free-icon/

[3]http://www.tnoda.com/blog/2014-04-02

Network of Mediciation Side Effects

I recently stumbled upon a database[1] of prescription and generic medicine that contains all of the side effects listed on thier labels. As we all know from all of those prescription medication commercials (looking at you cialis) the side effects take up about half the commercial. I wondered if certain side effects always showed up together. Kinda how cough and cold are always packaged together. I downloaded and scrubbed the database. From there I broke it up into two groups, the map above and the map below.

The network above has all of the most LIKELY side effects from the medication. This was defined as occurring more than 60% of the time in people who took the medication.  This narrowed the 200+ side effects to under 100. I with my very rudimentary medical training grouped these effects into certain categories (bones, blood based, mental, etc). The stroke width of the bonds between two side effects are determined by how many times they both show up together on a side effects list. I created the force graph in d3 with help from two great sources [2][3]. You can manipulate this web and if you double click a point it highlights its neighbors that it is usually paired with.

The network below is the top 50 most COMMON side effects. These side effects appeared most on the labels of all the prescription meds. Because these side effects were so frequent they were connected to everything and produced a rather boring glob of points (as you can see below now). I further restricted the bonds by only keeping links that appeared over 200 times. This produced a (slightly) less intricate web. You can move the slider to break and form bonds, weaker bonds break first. This network also allows for double clicking.

Pretty cool stuff. This might be useful for prediction as certain side effects are always linked together. Future steps might be a more rigorous grouping rather than my less-than informed medical opinion.

All the visualization credit goes to the bottom two sources. All the above is based of the work of the two below. They helped me immensely as I am a novice in javascript. Also a quick shoutout to the [4] source as it was a complete pain to get d3 working with wordpress.

-Marcello

[1]http://sideeffects.embl.de/

[2]https://bl.ocks.org/mbostock/4062045

[3] http://www.coppelia.io/2014/07/an-a-to-z-of-extra-features-for-the-d3-force-layout/

[4]https://www.datamaplab.com/posts/embedding-javascript-visualization-wordpress/