noaa-onms / onmsR

R package of common functions for dataset wrangling and plotting used across National Marine Sanctuaries, originally for interactive infographic products per Sanctuary
https://noaa-onms.github.io/onmsR
MIT License
0 stars 0 forks source link

where to store definitive infographiq templates & functions? #3

Closed bbest closed 3 years ago

bbest commented 3 years ago

Let's consider one place, probably infographiq, for a set of functions and templates using Github Releases (ie versions of product) with potential for backward compatibility, multiple output types (Rmd website, Rmd standalone page, Drupal Module, HTML standalone page, ...).

Present: Jumble of Repos

Presently the interactive infographics core files and functions live in too many locations:

Instances:

Future: Consolidated Framework — Single instances using core infographiq R package

  1. What is common across repos that we could consolidate?
  2. Can core files be pulled over the web remotely? Commonly, Content Delivery Network (CDN) versions of JS and CSS files are pulled over the web. For example, for a quick start to Bootstrap v4.5, the following HTML lines include these core files:

    <!doctype html>
    <html lang="en">
    <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
    
    <title>Hello, world!</title>
    </head>
    <body>
    <h1>Hello, world!</h1>
    
    <!-- Bootstrap JS -->
    <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx" crossorigin="anonymous"></script>
    
    </body>
    </html>
  3. What needs to be available locally to the instance, and possibly updatable with infographiq::update_website() or similar?
7yl4r commented 3 years ago

This is something I have been craving so that I can build on top of the infographics work and push improvements back upstream. I think it makes sense to have two repos: A) the package of core files that makes everything work (infographiq) and B) a boilerplate of minimal example locally-required files to be forked and used as a template for new infographic sites (info-demo or similar).

bbest commented 3 years ago

Ok, I'm liking this architecture. I think we should put this into the infographiq documentation.

This hierarchy was also visualized by Jenn:

image.png

bbest commented 3 years ago

Closing since moved to marinebon/infographiq#4