Coder Social home page Coder Social logo

eulerr's Introduction

eulerr

Travis-CI Build Status AppVeyor Build Status codecov CRAN_Status_Badge

eulerr generates area-proportional euler diagrams that display set relationships (intersections, unions, and disjoints) with circles. Euler diagrams are Venn diagrams without the requirement that all set interactions be present (whether they are empty or not). That is, depending on input, eulerr will sometimes produce Venn diagrams but sometimes not.

With three or more sets intersecting, exact euler diagrams are often impossible. For such cases eulerr attempts to provide the best approximation possible by numerically tuning the circles' positions and radiuses so that the sum of squared errors is minimized.

When solutions are approximate, residuals and error statistics are provided to assess whether the resulting diagram can be trusted.

Installation

The CRAN version can be installed by running

install.packages("eulerr")

The development version can be installed by running

devtools::install_github("jolars/eulerr")

Usage

library(eulerr)
sets <- c("A" = 10, "B" = 9, "C" = 4,
          "A&B" = 2, "A&C" = 3, "B&C" = 3,
          "A&B&C" = 2)
set.seed(1)
fit <- eulerr(sets)

We can inspect the solution

fit
#>       original fitted residuals region_error
#> A           10  9.999     0.001        0.000
#> B            9  8.999     0.001        0.000
#> C            4  4.013    -0.013        0.000
#> A&B          2  2.026    -0.026        0.001
#> A&C          3  2.994     0.006        0.000
#> B&C          3  2.994     0.006        0.000
#> A&B&C        2  1.975     0.025        0.001
#> 
#> diagError:  0.001 
#> stress:     0

and plot it using plot.

plot(fit)

Please see the introductory vignette for usage details.

License

eulerr is open source software, licensed under GPL-3.

Code of conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Thanks

eulerr would not be possible without Ben Fredrickson's work on venn.js or Leland Wilkinson's venneuler.

eulerr's People

Contributors

jolars avatar

Watchers

Laurent Gatto avatar James Cloos avatar  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.