gnu: Add r-chorddiag.
* gnu/packages/statistics.scm (r-chorddiag): New variable. Co-authored-by: Ricardo Wurmus <rekado@elephly.net>.
This commit is contained in:
parent
65a7a73fd5
commit
ce585ae2a3
1 changed files with 53 additions and 0 deletions
|
@ -16,6 +16,7 @@
|
||||||
;;; Copyright © 2021 Bonface Munyoki Kilyungi <me@bonfacemunyoki.com>
|
;;; Copyright © 2021 Bonface Munyoki Kilyungi <me@bonfacemunyoki.com>
|
||||||
;;; Copyright © 2021 Lars-Dominik Braun <lars@6xq.net>
|
;;; Copyright © 2021 Lars-Dominik Braun <lars@6xq.net>
|
||||||
;;; Copyright © 2021 Frank Pursel <frank.pursel@gmail.com>
|
;;; Copyright © 2021 Frank Pursel <frank.pursel@gmail.com>
|
||||||
|
;;; Copyright © 2022 Simon Tournier <zimon.toutoune@gmail.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -847,6 +848,58 @@ interactive data exploration and manipulation and optionally leverage
|
||||||
caching.")
|
caching.")
|
||||||
(license license:gpl2)))
|
(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
|
(define-public r-dichromat
|
||||||
(package
|
(package
|
||||||
(name "r-dichromat")
|
(name "r-dichromat")
|
||||||
|
|
Reference in a new issue