Create heatmap with distribution of attribute values in R (not density heatmap)
问题 Some of you might have seen Beyond "Soda, Pop, or Coke". I am facing a similar problem and would like to create a plot like that. In my case, I have a very large number of geo-coded observations (over 1 million) and a binary attribute x . I would like to show the distribution of x on a map with a color scale ranging from 0 to 1 for p(x=1). I am open to other approaches but Katz's approach for Beyond "Soda, Pop, or Coke" is described here and uses these packages: fields, maps, mapproj, plyr,