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

Discussion: Non-HTML output formats (like Rmd/md) #56

Open
amoeba opened this issue May 30, 2018 · 4 comments
Open

Discussion: Non-HTML output formats (like Rmd/md) #56

amoeba opened this issue May 30, 2018 · 4 comments
Labels
help wanted Extra attention is needed
Milestone

Comments

@amoeba
Copy link
Collaborator

amoeba commented May 30, 2018

Had a great question in my dataspice demo at NCEAS today that dovetailed with something we had talked about at the unconf. What if we output to Rmd or md and the scientist could make use of that as they want. The Rmd/md could be converted to HTML still but the intermediate format would be of greater utility to the user.

Also had a suggestion for converting to Word or Google Docs in some form. The comment also pointed out that a lot of scientists (ours include) use Drive as a storage location over GitHub so being able to work with dataspice in a Google Drive workflow would be useful (making HTML output less useful).

@amoeba amoeba added the help wanted Extra attention is needed label May 30, 2018
@cboettig
Copy link
Member

Great idea! How would Rmd output format work? I might imagine something like asking the user to add a command like

  embed_spice()

to their .Rmd, which would create either stand-alone html or png (think htmlwidgets::saveWidget() or webshot::webshot() for png) into the md output? Not sure how useful that would be. It could work for displaying a concise card format with some metadata (obviously the .png is the polar opposite of a machine-readable version of metadata, but we already have the dataspice.json for that...)

Alternately, maybe you are envisioning something rather more 'raw', i.e. a pure markdown text + links version of the data. One spin on that would be something like cite_spice(), which would give Markdown-formatted text output with the essential bibliographic information (i.e. authors, title, publication date, and link to the overall dataset url or identifier).

@amoeba
Copy link
Collaborator Author

amoeba commented May 30, 2018

Yeah I'm not totally sure. More the latter? The Rmd could be in place of an index.html which could then be rendered into other formats as needed or modified after-the-fact with more R code / figures as desired.

  • Multiple simultaneous outputs: build_site() -> { docs/index.html, docs/index.Rmd
  • Give the user a build_site() to build HTML and another function for a nearly equivalent Rmd?

One pain point would be inserting the JSON-LD into the HTML. I'm not sure if it has to be in the <head> tag or not for Google to see it. It's technically possible but I haven't worked out an implementation just yet. Possibly just an Rmd HTML template would be enough.

@cboettig
Copy link
Member

@amoeba Google's structured data validation tool sees it anywhere in the file, don't think it has to be in the <head>. I like the the Rmd template strategy! Perhaps one could just use the includes option to point to the JSON-LD text, though I guess you'd need to wrap it in a <script type="application/ld+json> thing first...

A light-weight version of the latter could certainly be the citation option like @khondula suggested in #57

@rubenarslan
Copy link

rubenarslan commented Jun 25, 2018

See also my approach using rmd partials in codebook.

@amoeba amoeba added this to the v1.1 milestone Jul 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants