ramnathv / rMaps

Interactive Maps from R
http://rmaps.github.io
389 stars 194 forks source link

some weaknesses in the ichoropleth function #37

Open timelyportfolio opened 10 years ago

timelyportfolio commented 10 years ago

The ichoropleth function is beautiful, but as I worked on recreating this USDA map in this Gist I found a couple issues. Some might be unique to the particular dataset, but handling these might make the function more robust:

Thanks again @ramnathv for this. Map making is so easy now it is unbelievable.

bhtucker commented 10 years ago

I got on the issues to report the need to fail on numeric keys due to CSS selector requirements. My solution was similarly to regex prepend a Z, as I was dealing with zipcodes.

Another quantile issue is what to do to display distinct datasets, with totally different domains. I had ratio and absolute data sliced into a common set of quantiles, the middle of which was (0.194,323]. Perhaps another option for multiple fills and legends that swap with the data. I'm not sure at what point this becomes a datamaps question.

Some +1s:

+1 to setting data = newData[firstkey]; I don't know rCharts' opts, but the proposed solution sounds reasonable

+1 to #29 , and +1 that "a custom config.yml ... is not a good universal solution"

This project is very exciting! Hope to see an ichoropleth to rule them all!

ramnathv commented 10 years ago

I agree with all the suggestions made here. I will get back to the drawing board on ichoropleth to refactor it so that it can handle all the issues raised. Thanks again @timelyportfolio and @bhtucker for bringing these up. Nothing better than having a detailed to-do list to write focused code :smiley: