Skip to content

R heatmap visualization for RNI city selection

Notifications You must be signed in to change notification settings

RRLash/RNI_select

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RNI_select

This is my very first R code: a heatmap visualization for RNI city selection. Lacking specific, city-level data, I turned to national level data (sources below) to give me a feel for what these indicators might look like in the cities that are currently on the Rockefeller short-list. The goal for creating this repo is to:

  • Start playing with R.
  • Learn the Github workflow for better Pirate/Ninja collaboration in the future.
  • Look cool.

The R code was taken from the Flowing Data tutorial and I used auremoser's Pirateplotr repo as a template to set up a sensible (I hope) repo of my own.

Output

The R code creates the following output:

RNI_R_output.png

I did a quick bit of finishing work in Inkscape, including rotating the chart to reverse the order of observations and place them on the left. I hand-colored null values (note below) and added a few lables to get the following:

RNI_finished_graphic.png

Key / Data sources

The .csv contains data from:

Data processing notes:

I used inverse transformation to standardize higher numbers as "more" or "better" across all data sets. The three data sets that required the transformation were Freedom on the Net, Freedom House, and OKFN. For USAID, I simply reversed the range of values since the scale was 0-4.

Note regarding null values

I had a few null values in the matrix that I simply converted to 0 since I wasn't sure how to make R ignore certain cells or values. When I created the final graphic I manually changed the color of these cells in Inkscape. The list of countries: variables with null values is:

  • Colombia: Freedom on net, OKFN
  • Denmark: Freedom on the net
  • Israel: freedom on the net
  • Lebanon: OKFN
  • Myanmar: OKFN
  • Netherlands: Freedom on the net
  • New Zealand: Freedom on the net
  • Senegal: Freedom on the net
  • Thailand: OKFN
  • Vietnam: OKFN
  • WB/G: Freedom on net, OKFN

About

R heatmap visualization for RNI city selection

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published