Skip to content
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

Expand nms4r vignettes #69

Open
bbest opened this issue Dec 4, 2020 · 9 comments
Open

Expand nms4r vignettes #69

bbest opened this issue Dec 4, 2020 · 9 comments
Assignees

Comments

@bbest
Copy link
Contributor

bbest commented Dec 4, 2020

See #61

  • Show sequence of how content gets rendered, differentiating between fetching of new data (ie SST) vs rendering Rmd's.
@bbest
Copy link
Contributor Author

bbest commented Dec 7, 2020

Audience:

  • Who's gonna look at this?
  • Technical people familiar with R who may want to implement or improve upon the place-based webenized reports (NMS, IEA, ...)

Existing Vignettes:

Perhaps expand on vignettes similar to breakdown here:

  • Function reference • nms4r
    • Data: Fisheries (CalCOFI)
    • Data: Oceanography (ERDDAP)
    • Data: Rocky intertidal (MARINe). NOTE: This data is not publicly available, but can at least describe the processing of it for future.
    • Reporting functions
    • Sanctuaries utilities

And then highlight how we populate static and dynamic content with captions, so possibly pulling from:

Diagrams of what?

  • Perhaps something simple with bullets describing sequence of updates from oceanography data, knitting of Rmds to html

@bbest
Copy link
Contributor Author

bbest commented Dec 8, 2020

We need a bigger picture Vignette to orient the technical audience around the necessary files (html, svg, csv) to construct an interactive infographic website, and where these files should be located and reference each other.

See README.md in https://github.com/marinebon/info-demo.

> # brew install tree
> cd ~/github/info-demo
> tree -L 2
.
├── README.md
├── _site.yml
├── about.Rmd
├── docs
│   ├── README.html
│   ├── about.html
│   ├── index.html
│   ├── libs
│   ├── modals
│   ├── site_libs
│   └── svg
├── index.Rmd
├── info-demo.Rproj
├── libs
│   ├── bootstrap-toggle.min.css
│   ├── bootstrap-toggle.min.js
│   ├── d3.v5.min.js
│   ├── infographiq.js
│   └── styles.css
├── modals
│   ├── test-video.Rmd
│   └── test-video.html
└── svg
    ├── cinms_pelagic.svg
    └── svg_links.csv

superjai added a commit to noaa-onms/onmsR that referenced this issue Dec 10, 2020
superjai added a commit to noaa-onms/onmsR that referenced this issue Dec 11, 2020
superjai added a commit to noaa-onms/onmsR that referenced this issue Dec 11, 2020
superjai added a commit to noaa-onms/onmsR that referenced this issue Dec 11, 2020
@superjai
Copy link
Collaborator

Hey @bbest & @mspector13 - I took a first pass at a bunch of the vignettes, which you can find in the nms4r package here. I created vignettes for each of the function groups listed on the Reference page. It is a pretty crude first pass, so there is a lot of room for improvement. But I figured that something was better than nothing - editing is easier than writing from scratch, I find. I think the vignette for "Sanctuary Utilities" (which currently is just a placeholder) should be dumped, as there is only one function in this function group (meaning I don't what there is to say further than what is in the individual function description).

I also created an overview vignette, which is currently a placeholder. I'll get a bad first pass down on the overview later on today.

superjai added a commit to noaa-onms/onmsR that referenced this issue Dec 12, 2020
@superjai
Copy link
Collaborator

superjai commented Dec 12, 2020

Hey @bbest - I had a thought. Given the complexity of creating a new site from scratch, I thought it might be good if nms4r could itself create a new template site. I created a new function to do that - initial_build() - which creates a template site in a path selected by the user. The function just copies over the contents of the template directory that is sitting in the R package (in the inst folder).

I created this template as a very simple version of a new site. I think it would work well to walk through this template site in a vignette.

The only trouble is that this template site doesn't quite work. The issue is that, in the rendered html (like this file), the clickable infographic images don't display in a browser (though they do show up fine if the html is viewed within R studio). The html files in the modal directory seem to be fine.

Anyway, what do you think?

@bbest
Copy link
Contributor Author

bbest commented Dec 15, 2020

Looks good @superjai. Reminds me of devtools::create("dir/here"):

> devtools::create("testpkg")
New project 'testpkg' is nested inside an existing project './', which is rarely a good idea.
If this is unexpected, the here package has a function, `here::dr_here()` that reveals why './' is regarded as a project.
Do you want to create anyway?

1: Yes
2: Absolutely not
3: No

Selection: 1
✓ Creating 'testpkg/'
✓ Setting active project to '/Users/bbest/github/nms4r/testpkg'
✓ Creating 'R/'
✓ Writing 'DESCRIPTION'
Package: nms4r
Title: What the Package Does (One Line, Title Case)
Version: 0.0.0.9000
Authors@R (parsed):
    * First Last <[email protected]> [aut, cre] (YOUR-ORCID-ID)
Description: What the package does (one paragraph).
License: `use_mit_license()`, `use_gpl3_license()` or friends to
    pick a license
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.1
✓ Writing 'NAMESPACE'
✓ Writing 'nms4r.Rproj'
✓ Adding '.Rproj.user' to '.gitignore'
✓ Adding '^nms4r\\.Rproj$', '^\\.Rproj\\.user$' to '.Rbuildignore'
✓ Opening '/Users/bbest/github/nms4r/testpkg/' in new RStudio session
✓ Setting active project to '<no active project>'

@bbest
Copy link
Contributor Author

bbest commented Jan 8, 2021

TODO:

  • Home for JS will pull from R package infographiq (which is to be consolidated from demonstration website template info-demo).
  • Rewrite vignettes (but TBD which most appropriate R package)

Expand for reuse in different environments:

  • Rmarkdown website
  • HTML: R-independent website. demo with vignette
    • fk-esr-info (see README.md): Seann Regan made website, self-contained HTML; just augmenting with an interactive infographic
      • Use Google Sheets to update the data directly from publicly viewable CSV: one spot updates within page Highcharts plots and additionally modal windows
  • Drupal module (ie for content management system): integratedecosystemassessment.noaa.gov
    • [info-demo:drupal-module(https://github.com/marinebon/info-demo/tree/master/drupal-module)

@superjai
Copy link
Collaborator

superjai commented Feb 6, 2021

Hey @bbest & @mspector13 - I have gone ahead and greatly updated the vignette for documenting how to create a new nms4r site. What do you think? Feel free to edit as you wish. It is in the nms4r package so you should do a pull on that. Here is the direct link to the specific vignette. The file to edit is Overview.Rmd in the vignettes folder.

@bbest
Copy link
Contributor Author

bbest commented Feb 6, 2021 via email

@superjai
Copy link
Collaborator

superjai commented Feb 6, 2021

Hey @bbest. Sounds good. Let's chat about it though during our next meetup - I am not exactly sure where infographiq ends and nms4r begins.

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

No branches or pull requests

3 participants