Superimpose variables within a single pie chart [closed]
I'm trying to create a pie chart superimposing multiple variables using r-plotly.
For instance, I have values for the global population of a country, it's economically active population, and the economically active male/female.
I want to get all those data inside a single pie chart, with the full cercle as the golbal population, a part of this cercle representing the active population, which is divided itslef in 2 parts, male/female.
I unfortunnatly have no idea how to archieve it and I don't even know is it's possible.
I didn't manage to do it using the function :
plot_ly(...)
Thank you for your help and happy new year !
r plotly r-plotly
closed as too broad by Rui Barradas, Roman Luštrik, MLavoie, greg-449, Mickael Maison Jan 2 at 11:30
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
I'm trying to create a pie chart superimposing multiple variables using r-plotly.
For instance, I have values for the global population of a country, it's economically active population, and the economically active male/female.
I want to get all those data inside a single pie chart, with the full cercle as the golbal population, a part of this cercle representing the active population, which is divided itslef in 2 parts, male/female.
I unfortunnatly have no idea how to archieve it and I don't even know is it's possible.
I didn't manage to do it using the function :
plot_ly(...)
Thank you for your help and happy new year !
r plotly r-plotly
closed as too broad by Rui Barradas, Roman Luštrik, MLavoie, greg-449, Mickael Maison Jan 2 at 11:30
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
I'm trying to create a pie chart superimposing multiple variables using r-plotly.
For instance, I have values for the global population of a country, it's economically active population, and the economically active male/female.
I want to get all those data inside a single pie chart, with the full cercle as the golbal population, a part of this cercle representing the active population, which is divided itslef in 2 parts, male/female.
I unfortunnatly have no idea how to archieve it and I don't even know is it's possible.
I didn't manage to do it using the function :
plot_ly(...)
Thank you for your help and happy new year !
r plotly r-plotly
I'm trying to create a pie chart superimposing multiple variables using r-plotly.
For instance, I have values for the global population of a country, it's economically active population, and the economically active male/female.
I want to get all those data inside a single pie chart, with the full cercle as the golbal population, a part of this cercle representing the active population, which is divided itslef in 2 parts, male/female.
I unfortunnatly have no idea how to archieve it and I don't even know is it's possible.
I didn't manage to do it using the function :
plot_ly(...)
Thank you for your help and happy new year !
r plotly r-plotly
r plotly r-plotly
asked Jan 2 at 9:01


César R.César R.
164
164
closed as too broad by Rui Barradas, Roman Luštrik, MLavoie, greg-449, Mickael Maison Jan 2 at 11:30
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
closed as too broad by Rui Barradas, Roman Luštrik, MLavoie, greg-449, Mickael Maison Jan 2 at 11:30
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
I think a "sunburst" plot could be what you are looking for.
Here is an example on a fake dataset:
library(sunburstR)
dat <- data.frame(G = c("male-active", "male-inactive", "female-active", "female-inactive"),
N = c(100, 100, 100, 100))
sunburst(dat)
Thank you for your answer ! Indeed this kind of chart wouldbe nice. I'll check the package documentation for more information. It's for a shiny application, i know plotly is nice for those applications but this one seems to be interactive also.
– César R.
Jan 2 at 9:48
1
It's interactive and there is a special function to render a shiny version of this kind of plots.
– Vincent Guillemot
Jan 2 at 11:58
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I think a "sunburst" plot could be what you are looking for.
Here is an example on a fake dataset:
library(sunburstR)
dat <- data.frame(G = c("male-active", "male-inactive", "female-active", "female-inactive"),
N = c(100, 100, 100, 100))
sunburst(dat)
Thank you for your answer ! Indeed this kind of chart wouldbe nice. I'll check the package documentation for more information. It's for a shiny application, i know plotly is nice for those applications but this one seems to be interactive also.
– César R.
Jan 2 at 9:48
1
It's interactive and there is a special function to render a shiny version of this kind of plots.
– Vincent Guillemot
Jan 2 at 11:58
add a comment |
I think a "sunburst" plot could be what you are looking for.
Here is an example on a fake dataset:
library(sunburstR)
dat <- data.frame(G = c("male-active", "male-inactive", "female-active", "female-inactive"),
N = c(100, 100, 100, 100))
sunburst(dat)
Thank you for your answer ! Indeed this kind of chart wouldbe nice. I'll check the package documentation for more information. It's for a shiny application, i know plotly is nice for those applications but this one seems to be interactive also.
– César R.
Jan 2 at 9:48
1
It's interactive and there is a special function to render a shiny version of this kind of plots.
– Vincent Guillemot
Jan 2 at 11:58
add a comment |
I think a "sunburst" plot could be what you are looking for.
Here is an example on a fake dataset:
library(sunburstR)
dat <- data.frame(G = c("male-active", "male-inactive", "female-active", "female-inactive"),
N = c(100, 100, 100, 100))
sunburst(dat)
I think a "sunburst" plot could be what you are looking for.
Here is an example on a fake dataset:
library(sunburstR)
dat <- data.frame(G = c("male-active", "male-inactive", "female-active", "female-inactive"),
N = c(100, 100, 100, 100))
sunburst(dat)
answered Jan 2 at 9:26
Vincent GuillemotVincent Guillemot
2,224715
2,224715
Thank you for your answer ! Indeed this kind of chart wouldbe nice. I'll check the package documentation for more information. It's for a shiny application, i know plotly is nice for those applications but this one seems to be interactive also.
– César R.
Jan 2 at 9:48
1
It's interactive and there is a special function to render a shiny version of this kind of plots.
– Vincent Guillemot
Jan 2 at 11:58
add a comment |
Thank you for your answer ! Indeed this kind of chart wouldbe nice. I'll check the package documentation for more information. It's for a shiny application, i know plotly is nice for those applications but this one seems to be interactive also.
– César R.
Jan 2 at 9:48
1
It's interactive and there is a special function to render a shiny version of this kind of plots.
– Vincent Guillemot
Jan 2 at 11:58
Thank you for your answer ! Indeed this kind of chart wouldbe nice. I'll check the package documentation for more information. It's for a shiny application, i know plotly is nice for those applications but this one seems to be interactive also.
– César R.
Jan 2 at 9:48
Thank you for your answer ! Indeed this kind of chart wouldbe nice. I'll check the package documentation for more information. It's for a shiny application, i know plotly is nice for those applications but this one seems to be interactive also.
– César R.
Jan 2 at 9:48
1
1
It's interactive and there is a special function to render a shiny version of this kind of plots.
– Vincent Guillemot
Jan 2 at 11:58
It's interactive and there is a special function to render a shiny version of this kind of plots.
– Vincent Guillemot
Jan 2 at 11:58
add a comment |