Skip to content

Commit ce1cc32

Browse files
authored
Merge pull request #101 from animint/84-move-gallery-from-blocks-to-gh-pages
created animint2pages()
2 parents 3b8dc69 + fb8f297 commit ce1cc32

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1358
-1813
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
readme_website.md
12
.github
23
^.*\.Rproj$
34
^\.Rproj\.user$

.github/workflows/tests.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
test-suite: [ renderer1,renderer2,renderer3,renderer4,renderer5,compiler,CRAN]
16-
17-
# services:
18-
# selenium:
19-
# image: selenium/standalone-firefox-debug:2.53.0
20-
# ports:
21-
# - 5900:5900
22-
# - 4444:4444
2316

2417
name: Test Suite ${{ matrix.test-suite }}
2518
env:
@@ -41,6 +34,12 @@ jobs:
4134

4235
- name: install package
4336
run: R CMD INSTALL .
37+
38+
- name: git config user.name
39+
run: git config --global user.name "GitHub Actions"
40+
41+
- name: git config user.email
42+
run: git config --global user.email [email protected]
4443

4544
- name: run tests
4645
run: if [ "$TEST_SUITE" == "CRAN" ];then bash build.sh;else Rscript -e "source('tests/testthat.R', chdir = TRUE)";fi

DESCRIPTION

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: animint2
22
Title: Animated Interactive Grammar of Graphics
3-
Version: 2023.6.11
3+
Version: 2023.11.15
44
URL: https://animint.github.io/animint2/
55
BugReports: https://github.com/animint/animint2/issues
66
Authors@R: c(
@@ -76,6 +76,7 @@ Imports:
7676
methods
7777
Suggests:
7878
servr,
79+
gert, gitcreds, gh,
7980
sp,
8081
gistr (>= 0.2),
8182
shiny,
@@ -269,12 +270,13 @@ Collate:
269270
'z_animintHelpers.R'
270271
'z_facets.R'
271272
'z_geoms.R'
272-
'z_gist.R'
273273
'z_helperFunctions.R'
274274
'z_knitr.R'
275+
'z_pages.R'
275276
'z_print.R'
276277
'z_scales.R'
277278
'z_theme_animint.R'
278279
'z_transformShape.R'
279280
RoxygenNote: 7.2.3
280281
Config/Needs/website: tidyverse/tidytemplate
282+
VignetteBuilder: knitr

NAMESPACE

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ export(aes_string)
214214
export(alpha)
215215
export(animint)
216216
export(animint2dir)
217-
export(animint2gist)
217+
export(animint2pages)
218218
export(animintOutput)
219219
export(annotate)
220220
export(annotation_custom)
@@ -489,6 +489,7 @@ export(theme_void)
489489
export(toRGB)
490490
export(transform_position)
491491
export(unit)
492+
export(update_gallery)
492493
export(update_geom_defaults)
493494
export(update_labels)
494495
export(update_stat_defaults)

NEWS.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
# Changes in 2023.11.15
2+
3+
- New function `animint2pages(viz,"new_github_repo")` for
4+
publishing/sharing animints, replacement for animint2gist, which
5+
stopped working recently.
6+
- New option `animint(source="http://path.to/source.R")` which should
7+
be the URL of data viz source code, used to display a link below the
8+
rendered viz.
9+
- New function `update_gallery("path/to/gallery_repo")` for updating
10+
galleries such as https://animint.github.io/gallery/
11+
- Bugfix: geom_text renders color as svg fill style (was rendering as
12+
stroke style, a regression introduced by the initial implementation
13+
of `fill_off`).
14+
- re-organization of animint.js in order to reduce duplication /
15+
emphasize similarities and differences between geoms.
16+
- geom rect and tile now default to color="black" instead of
17+
transparent, for consistency with other geoms (and for the case of
18+
using clickSelects, which defaults to black color for selected, and
19+
transparent for not). To get the old behavior, specify
20+
color="transparent" (for non-clickSelects).
21+
122
# Changes in 2023.10.6
223

324
- User-configurable selection style - fill_off.

R/data.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@
164164
#' All built-in \code{\link{colors}()} translated into Luv colour space.
165165
#'
166166
#' @format A data frame with 657 observations and 4 variables:
167-
#' \itemize{
167+
#' \describe{
168168
#' \item{L,u,v}{Position in Luv colour space}
169169
#' \item{col}{Colour name}
170170
#' }
@@ -176,7 +176,7 @@
176176
#' real estate center, \url{https://www.recenter.tamu.edu/}.
177177
#'
178178
#' @format A data frame with 8602 observations and 9 variables:
179-
#' \itemize{
179+
#' \describe{
180180
#' \item{city}{Name of MLS area}
181181
#' \item{year,month,date}{Date}
182182
#' \item{sales}{Number of sales}

R/geom-.r

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,6 @@ Geom <- gganimintproto("Geom",
305305
processed_values <- l$geom$pre_process(g, g.data, ranges)
306306
g <- processed_values$g
307307
g.data <- processed_values$g.data
308-
309308
## Check g.data for color/fill - convert to hexadecimal so JS can parse correctly.
310309
for(color.var in c("colour", "color", "fill", "colour_off", "color_off", "fill_off")){
311310
if(color.var %in% names(g.data)){

R/geom-histogram.r

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,6 @@
6565
#' # Use origin = 0, to make sure we don't take sqrt of negative values
6666
#' m + geom_histogram(origin = 0) + coord_trans(x = "sqrt")
6767
#'
68-
#' # You can also transform the y axis. Remember that the base of the bars
69-
#' # has value 0, so log transformations are not appropriate
70-
#' m <- ggplot(movies, aes(x = rating))
71-
#' m + geom_histogram(binwidth = 0.5) + scale_y_sqrt()
7268
#' }
7369
#' rm(movies)
7470
geom_histogram <- function(mapping = NULL, data = NULL,

R/geom-tile.r

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ GeomTile <- gganimintproto("GeomTile", GeomRect,
9595
)
9696
},
9797

98-
default_aes = aes(fill = "grey20", colour = NA, size = 0.1, linetype = 1,
98+
default_aes = aes(fill = "grey20", colour = "black", size = 0.1, linetype = 1,
9999
alpha = NA),
100100

101101
required_aes = c("x", "y"),
@@ -104,9 +104,6 @@ GeomTile <- gganimintproto("GeomTile", GeomRect,
104104

105105
pre_process = function(g, g.data, ...) {
106106
g$geom <- "rect"
107-
if(is.null(g$params$colour)){
108-
g$params$colour <- "transparent"
109-
}
110107
return(list(g = g, g.data = g.data))
111108
}
112109
)

R/plot-build.r

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ layer_grob <- function(plot, i = 1L) {
132132
#' a ggplot2 plot.
133133
#' @return a \code{\link{gtable}} object
134134
#' @keywords internal
135-
#' @param plot plot object
136135
#' @param data plot data generated by \code{\link{ggplot_build}}
137136
#' @export
138137
ggplot_gtable <- function(data) {

0 commit comments

Comments
 (0)