diff options
author | zimoun <zimon.toutoune@gmail.com> | 2022-01-18 18:54:13 +0100 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2022-01-21 15:53:17 +0100 |
commit | ce585ae2a3a26683746adecf0d0f8f6952e8ecfe (patch) | |
tree | 94db2110db9fcff7aa848e30cd153eeb30c3457e /gnu/packages | |
parent | 65a7a73fd5a00c62122bcb6e3578b2fdf0ffa98e (diff) | |
download | guix-ce585ae2a3a26683746adecf0d0f8f6952e8ecfe.tar guix-ce585ae2a3a26683746adecf0d0f8f6952e8ecfe.tar.gz |
gnu: Add r-chorddiag.
* gnu/packages/statistics.scm (r-chorddiag): New variable.
Co-authored-by: Ricardo Wurmus <rekado@elephly.net>.
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/statistics.scm | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm index 97c055ff75..5a1484639a 100644 --- a/gnu/packages/statistics.scm +++ b/gnu/packages/statistics.scm @@ -16,6 +16,7 @@ ;;; Copyright © 2021 Bonface Munyoki Kilyungi <me@bonfacemunyoki.com> ;;; Copyright © 2021 Lars-Dominik Braun <lars@6xq.net> ;;; Copyright © 2021 Frank Pursel <frank.pursel@gmail.com> +;;; Copyright © 2022 Simon Tournier <zimon.toutoune@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -847,6 +848,58 @@ interactive data exploration and manipulation and optionally leverage caching.") (license license:gpl2))) +(define-public r-chorddiag + (package + (name "r-chorddiag") + (version "0.1.3") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/mattflor/chorddiag") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1bpy9q861l1hyyiqbx2f7qzp7j7im8bkcfdwgxzk5fm0250p359a")) + ;; Delete minified JavaScript file + (snippet + '(delete-file "inst/htmlwidgets/lib/d3/d3.min.js")))) + (build-system r-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'process-javascript + (lambda* (#:key inputs #:allow-other-keys) + (with-directory-excursion "inst/htmlwidgets/lib/d3" + (let ((source (assoc-ref inputs "d3.v4.js")) + (target "d3.min.js")) + (format #true "Processing ~a --> ~a~%" + source target) + (invoke "esbuild" source "--minify" + (string-append "--outfile=" target))))))))) + (propagated-inputs + (list r-htmlwidgets r-rcolorbrewer)) + (native-inputs + `(("esbuild" ,esbuild) + ("r-knitr" ,r-knitr) + ("d3.v4.js" + ,(origin + (method url-fetch) + (uri "https://d3js.org/d3.v4.js") + (sha256 + (base32 + "0y7byf6kcinfz9ac59jxc4v6kppdazmnyqfav0dm4h550fzfqqlg")))))) + (home-page "https://github.com/mattflor/chorddiag") + (synopsis "Create D3 chord diagram") + (description + "This package provides tools to create interactive chords diagrams via +the D3 Javascript library. Chord diagrams show directed relationships among a +group of entities. This package is based on +@url{http://bl.ocks.org/mbostock/4062006} with some modifications (fading) and +additions (tooltips, bipartite diagram type).") + (license license:gpl3+))) + (define-public r-dichromat (package (name "r-dichromat") |