Top Related Projects
A visualization grammar.
Open-source JavaScript charting library behind Plotly and Dash
Bring data to life with SVG, Canvas and HTML. :bar_chart::chart_with_upwards_trend::tada:
Apache ECharts is a powerful, interactive charting and data visualization library for browser
nivo provides a rich set of dataviz components, built on top of the awesome d3 and React libraries
WebGL2 powered visualization framework
Quick Overview
SandDance is an open-source data visualization system developed by Microsoft Research. It allows users to create interactive, animated visualizations of large datasets using a variety of chart types and transitions. SandDance is designed to help users explore and understand complex data through intuitive, visually appealing representations.
Pros
- Highly interactive and engaging visualizations
- Supports large datasets with smooth performance
- Offers a wide range of chart types and customization options
- Seamless integration with popular data analysis tools like Power BI
Cons
- Steep learning curve for advanced features
- Limited documentation for some components
- Requires a modern web browser for optimal performance
- May be resource-intensive for very large datasets
Code Examples
// Creating a simple bar chart
import * as vega from 'vega';
import * as SandDance from '@msrvida/sanddance-explorer';
const spec = {
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"data": {"url": "data/cars.json"},
"mark": "bar",
"encoding": {
"x": {"field": "Origin", "type": "nominal"},
"y": {"aggregate": "count", "type": "quantitative"}
}
};
SandDance.view(spec, { renderer: 'svg' });
// Adding interactivity to a scatter plot
const spec = {
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"data": {"url": "data/cars.json"},
"mark": "point",
"encoding": {
"x": {"field": "Horsepower", "type": "quantitative"},
"y": {"field": "Miles_per_Gallon", "type": "quantitative"},
"color": {"field": "Origin", "type": "nominal"},
"tooltip": [
{"field": "Name", "type": "nominal"},
{"field": "Horsepower", "type": "quantitative"},
{"field": "Miles_per_Gallon", "type": "quantitative"}
]
}
};
SandDance.view(spec, { renderer: 'svg', hover: true });
// Creating an animated transition between chart types
const spec1 = {
// ... (bar chart specification)
};
const spec2 = {
// ... (scatter plot specification)
};
SandDance.transition(spec1, spec2, { duration: 1000 });
Getting Started
To get started with SandDance, follow these steps:
-
Install SandDance via npm:
npm install @msrvida/sanddance-explorer
-
Import SandDance in your project:
import * as SandDance from '@msrvida/sanddance-explorer';
-
Create a container element in your HTML:
<div id="sanddance-container"></div>
-
Initialize SandDance with your data and configuration:
const explorer = new SandDance.Explorer(document.getElementById('sanddance-container'), { data: yourDataArray, scheme: 'dark' });
-
Start exploring your data with SandDance's interactive visualizations!
Competitor Comparisons
A visualization grammar.
Pros of Vega
- More mature and established project with a larger community and ecosystem
- Offers greater flexibility and customization options for creating complex visualizations
- Supports a wider range of chart types and data transformations
Cons of Vega
- Steeper learning curve due to its more comprehensive feature set
- Requires more code and configuration for basic visualizations
- Less focus on 3D visualizations compared to SandDance
Code Comparison
SandDance:
const view = await vega.embed('#vis', {
$schema: 'https://vega.github.io/schema/vega-lite/v4.json',
data: { values: data },
mark: 'point',
encoding: { x: { field: 'x' }, y: { field: 'y' } }
});
Vega:
const spec = {
$schema: 'https://vega.github.io/schema/vega/v5.json',
width: 400, height: 200,
data: [{ name: 'table', values: data }],
marks: [{ type: 'symbol', from: { data: 'table' },
encode: { enter: { x: { field: 'x' }, y: { field: 'y' } } }
}]
};
const view = new vega.View(vega.parse(spec)).render('#vis');
Both libraries use declarative JSON specifications to define visualizations, but Vega requires more detailed configuration for similar results. SandDance focuses on simplicity for 3D visualizations, while Vega offers more control and flexibility for a wider range of chart types.
Open-source JavaScript charting library behind Plotly and Dash
Pros of Plotly.js
- Extensive chart types and customization options
- Large community and ecosystem with numerous extensions
- Well-documented API with interactive examples
Cons of Plotly.js
- Steeper learning curve for complex visualizations
- Larger file size, which may impact page load times
- Can be resource-intensive for large datasets
Code Comparison
SandDance:
import * as SandDance from "@msrvida/sanddance-react";
const view = new SandDance.Viewer(element);
view.render({
data: myData,
chart: "scatterplot",
columns: { x: "sales", y: "profit" }
});
Plotly.js:
import Plotly from 'plotly.js-dist';
Plotly.newPlot('myDiv', [{
x: [1, 2, 3, 4],
y: [10, 15, 13, 17],
type: 'scatter'
}]);
SandDance focuses on unit visualizations and offers a more declarative API, while Plotly.js provides a wider range of chart types with a more imperative approach. Plotly.js excels in traditional charting scenarios, whereas SandDance shines in exploratory data analysis with its unique unit visualization concept.
Bring data to life with SVG, Canvas and HTML. :bar_chart::chart_with_upwards_trend::tada:
Pros of D3
- Highly flexible and customizable for creating a wide range of data visualizations
- Large and active community with extensive documentation and examples
- Powerful data binding and manipulation capabilities
Cons of D3
- Steeper learning curve, especially for complex visualizations
- Requires more low-level coding compared to higher-level libraries
- Performance can be an issue with large datasets or complex animations
Code Comparison
SandDance:
const view = await vega.embed('#vis', {
$schema: 'https://vega.github.io/schema/vega-lite/v4.json',
data: { values: data },
mark: 'point',
encoding: { x: { field: 'x', type: 'quantitative' }, y: { field: 'y', type: 'quantitative' } }
});
D3:
const svg = d3.select('#vis')
.append('svg')
.attr('width', width)
.attr('height', height);
svg.selectAll('circle')
.data(data)
.enter()
.append('circle')
.attr('cx', d => xScale(d.x))
.attr('cy', d => yScale(d.y))
.attr('r', 5);
SandDance provides a higher-level abstraction for creating visualizations, while D3 offers more granular control over the rendering process. SandDance's code is more declarative, whereas D3 requires more imperative programming to achieve similar results.
Apache ECharts is a powerful, interactive charting and data visualization library for browser
Pros of ECharts
- More comprehensive and versatile, offering a wider range of chart types and visualization options
- Larger community and ecosystem, with extensive documentation and third-party extensions
- Better performance for handling large datasets and rendering complex visualizations
Cons of ECharts
- Steeper learning curve due to its extensive API and configuration options
- Larger file size, which may impact load times for web applications
- Less focus on specific data exploration and analysis features compared to SandDance
Code Comparison
SandDance:
import * as SandDance from "@msrvida/sanddance-react";
<SandDance.Viewer
data={myData}
insight={{
chart: "scatterplot",
columns: { x: "sales", y: "profit" }
}}
/>
ECharts:
import * as echarts from 'echarts';
const chart = echarts.init(document.getElementById('chart'));
chart.setOption({
xAxis: { type: 'value' },
yAxis: { type: 'value' },
series: [{
type: 'scatter',
data: myData.map(item => [item.sales, item.profit])
}]
});
nivo provides a rich set of dataviz components, built on top of the awesome d3 and React libraries
Pros of nivo
- Offers a wider variety of chart types and visualizations
- More customizable and flexible for complex data visualization needs
- Active development with frequent updates and new features
Cons of nivo
- Steeper learning curve due to its extensive API and options
- May require more setup and configuration for basic use cases
Code Comparison
SandDance:
import * as React from 'react';
import { SandDance } from '@msrvida/sanddance-react';
const App = () => (
<SandDance data={myData} />
);
nivo:
import { ResponsiveLine } from '@nivo/line'
const MyChart = () => (
<ResponsiveLine
data={data}
margin={{ top: 50, right: 110, bottom: 50, left: 60 }}
xScale={{ type: 'point' }}
yScale={{ type: 'linear', min: 'auto', max: 'auto', stacked: true, reverse: false }}
/>
)
SandDance provides a simpler API for quick visualizations, while nivo offers more granular control over chart properties and appearance. nivo's code tends to be more verbose but allows for greater customization.
WebGL2 powered visualization framework
Pros of deck.gl
- Highly performant for large datasets, capable of rendering millions of data points
- Extensive ecosystem with many pre-built layers and extensions
- Strong integration with mapping libraries like Mapbox GL
Cons of deck.gl
- Steeper learning curve due to its comprehensive API and features
- Requires more setup and configuration for basic visualizations
Code Comparison
SandDance:
var viewer = new SandDance.Viewer(element);
viewer.render({
data: myData,
chart: 'scatterplot',
columns: { x: 'sales', y: 'profit' }
});
deck.gl:
const layer = new ScatterplotLayer({
data: myData,
getPosition: d => [d.sales, d.profit],
getRadius: 1,
pickable: true
});
new Deck({ layers: [layer] });
Summary
While SandDance offers a more user-friendly approach for quick data exploration and visualization, deck.gl provides greater flexibility and performance for complex, large-scale data visualizations. SandDance excels in ease of use and rapid prototyping, whereas deck.gl shines in customization and handling massive datasets, particularly in geospatial contexts.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
SandDance
Visually explore, understand, and present your data.
By using easy-to-understand views, SandDance helps you find insights about your data, which in turn help you tell stories supported by data, build cases based on evidence, test hypotheses, dig deeper into surface explanations, support decisions for purchases, or relate data into a wider, real world context.
SandDance uses unit visualizations, which apply a one-to-one mapping between rows in your database and marks on the screen. Smooth animated transitions between views help you to maintain context as you interact with your data.
This new version of SandDance has been rebuilt from scratch with the goal of being modular, extensible, and embeddable into your custom applications. We are now on GitHub so that we are open and driven by the community through contributions, feature requests, and discussion.
SandDance was created by the Microsoft Research VIDA Group which explores novel technologies for visualization and immersive data analytics.
Where can I use SandDance?
- Try it now on the web
- Microsoft apps:
- 3rd Party apps:
- In your own JavaScript apps - see below
Component architecture
SandDance is an offering of several JavaScript components:
- sanddance - the core SandDance visualization canvas.
- sanddance-specs - Vega specifications for unit visualizations.
- sanddance-react - the core SandDance visualization canvas for use in React based applications.
- sanddance-explorer - the core SandDance visualization canvas with UI to enable data exploration, for use in React based applications.
- sanddance-embed - the easiest way to embed SandDance Explorer in your applications, via an
<iframe>
tag.
Publications
- 2018 - Atom: A Grammar for Unit Visualizations
- Deokgun Park, Steven Drucker, Roland Fernandez, Niklas Elmqvist
- IEEE Transactions on Visualization and Computer Graphics | December 2018, Vol 24(12): pp. 3032-3043
- 2015 - A Unifying Framework for Animated and Interactive Unit Visualizations
- Steven Drucker, Roland Fernandez
- MSR-TR-2015-65 | August 2015
Articles & videos
- SandDance project @ Microsoft Research
- Microsoft Research webinar / Data Visualization: Bridging the Gap Between Users and Information.
- SQL Server Blog / The August release of Azure Data Studio is now available
- Open Source Blog / Whatâs new in SandDance 3
- Channel 9 - Data Exposed / Introducing SandDance: Data Visualization in Azure Data Studio
- Channel 9 - Data Exposed / What is SandDance?
- Hacker News / Microsoft open sources SandDance, a visual data exploration tool
- analyticsindiamag.com / Visualizations With SandDance Using Visual Studio Code
- codeburst.io / Exploring Titanic Dataset using Microsoftâs Sandance
- mathkuro.com / VS Codeã®ã¤ã±ã¡ã³ãããåæï¼å¯è¦åãã¼ã«Sand Danceã®ä½¿ãæ¹
- mathkuro.com / ãSandDanceã°ã©ããµã³ãã«ãç¨éã«åããã¦é¸æãã¾ãããâ
- medium.com - @sefaoguzsaglam / how to start data visualizing with Microsoftâs SandDance (for beginners)
- mssqltips.com / SandDance for Azure Data Studio
- sqlshack.com / Exploring the SandDance Visualizations extension in Azure Data Studio
- torbjornzetterlund.com / I got to do some SandDance visualization
- YouTube - Anjani Prasad Atluri / SandDance: A tutorial
- YouTube - BI Tracks / SandDance Visualizations Tutorial - Azure Data Studio
Changelog
- July 2022 - Major version bump to v4: Now using MorphCharts.
- June 2020 - Major version bump to v3: Now using Deck.gl@8.
- December 2019 - Major version bump to v2: Now using Vega@5.
- August 2019 - Initial release to AppSource (Power BI marketplace).
- April 2019 - Initial release to GitHub.
Known issues
- Animations require a WebGL2 enabled browser.
Roadmap
PowerBI custom visual based on this new architecture.done!Additional views, such as stacks.done!- Code examples and tutorials.
Faceting for all chart types.done!- Better date handling.
Dependencies
SandDance is created with open source libraries, using Vega for chart layout.
Development
See dev.md
Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Top Related Projects
A visualization grammar.
Open-source JavaScript charting library behind Plotly and Dash
Bring data to life with SVG, Canvas and HTML. :bar_chart::chart_with_upwards_trend::tada:
Apache ECharts is a powerful, interactive charting and data visualization library for browser
nivo provides a rich set of dataviz components, built on top of the awesome d3 and React libraries
WebGL2 powered visualization framework
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot