Skip to content

FAQ vignettes for ggplot2 #4404

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 41 commits into from
Apr 16, 2021
Merged

Conversation

mine-cetinkaya-rundel
Copy link
Member

These were created based on an analysis of the most commonly asked questions about ggplot2 on SO. A summary of these can be found here (requires login).

A few notes:

  • If using a package other than ggplot2 in the answers, I've indicated the package name with ::.
  • There is a minimal amount of custom CSS on top fo the FAQ pages that ensure better spacing for readability.
  • I think we should add alt text to the images but I'd like to do that after a round of review to avoid rewriting them.

There are some questions that were commonly asked that I didn't include. Happy to add these in if we think it would be good to do so (and I might ask for guidance on most elegant solutions for some).

@mine-cetinkaya-rundel mine-cetinkaya-rundel marked this pull request as draft April 8, 2021 13:37
@yutannihilation
Copy link
Member

These packages need to be included in Suggests.

Error: Error: processing vignette 'faq-axes.Rmd' failed with diagnostics:

there is no package called 'ggtext'
Error: Error: processing vignette 'faq-bars.Rmd' failed with diagnostics:

there is no package called 'tidyr'
Error: Error: processing vignette 'faq-reordering.Rmd' failed with diagnostics:

there is no package called 'forcats'

@thomasp85
Copy link
Member

I'm not sure we want them in Suggests, to be honest... @mine-cetinkaya-rundel is it imperative that this is a vignette that is distributed with thee package, or could it be an article on the ggplot2 site?

@mine-cetinkaya-rundel
Copy link
Member Author

I think this is up to you -- also mainly why I left this as a draft PR for now, was going to discuss with @hadley as well and then flip the switch.

My thoughts:

  • I think these will be most helpful for people googling such questions, so articles on ggplot2 site could be sufficient.
  • If distributed with the package they might be helpful to those who are not always working online, and hence not able to google/SO things as easily. But I imagine this is not a large proportion of users.
  • So I'm not sure of the burden of additional dependencies (even if in Suggests only) vs. the potential benefit of offline access.
  • I tried to be selective in non ggplot2 packages I use -- they're either tidyverse or those that I think we can reasonably be confident will be kept in good shape.

Let me know if you have a preference one way or another and I'm happy to update as such. If going the article on site only route, I'd love a pointer on how we indicate that in the package (a link to another package that uses that would be sufficient).

@clauswilke
Copy link
Member

I frequently find it helpful to put vignettes into the .Rbuildignore. In this way, they're in the github repo, they show up in the pkgdown site, but they're excluded from the R check and from CRAN. I think that's a good compromise. I would assume people are much more likely to look for documentation materials on the package website than on CRAN. (If I google "ggplot2" the first hit I get is ggplot2.tidyverse.org, so as long as the article is there I'd find it.)

@hadley
Copy link
Member

hadley commented Apr 9, 2021

Or you can use use_article() to put them in a subdirectory — we'd still need to declare these packages somewhere though, so that pkgdown can have them installed them.

@mine-cetinkaya-rundel mine-cetinkaya-rundel marked this pull request as ready for review April 15, 2021 10:34
@mine-cetinkaya-rundel
Copy link
Member Author

I've made the FAQs into articles and added a Config/Needs/Website field to DESCRIPTION for the additional packages needed to build the articles

@thomasp85 thomasp85 merged commit 6cf1370 into tidyverse:master Apr 16, 2021
@thomasp85
Copy link
Member

Thanks @mine-cetinkaya-rundel !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants