Chapter 6 Interactive component

6.2 Descriptions

This is the interactive part of our conflict anaylsis. We store the data in the github repo, the cleaned up that file and get df_d3.csv using R (as mentioned in the previous chapters).

The D3 code is also uploaded to blockbuilder.org; which is also on our project’s GitHub Repo.

The total numbers of deaths every year and every country are calculated using D3.

Instructions for using the plot:

  1. The plot may take a few seconds to initialize. The plot is initialized with a mapping of conflicts in the year of 2018 with no default country specified on the “earth”. Each dot on the map represents a conflict event with at least one death.
  2. Users can choose the country of their interests by choosing from the select bar on the top left. After selection, then on the top right part, there will be a text displaying the country name, the year, and the total death that year. If the country has at least one conflict event (the event may have 0 death) during 1989 - 2018, there will be a bar chart showing up in the bottom.
  3. Users can drag the “earth” if they want, if they hover the mouse over the land, the country name will be displayed.
  4. Users can select the year of interest on the top left part of the plot. If a different year is chosen, the circles will be redrawn, so please be patient.
  5. The total number of death is calculated using the “best” column in the dataset, which means the best estimate of the number of death.
  6. The dataset does not contain data from Syria. Therefore, conflict data in Syria is currently unavailable.
A short demo of the interactive plot:

Reference:

  1. D3 in Depth: Geographic (https://www.d3indepth.com/geographic/).
  2. World Map with D3 and TopoJSON (https://bl.ocks.org/piwodlaiwo/3734a1357696dcff203a94012646e932).
  3. GeoJSON Maps of the globe (https://geojson-maps.ash.ms/).
  4. Johan’s github project:world.geo.json (https://github.com/johan/world.geo.json).
  5. A method for hiding points in geo projection (https://stackoverflow.com/questions/22366749/how-can-i-determine-if-a-point-is-hidden-on-a-projection).