trulia / choroplethr

choroplethr simplifies the creation of choropleths (thematic maps) in R
Other
141 stars 53 forks source link

Handling NA's visually #11

Closed pssguy closed 10 years ago

pssguy commented 10 years ago

I have found that there are often instances of tens if not hundreds of NA's occurring with county data. It seems to me that they are either shown as white or the faintest color and thus may get confused with low numbers. It would be helpful if they were highlighted some other way

arilamstein commented 10 years ago

FYI I've started looking into this. It also became a big issue with the presidential election animated choropleth (https://github.com/trulia/choroplethr/wiki/Animated-Choropleths), where not all states existed during all elections.

The various scale functions (e.g. scale_fill_manual) seem to have a na.value parameter: http://docs.ggplot2.org/0.9.3.1/scale_manual.html. It's not clear what it defaults to, but I can probably set it to black, and perhaps provide an override mechanism so users can set it however they want.

arilamstein commented 10 years ago

Fixed: https://github.com/trulia/choroplethr/commit/b704d79115580e93b1a6d8f023b5b9eef59b599f

In addition to the checkin, I submitted this version to cran and it was just accepted. But it will likely take several days before you can get it from cran due to their build and mirroring system, and the fact that the volunteer who maintains the mac binaries has been swamped recently.