Superimpose variables within a single pie chart [closed]












2















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 !










share|improve this 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.























    2















    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 !










    share|improve this 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.





















      2












      2








      2








      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 !










      share|improve this question














      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






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      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.


























          1 Answer
          1






          active

          oldest

          votes


















          1














          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)


          The result






          share|improve this answer
























          • 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


















          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          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)


          The result






          share|improve this answer
























          • 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
















          1














          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)


          The result






          share|improve this answer
























          • 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














          1












          1








          1







          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)


          The result






          share|improve this answer













          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)


          The result







          share|improve this answer












          share|improve this answer



          share|improve this answer










          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



















          • 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





          Popular posts from this blog

          MongoDB - Not Authorized To Execute Command

          How to fix TextFormField cause rebuild widget in Flutter

          Npm cannot find a required file even through it is in the searched directory