animated_bar_charts_in_R icon indicating copy to clipboard operation
animated_bar_charts_in_R copied to clipboard

Awesome piece! Shall we make it a package as it is quite general application now.

Open hope-data-science opened this issue 6 years ago • 9 comments
trafficstars

I think these codes are awesome, and animated bar plot are frequently used by folks in the community. Ever consider to make a package out of it?

hope-data-science avatar Sep 05 '19 06:09 hope-data-science

Thnk you @hope-data-science . I was planning to make a shiny app for anyone to upload a csv and make an animated gif. But package, I didn't think of. Any reason why you asked so?

amrrs avatar Sep 05 '19 06:09 amrrs

I've seen the Flouish(https://app.flourish.studio/@flourish/bar-chart-race) has it already. I think there might be more user-defined functions for specifications. A simple demo plus specifications will make it a great piece for R community. Currently there are too many parameters to start with, which makes me hard to follow at the first place, and hard to apply to other data.

hope-data-science avatar Sep 05 '19 06:09 hope-data-science

I get it. Yes, Flourish is a nice place for good-looking bar race and there re couple of existing notebooks on observablehq too. did you get to see the article written on it?

amrrs avatar Sep 05 '19 06:09 amrrs

In a Chinese blog only, any clues for a comprehensive description or even a literature on it? If not, could possibly try to write one ourselves.

hope-data-science avatar Sep 05 '19 06:09 hope-data-science

@hope-data-science Is it this one? https://towardsdatascience.com/create-animated-bar-charts-using-r-31d09e5841da

amrrs avatar Sep 05 '19 06:09 amrrs

This is where leads me to find you here, a great repeatable case. I think if I have a table with only time and value, this plot could be made already, so I would like to write a general function out of it, and add specific parameters afterward. Any ideas?

hope-data-science avatar Sep 05 '19 06:09 hope-data-science

that's quite easy i think, you can take the same function and then use aes_string() in ggplot instead of aes() and then wrap the entire thing as a function with arguments (x-axis and y-axis). Is it very urgent? otherwise, I can try this weekend

amrrs avatar Sep 05 '19 06:09 amrrs

Great! It's not urgent, but we might try to make the wrapper more tidy and elegant to use. Thanks so much for contributing.

hope-data-science avatar Sep 05 '19 06:09 hope-data-science

For your reference:[https://github.com/stevejburr/Bar-Chart-Race/blob/master/Final.R],but this visualization has some small problems I think.

hope-data-science avatar Sep 05 '19 06:09 hope-data-science