All Projects → gicentre → Litvis

gicentre / Litvis

Licence: bsd-3-clause
Literate Visualization: Theory, software and examples

Programming Languages

typescript
32286 projects
elm
856 projects

Projects that are alternatives of or similar to Litvis

Boostnote Markdown Cheatsheet
📋 📘 The missing one page markdown feature cheat sheet for Boostnote
Stars: ✭ 276 (-4.5%)
Mutual labels:  markdown
Game Programming Patterns
Source repo for the book
Stars: ✭ 3,096 (+971.28%)
Mutual labels:  markdown
Myblog
vue + node 实现的一个博客系统
Stars: ✭ 285 (-1.38%)
Mutual labels:  markdown
Flow Netbeans Markdown
Markdown file support for the NetBeans IDE
Stars: ✭ 276 (-4.5%)
Mutual labels:  markdown
Markdowntoc
SublimeText3 plugin which generate a table of contents (TOC) in a markdown document.
Stars: ✭ 278 (-3.81%)
Mutual labels:  markdown
Sq
swiss-army knife for data
Stars: ✭ 275 (-4.84%)
Mutual labels:  markdown
Format Readme
Формат файла README
Stars: ✭ 270 (-6.57%)
Mutual labels:  markdown
Panflute
An Pythonic alternative to John MacFarlane's pandocfilters, with extra helper functions
Stars: ✭ 286 (-1.04%)
Mutual labels:  markdown
Markdown Pp
Preprocessor for Markdown files to generate a table of contents and other documentation needs
Stars: ✭ 280 (-3.11%)
Mutual labels:  markdown
Jsonschema2md
Convert Complex JSON Schemas into Markdown Documentation
Stars: ✭ 283 (-2.08%)
Mutual labels:  markdown
Logicandcodinggames
[Resource List] Programming-related games I'd like to try
Stars: ✭ 277 (-4.15%)
Mutual labels:  markdown
Gitit Bigger
Gitit Bigger: 超棒的个人、团队Wiki/文档方案(Git、Markdown、Bootstrap、Ace、Docker)
Stars: ✭ 279 (-3.46%)
Mutual labels:  markdown
Allmark
A cross-platform markdown web server
Stars: ✭ 284 (-1.73%)
Mutual labels:  markdown
Markdownediting
Powerful Markdown package for Sublime Text with better syntax understanding and good color schemes.
Stars: ✭ 2,976 (+929.76%)
Mutual labels:  markdown
Sourcedocs
Generate Markdown documentation from source code
Stars: ✭ 286 (-1.04%)
Mutual labels:  markdown
Verless
A simple and lightweight Static Site Generator.
Stars: ✭ 276 (-4.5%)
Mutual labels:  markdown
Text
📑 Collaborative document editing using Markdown
Stars: ✭ 282 (-2.42%)
Mutual labels:  markdown
Markdowntemplates
✅🔻 A collection of alternate R markdown templates
Stars: ✭ 287 (-0.69%)
Mutual labels:  markdown
Docma
A powerful tool to easily generate beautiful HTML documentation from JavaScript (JSDoc), Markdown and HTML files.
Stars: ✭ 287 (-0.69%)
Mutual labels:  markdown
Codeexpander
A cross-platform cloud synchronization development tool for developers that includes input enhancement, code snippet management, and Markdown. (专为开发者开发的一个集输入增强、代码片段管理(支持 Markdown)为一体跨平台云同步的开发工具。)
Stars: ✭ 285 (-1.38%)
Mutual labels:  markdown

Literate Visualization · License: BSD 3-Clause GitHub Workflow Status (checks) Code style: Prettier Contributor Covenant

A light-touch approach to designing, building and describing visualization. Here you will find

Setting up litvis

(If you unfamiliar with the using npm or configuring editors, you can view these more detailed setup instructions that show you how to install and set up VSCode to work with litvis.)

Litvis documents can be viewed and created in either the VS Code (recommended) or Atom editors:

  1. If you don't have it already, install Node.js. This will allow you to use npm, used for installing some of the other necessary software.

  2. Install Elm from the official Elm install page (there's no need to follow the "after installation is complete..." tests).

  3. Open a terminal window and install Prettier and Prettier Elm plugin with the following command:

    npm install --global prettier prettier-plugin-elm
    

    If you cannot install with npm because of 'EACCES write permission errors', see these instructions on how to prevent them.

  4. Install either the VS Code or Atom editor.

  5. Depending on which editor you wish to use, install the litvis extensions:

    If using VS Code:

    • Select View → Extensions

    • Search for markdown-preview-enhanced-with-litvis and then click install next to the returned result (main litvis functionality).

    • Search for prettier - Code formatter and install (auto-formats code).

    • Search for elm tooling and install (syntax highlighting of Elm code).

    If using Atom:

    • Select Atom → Preferences → Install (or File → Settings → Install on Windows)

    • Search for markdown-preview-enhanced-with-litvis and then click install next to the returned result (main litvis functionality).

    • Search for prettier-atom and install (auto-formats code).

    • Search for language-elm and install (syntax highlighting of Elm code).

    • Search for language-markdown and install (markdown syntax highlighting).

    • When you create your first document in Atom, you may be asked to install further dependencies such as linter, linter-ui-default and busy-signal. Install these and any other dependencies if requested.

  6. Configuring Your Editor

    To make using litvis as smooth as possible, we recommend the following editor configuration options:

    If using VS Code:

    • Under Preferences->Settings, change the following from their default settings:
      • Text Editor -> Formatting: ensure Format On Save is ticked
      • Extensions -> Markdown Preview Enhanced with litvis: ensure Live Update is not ticked.
      • Extensions -> Prettier and ensure Prettier: Resolve Global Modules is ticked.

    If using Atom:

    • Settings->Packages (Windows) or Atom->Preferences->Packages (MacOS) or Edit->Preferences->Packages (Linux), scroll down to Prettier-atom, click Settings and make sure Format files on Save is ticked.
    • In Packages (as above) scroll down to Markdown-Preview-Enhanced-with-litvis, click Settings and ensure live Update and ensure it is not ticked.

You should now be good to go! Get started by writing your first litvis document and looking at these tutorials.

‘Hello world’ in literate Elm

Adding litvis attribute l (or literate) to elm blocks in markdown automatically compiles and executes the code in real time. Attribute r (or raw) is the simplest way to see the result.

helloworld

examples/features/helloWorld.md

Simple litvis chart

A litvis code block with attribute v (or visualize) automatically renders the declared symbol using elm-vegalite or elm-vega.

simplechart

examples/features/simpleChart.md

Code referencing across blocks

By default, litvis code blocks share the same execution context, which means that an Elm symbol defined in one block and can be referenced in another block. Blocks can be placed in any order.

codereferencingcodeblocks

examples/features/codeReferencingAcrossBlocks.md

Code referencing with triple hat notation

Symbols from Elm code blocks can be referenced in any part of the markdown using triple hat notation (^^^).

codereferencingtriplehat

examples/features/codeReferencingWithTripleHatNotation.md

Code referencing with parameters

Triple hat references accept parametrized function calls, which makes it easy to combine text with graphics and produce families of related graphics. This means that small multiples and embedded graphics such as sparklines are straightforward.

codereferencingparams

examples/features/codeReferencingWithParameters.md

Debugging Code

A litvis document that is being previewed is constantly checked for program validity. Any issues that are detected are displayed in the editing environment and help with debugging. If a visualization has been successfully rendered before the issue had occurred, its old preview is shown to avoid unwanted markup reflows.

Replacing v with r for raw or j for json makes it possible to look into generated vega-lite specs. This can help debugging more deeply embedded problems or for generating standard JSON Vega/Vega-Lite specifications.

debuggingvegalite

examples/features/debuggingVegaLite.md

Interaction

Adding interactive to a code block with v or a triple hat reference makes visualizations live if interaction is described within Spec. User input controls can be added to the document, if desired.

interaction

examples/features/interaction.md

Multiple execution contexts

Although a single Elm execution context may be sufficient in many litvis narratives, context isolation may be desired in some cases. A number of code block attributes such as context, id, follows, isolated and siding enable fine-grained control of Elm symbol visibility, thus making it easier to accomplish certain tasks.

A siding (or s) is a shortcut for isolated follows=default. This keyword makes previously defined symbols in default context available within the code block, but avoids name clashes with any blocks later in the document.

codesidings

examples/features/codeSidings.md

Branching narratives

A litvis narrative can be split between multiple markdown documents, where each document follows its parent. This enables routine use of parallel branching narratives that assemble and structure document trees. Each branch in a tree can represent alternative designs each with their own rationale or focus for analysis.

branchingnarratives

examples/features/branching/root.md > examples/features/branching/branchA.md > examples/features/branching/branchB.md

Narrative schemas

A litvis narrative can be linked to a set of YAML files, which define labels, rules and styling. These narrative schemas can be thought of as an analogue of schemas more usually found in declarative programming contexts such as JSON and XML schema.

The purpose of the schema is to provide a set of structured guidelines to assist in writing the narrative content around visualizations. This can be thought of as form of scaffolding to assist in the process of design exposition or reasoning. Schemas can be used to validate litvis documents.

narrativeschemas

examples/crossQuadCharts.md > narrative-schemas/idiom.yml

Automatic code formatting

Litvis integrates with Prettier and its Elm plugin, which enables seamless document formatting as the narrative is being written. A file is automatically prettified on save or when the Format command is explicitly called. Formatting keeps litvis files in a readable and maintainable state, which eases collaboration and reduces distraction from the higher-level tasks.

formatting1000

examples/lunarEclipse.md

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].