New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
colors in the aggregate #18
Comments
Perhaps, the answer lies in the |
What happens, is that the range of values of the lowest nodes, i.e. the rectangles that will be coloured, is assigned to the color palette. So for the The savest way is indeed to use the range:
|
Ok, thanks for clearing this up. It appears All this is important to me as I try to make |
Exactly. Originally, I only had two treemap types, It's not hard to generalize the aggregation function (with sum as default). However, for aggregation of averages or ratios, we probably need a weighted average, since we cannot simply average, say, the percentages of smokers per country to continents. For this, we need population numbers per country as weights. Is this reasoning what you had in mind, or do you have other kind of aggregates in mind? |
You understand correctly and yes |
Now there is an argument If you have a useful typical dataset that contains averages, we could include it in the package. |
beautiful, thanks so much for the very quick response! I'lll play with it throughout the day and report back. So far it looks great. |
@ignacio82 says this solved his problem. I played with it more today with Thanks again! |
Happy to close this. Thanks again for such a quick response! |
I'm sure this is my own ignorance, but it appears that colors in the aggregate work differently than I would expect. For instance, if we use only do one level using
GNI2010
.gives me
and
while setting
index = c("continent","iso3")
gets me different colors.gives me
and a ugly plot to show the colors
Naively, I would expect the colors assigned to the aggreage
continent
to be the same. This is important when trying to match the colors assigned bytreemap
in #17.The text was updated successfully, but these errors were encountered: