How to implement value-by-alpha map in GIS?

Here is a method for doing Alpha By Value in QGIS

http://nathanw.net/2013/06/27/alpha-by-value-choropleth/

You can use the new ramp_color and scale_linear functions and data defined symbols

regexp_replace( ramp_color('usa', scale_linear( "unemployed_by_county_xgv_Rate",0,15,0,1)),',[^,]*$',','|| toint(scale_linear("unemployed_by_county_xgv_Labor_Force",0,100000,0,255)))

enter image description here


In R you can read in the polygons and plot them on a device that supports transparency. Here I'm using the windows() device, R 2.12.0 with rgdal and sp packages.

## read some example polygons
library(rgdal)
dsn <- system.file("vectors/ps_cant_31.MIF", package = "rgdal")[1]
ps_cant_31 <- readOGR(dsn=dsn, layer="ps_cant_31")

## scale population values 

ps_cant_31$sclpop <- sqrt((ps_cant_31$POP - min(ps_cant_31$POP))/ diff(range(ps_cant_31$POP)))

## randomly assign 0 or 1
ps_cant_31$rand <- sample(0:1, length(ps_cant_31$POP), replace = TRUE)

## plot red or blue, scaled by population
plot(ps_cant_31,  col = ifelse(ps_cant_31$rand == 0, rgb(0, 0, 1, ps_cant_31$sclpop), rgb(1, 0, 0, ps_cant_31$sclpop)))

alt text


I'd suggest you check out the Geo Vista site and their software. The Visual Inquiry Toolkit, provides a GUI program to implement the bi-variate chloropleth maps (I know one poster on here works at that project and may be able to point to other resources).

I think the cartogrammer blog post is sufficient to explain the technique, but here is a pretty cool article (open to the public) to see its use in practice.

Geovisual analytics to enhance spatial scan statistic interpretation: an analysis of U.S. cervical cancer mortality Jin Chen , Robert E Roth , Adam T Naito , Eugene J Lengerich and Alan M MacEachren International Journal of Health Geographics 2008, 7:57

I hope to see some code examples for Python and R too! Basically any program that can implement a two-scale color scheme (or bivariate) can create a value by alpha map. Although all of the implementations I have seen listed so far are for choropleth maps, there is no reason you couldn't implement this for a raster or point based map as well.


I've recently written a blog post about how to implement them in ArcGIS, Making value by alpha maps with ArcMap. It basically entails making separate layers for a given transparency, and then utilizing the vector editing tools available within ArcMap to produce the necessary bivariate legend (or using a fake inset map to replicate the legend if you want to produce a black background VBA map).

enter image description here

enter image description here