Skip to main content

Hi there,

 

I have a dataset of about 40,000 names with ages from 97 to 25. When you put count([Age]) on rows and Age on columns, you see a viz of the ages in a nice normal-distribution shape. There is one 97-year-old and one 25-year-old out on the tails and about 1,600 56-year-olds in the center.

 

What I'm trying to do is animate the building of the distribution from oldest to youngest, left to right, coloring the bars by generation. So, say I define millennials as 25 to 32 and GenX as 33 to 40 - those groupings of ages would be different colors.

 

Later, I would like to assign colors to individual data points. So, say 200 of those 1,600 56-year-olds are women. I would want to assign a new color just to the women.

 

I'm perfectly capable of writing formulas to assign colors to data points. The problem is how to animate it.

 

When you do an animation, I choose:

 

Marks to show history for: All

Length: All

Show: Marks (this is usually greyed out, but when it isn't, I choose it)

 

I believe that these selections should yield a cumulative animation, one that retains the previous data points as the new ones appear. But the age bars still appear one at a time, with the previous bars disappearing as new ones are shown.

 

Also, the "show marks" selection is greyed out, so I can't make a choice here. I've tried fooling around changing the variables to measure, dimension, continuous, and discrete, and I think it has something to do with this, but I'm unclear on the relationship.

 

Finally, the colors: I can write a formula and assign colors in the marks area, which would work fine for a static viz. But it seems that the only way to assign a color (singular) in an animation is to do it for all data points, over in the animation controls are on the right.

 

Sorry for writing this huge essay, and if you've gotten this far, thank you and congratulations. I've attached a twbx file. The data is the same as the data I'm working with, but I've removed everything except first name and age.

 

If anyone can offer suggestions, I would greatly appreciate it. I noticed a similar question from three years ago answered by Ken Ferlange, who I follow closely. Thanks for all your help in the community, Ken!

 

Dan

2 answers
  1. Feb 19, 2022, 4:54 PM

    Hi Dan,

     

    To 'animate' the viz you don't need to turn

    the Workbook --> Animations --> On.

    The Pages' Show history would be enough.

     

    Yours,

    Yuri

0/9000