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.
The R code creates the following output:
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:
The .csv contains data from:
- Mobile cellular subscriptions (per 100 people): World Bank Development Indicators.
- Internet users (per 100 people): World Bank Development Indicators
- Secure Internet servers (per 1 million people) World Bank Development Indicators
- Freedom on the Net: Freedom House
- Freedom House Freedom Score: Freedom House
- Open Data (OKFN Rank): Open Knowledge Foundation
- Ushahidi Deployments: National level: Ushahidi, internal list
- USAID Urban Policy (priority level): USAID
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.
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