animint2 is an R package for animated and interactive data visualizations. This repository is for the animint2 gallery, which showcases examples of what animint2
can do. Additions to the gallery are encouraged.
install.packages("animint2")
in R to get the most recent version from CRAN (>= 2023.11.21). The most recent versions support the source
option for the animint()
function, which is required to publish an animint to a gallery.viz = animint(ggplots, title="data viz title", source="https://link.to/your_code.R")
object with options:
title
: Replace the example text with a string describing the data viz.source
: Replace the example URL with the URL of your data viz source code.animint2pages(viz, "new_github_repo")
to create a new GitHub repository with your viz deployed in the gh-pages branch. For more detailed instructions, see the subsection about publishing to GitHub Pages in Chapter 5 of The animint2 Manual.Capture.PNG
, and add it to the gh-pages branch of that repo.In the following instructions, replace YOUR_GITHUB_USERNAME
with your GitHub username.
gh-pages
branch. This makes a copy of the animint2 gallery and places it on your list of repositories.git clone git@github.com:YOUR_GITHUB_USERNAME/gallery ~/R/gallery
. This copies your fork from GitHub onto your local machine.YOUR_GITHUB_USERNAME/new_github_repo
on a new line in repos.txt
. The new_github_repo
should be the same name that you used when you published a data viz animint2pages
.animint2::update_gallery()
to update and push the changes to the gh-pages
branch of your fork.gh-pages
branch (head/compare) into the animint/gallery gh-pages
branch (base) by clicking the "Contribute" button on your fork's GitHub web page or via a URL like https://github.com/animint/gallery/compare/gh-pages...YOUR_GITHUB_USERNAME:gallery:gh-pages?expand=1.For more info about galleries, go to Chapter 5 of The animint2 Manual and read the subsection on organizing animints in a gallery.