dhmit / democracy_africa

dhmit's spring 2020 project - Democracy and Development: Perspectives from Africa
4 stars 2 forks source link

Meta-issue for democracy gradient map #3

Open Crista2019 opened 4 years ago

Crista2019 commented 4 years ago

The purpose of the democracy gradient map is to show the evolution of democracy in Africa from the years 1981 - 2018. We want the users to understand how different countries increased or decreased in democracy score over time. We also want the users to understand what the different democracy indices mean and how they are calculated. In the final product, we want to provide an aesthetically pleasing visualization that is both informative and intuitive.

unnamed

ryaanahmed commented 4 years ago

great! re: color -- check out: https://github.com/d3/d3-scale (the full API reference) https://www.d3indepth.com/scales/ (a much nicer rundown of how this works)

The really cool thing about D3 scales is that you can specify, e.g., colors as the output range. From the d3 in depth thing linked --

var linearScale = d3.scaleLinear()
  .domain([0, 10])
  .range(['yellow', 'red']);

linearScale(0);   // returns "rgb(255, 255, 0)"
linearScale(5);   // returns "rgb(255, 128, 0)"
linearScale(10);  // returns "rgb(255, 0, 0)"
Crista2019 commented 4 years ago

Another thing to think about once the parts of the heatmap are all working would be to put the elements of the viz (map, scrollbar, dropdown) into something like a bootstrap layout.

ryaanahmed commented 4 years ago

@Mayowa99 -- you mentioned that you had code for the gradient key that didn't get merged at some point. Can you find and let me know the name of the branch, so I can revive that?