Coder Social home page Coder Social logo

vega-unfurl's Introduction

vega-unfurl

Slack app for Vega Editor links preview ...

Usage Example

  1. Paste this Vega-Lite Stacked Bar Chart JSON spec example into online Vega Editor:
{
  "$schema": "https://vega.github.io/schema/vega-lite/v4.json",
  "title": "Weather by Month",
  "description": "Stacked Bar Chart",
  "data": {"url": "https://vega.github.io/vega-datasets/data/seattle-weather.csv"},
  "mark": "bar",
  "encoding": {
    "x": {
      "timeUnit": "month",
      "field": "date",
      "type": "ordinal",
      "axis": {"title": "Month of the year"}
    },
    "y": {
      "aggregate": "count",
      "type": "quantitative"
    },
    "color": {
      "field": "weather",
      "type": "nominal",
      "scale": {
        "domain": ["sun", "fog", "drizzle", "rain", "snow"],
        "range": ["#e7ba52", "#c7c7c7", "#aec7e8", "#1f77b4", "#9467bd"]
      },
      "legend": {"title": "Weather type"}
    }
  }
}
  1. Click Share in Vega Editor to copy url-encoded Vega(-Lite) spec.

  2. Paste Vega spec URL into a Slack channel in a workspace with installed Vega Unfurl Slack app.

You should see that shared url-encoded vega(-lite) spec link expended with new Slack message attachment containing vega chart title, description, vega json schema link, data links, view/save .vg/.vl.json links & image preview:

Vega Unfurl Example

For this particular Stacked Bar Chart example those links are:

You can also use Vega Unfurl slack app document handlers to save that bar chart svg || png for sharing with your vega data viz team.

Dev Log

See this dev.to post for more info:

https://dev.to/tarasnovak/vega-unfurl-slack-app-13i8

& #vegaUnfurl tag on Twitter for the latest & greatest updates on this front :) ...

References

Everything you ever wanted to know about unfurling ...

All will be revealed ...

Unfurling links in messages

Slack Events API

Developing Slack apps locally

vega-unfurl's People

Contributors

randomfractals avatar

Stargazers

 avatar

Watchers

 avatar  avatar

vega-unfurl's Issues

add vega editor link unfurl

  • decompress shared vega spec from url
  • parse vega spec and extract vega graph title and description
  • create pretty message attachment from that link

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.