Skip to content

Commit

Permalink
update website
Browse files Browse the repository at this point in the history
  • Loading branch information
jokergoo committed Feb 27, 2024
1 parent ef19dbf commit d436377
Show file tree
Hide file tree
Showing 272 changed files with 10,987 additions and 6,355 deletions.
12 changes: 12 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,15 @@ revdep/
^docs$
^pkgdown$
build_pkg_site.R

vignettes/annotate.Rmd
vignettes/examples.Rmd
vignettes/jquery.min.js
vignettes/jquery.sticky.js
vignettes/main.css
vignettes/qing_ming_shang_he_tu.png
vignettes/qing_ming_shang_he_tu_small.png
vignettes/special_data_type.Rmd
vignettes/spiralize_git_commit.Rmd
vignettes/spiralize_intro.Rmd
vignettes/tree_of_life.Rmd
14 changes: 9 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Package: spiralize
Type: Package
Title: Visualize Data on Spirals
Version: 1.0.8
Date: 2023-12-02
Version: 1.0.9
Date: 2024-02-26
Authors@R: person("Zuguang", "Gu", email = "[email protected]", role = c("aut", "cre"),
comment = c('ORCID'="0000-0002-7395-8709"))
Depends: R (>= 3.6.0), grid
Depends: R (>= 4.0.0), grid
Imports: GlobalOptions (>= 0.1.1),
GetoptLong (>= 0.1.8),
circlize,
Expand All @@ -28,10 +28,14 @@ Suggests: ComplexHeatmap,
dendextend,
bezier,
magick
Description: It visualizes data along an Archimedean spiral <https://en.wikipedia.org/wiki/Archimedean_spiral>, makes so-called spiral graph or spiral chart.
Description: It visualizes data along an Archimedean spiral <https://en.wikipedia.org/wiki/Archimedean_spiral>,
makes so-called spiral graph or spiral chart.
It has two major advantages for visualization: 1. It is able to visualize data with very long axis with high
resolution. 2. It is efficient for time series data to reveal periodic patterns.
VignetteBuilder: knitr
URL: https://github.com/jokergoo/spiralize
URL: https://github.com/jokergoo/spiralize, https://jokergoo.github.io/spiralize
License: MIT + file LICENSE
NeedsCompilation: no
RoxygenNote: 7.2.3
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
20 changes: 19 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
YEAR: 2021
YEAR: 2024
COPYRIGHT HOLDER: Zuguang Gu

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

3 changes: 2 additions & 1 deletion R/git_commits.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ spiral_git_commits = function(repo = ".", show_legend = TRUE,
start = NULL, end = Sys.Date(),
pt_range = c(2, 16), commits_range = c(2, 20),
type = c("points", "heatmap"),
colors = c("#3288BD", "#99D594", "#E6F598", "#FFFFBF", "#FEE08B", "#FC8D59", "#D53E4F")) {
colors = c("#3288BD", "#99D594", "#E6F598", "#FFFFBF",
"#FEE08B", "#FC8D59", "#D53E4F")) {

type = match.arg(type)[1]

Expand Down
2 changes: 1 addition & 1 deletion R/transform.R
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ flip_theta_back = function(theta) {
#
# == details
# The data points are assigned to the nearest inner loops. Denote the a data point has a coordinate (r, theta)
# in the polar coordinate system, r_k and r_{k+1} are the radius of the two loops at theta + 2*pi*a and theta + 2*pi*(a+1) that below and above the data point,
# in the polar coordinate system, r_k and r_(k+1) are the radius of the two loops at theta + 2*pi*a and theta + 2*pi*(a+1) that below and above the data point,
# the data point is assigned to the loop k.
#
# == value
Expand Down
21 changes: 4 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,37 +78,24 @@ Spiral plot can also visualize dendrograms with large number of leaves, thus the
- `spiral_phylo()`


## Vignettes

There are the following vignettes:

- [Visualize Data on Spirals](https://jokergoo.github.io/spiralize_vignettes/spiralize.html). It gives an detailed introduction of the _spiralize_ package.
- [Initialize Spirals by Special Data Types](https://jokergoo.github.io/spiralize_vignettes/special_data_type.html). It introduces how to specifically create spiral plot with time series data and genomic data.
- [Annotate the Plot](https://jokergoo.github.io/spiralize_vignettes/annotate.html). It introduces how to add annotations and how to add legends to the plot.
- [Real World Examples](https://jokergoo.github.io/spiralize_vignettes/examples.html). It contains many examples with real world datasets.
- [Visualize tree of life of 50455 species](https://jokergoo.github.io/spiralize_vignettes/tree_of_life.html).


## Examples

1. Difference of **ggplot2** daily downloads to the mean of the current year (2015-2021). Each loop contains 52 weeks so that same weeks in different years locate at the same angle in the polar coordinates.

![image](https://user-images.githubusercontent.com/449218/122206336-8c125400-cea1-11eb-8b0d-2314aede4641.png)
![](https://user-images.githubusercontent.com/449218/122206336-8c125400-cea1-11eb-8b0d-2314aede4641.png)

2. The same data as the first one, but horizon chart is used. Also title and legends are added.

![image](https://user-images.githubusercontent.com/449218/122206221-671de100-cea1-11eb-823e-6c48de851667.png)
![](https://user-images.githubusercontent.com/449218/122206221-671de100-cea1-11eb-823e-6c48de851667.png)


3. A phylogenetic life tree with 50645 species.

![download](https://user-images.githubusercontent.com/449218/123804978-fbe6fc80-d8ed-11eb-93d8-d3f83d552dde.png)
![](https://user-images.githubusercontent.com/449218/123804978-fbe6fc80-d8ed-11eb-93d8-d3f83d552dde.png)

4. The spiral COVID-19 Shiny app

https://jokergoooo.shinyapps.io/covid19/

![covid19_spiral](https://user-images.githubusercontent.com/449218/154753102-d66b3588-eca1-471b-bdfe-2c147ed257f5.gif)
![](https://user-images.githubusercontent.com/449218/154753102-d66b3588-eca1-471b-bdfe-2c147ed257f5.gif)


## License
Expand Down
27 changes: 27 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1 +1,28 @@
destination: docs

navbar:
title: "spiralize"
left:
- text: "Articles"
menu:
- text: Vignettes
- text: "Visualize Data on Spirals"
href: articles/spiralize_intro.html
- text: "Initialize Spirals by Special Data Types"
href: articles/special_data_type.html
- text: "Annotate the Plot"
href: articles/annotate.html
- text: "Real World Examples"
href: articles/examples.html
- text: "Visualize tree of life"
href: articles/tree_of_life.html
- text: -------
- text: More applications
- text: "Spiral visualization on git commits of a git repo"
href: articles/spiralize_git_commit.html
- text: "Reference"
href: reference/index.html

template:
includes:
after_body: "<style>nav[data-toggle='toc'] .nav .nav {display: block;}</style>"
17 changes: 16 additions & 1 deletion build_pkg_site.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
writeLines("destination: docs", "_pkgdown.yml")
if(file.exists(".Rbuildignore")) {
ln = readLines(".Rbuildignore")
if(!any(ln == "^_pkgdown\\.yml$")) {
Expand All @@ -20,5 +19,21 @@ if(file.exists(".Rbuildignore")) {
^docs$
^pkgdown$", ".Rbuildignore")
}

pkgname = read.dcf("DESCRIPTION")[1, "Package"]

vig_files = list.files(path = "vignettes", full.names = TRUE)
vig_files = vig_files[basename(vig_files) != paste0(pkgname, ".Rmd")]

ln = readLines(".Rbuildignore")

for(v in vig_files) {
if(!any(ln == v)) {
ln = c(ln, v)
}
}
writeLines(ln, ".Rbuildignore")


options(rmarkdown.html_vignette.check_title = FALSE)
pkgdown::build_site(run_dont_run = TRUE)
146 changes: 64 additions & 82 deletions docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d436377

Please sign in to comment.