Giter Club home page Giter Club logo

multilevel-venn's Introduction

multilevel-venn

Rectangular Venn Diagrams for Visually Comparing Across and Within Cases Simultaneously

Sometimes we are interested in analyzing simultaneously differences between and within cases. For example, perhaps we want to compare the proportion of people who are (a) living alone, (b) single, and (c) feeling lonely within a given society. We are interested in all the possible overlaps between these and how much of the sample resides in each of the 8 possible subgroups (a, b, c, ab, bc, ca, abc, or none of these overlaps). This is easy enough with a scaled Venn Diagramme. However, what if we want to at the same time compare this information across countries? Enter the multi-level Venn diagramme. Using scaled regular Venns we can look at within- and between country proportions at the same time, thus allowing us to spot patterns we might not otherwise see.

To run a random demonstration:

Simply source the 'supervenn v5.R' file within RStudio. You will get some output of the rectangle coordinates as well as their closely approximated visualizations.The state accuracy corresponds to how close the visualization corresponds to the actual proportions in the data. You can increase the accuracy (at the cost of increasing run-times by changing the 'perm' value (permutations) on line 15 of the code to 4 or 5.

To run your own data on this:

I have not adapted this yet, but you would want to take a look at the structure of the dt datatable on line 46 of the 'fake data generation portion'. Make your data match this structure, change the labels for your categories with 'mylabel' (line 8) and the overall graphic label on line 319, and you should be good to go. Note that this is not built to handle more than 3 overlapping categories.

multilevel-venn's People

Contributors

christopherswader avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.