<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <id>https://vegafusion.io</id>
  <title>VegaFusion Blog - Posted in 2024</title>
  <updated>2024-11-25T23:29:15.850609+00:00</updated>
  <link href="https://vegafusion.io"/>
  <link href="https://vegafusion.io/posts/2024/atom.xml" rel="self"/>
  <generator uri="https://ablog.readthedocs.io/" version="0.11.12">ABlog</generator>
  <subtitle>VegaFusion Updates</subtitle>
  <entry>
    <id>https://vegafusion.io/posts/2024/2024-11-13_Release_2.0.0.html</id>
    <title>VegaFusion 2.0</title>
    <updated>2024-11-13T00:00:00-05:00</updated>
    <author>
      <name>Jon Mease</name>
    </author>
    <content type="html">&lt;section id="vegafusion-2-0"&gt;

&lt;p&gt;&lt;strong&gt;A new era: Building blocks for analyzing, accelerating, and scaling Vega visualizations:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;By: Jon Mease&lt;/p&gt;
&lt;hr class="docutils" /&gt;
&lt;p&gt;The VegaFusion team is excited to announce the release of VegaFusion 2.0. This major release represents a significant evolution in VegaFusion’s architecture and target audience. The focus has been on simplification - making VegaFusion easier to maintain and easier to integrate into larger Vega systems to accelerate and scale Vega visualizations.&lt;/p&gt;
&lt;section id="modernized-rust-core"&gt;
&lt;h2&gt;Modernized Rust Core&lt;/h2&gt;
&lt;p&gt;The core Rust implementation has been significantly simplified by taking advantage of modern DataFusion functionality:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;New &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;get_column_usage()&lt;/span&gt;&lt;/code&gt; utility function for analyzing the column dependencies of datasets in a Vega spec.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Custom User Defined Functions (UDFs) have been largely replaced with DataFusion’s native capabilities.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Vega transforms are now implemented directly against the DataFusion DataFrame API, rather than using the circuitous SQL generation approach of VegaFusion 1.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Updated to DataFusion 43 and Arrow 52.3 for improved performance and bug fixes.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="javascript-webassembly"&gt;
&lt;h2&gt;JavaScript / WebAssembly&lt;/h2&gt;
&lt;p&gt;The JavaScript integration has been simplified while maintaining full functionality:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Removed the separate &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;vegafusion-embed&lt;/span&gt;&lt;/code&gt; package as the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;vegafusion-wasm&lt;/span&gt;&lt;/code&gt; package now renders charts using vega-embed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The full VegaFusion runtime is now compiled to WebAssembly as part of the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;vegafusion-wasm&lt;/span&gt;&lt;/code&gt; pacakge, making it possible to run VegaFusion entirely in the browser without requiring an external server.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Connecting to external VegaFusion servers via gRPC-Web remains supported.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="python-removal-of-upstreamed-vega-altair-integration"&gt;
&lt;h2&gt;Python: Removal of Upstreamed Vega-Altair Integration&lt;/h2&gt;
&lt;p&gt;All the VegaFusion 1.x logic for integrating with Vega-Altair has been upstreamed into the Vega-Altair project itself. So this functionality has been removed in VegaFusion 2.0.&lt;/p&gt;
&lt;p&gt;In particular:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;To use VegaFusion with Vega-Altair, activate the &lt;a class="reference external" href="https://altair-viz.github.io/user_guide/large_datasets.html#vegafusion-data-transformer"&gt;&lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;&amp;quot;vegafusion&amp;quot;&lt;/span&gt;&lt;/code&gt; data transformer&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;vegafusion-jupyter&lt;/span&gt;&lt;/code&gt; package has been retired in favor of using Altair’s built-in &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;JupyterChart&lt;/span&gt;&lt;/code&gt; for Altair charts and Vega-Lite specs. For Vega specs, the new &lt;a class="reference external" href="https://anywidget.dev/"&gt;AnyWidget&lt;/a&gt;-based &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;VegaFusionWidget&lt;/span&gt;&lt;/code&gt; is included in the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;vegafusion&lt;/span&gt;&lt;/code&gt; package.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;vf.enable()&lt;/span&gt;&lt;/code&gt; has been removed. Instead, use the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;&amp;quot;vegafusion&amp;quot;&lt;/span&gt;&lt;/code&gt; data transformer along with any of Altair’s built-in renderers&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;vf.save()&lt;/span&gt;&lt;/code&gt; has been removed. Instead, use Altair’s native &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;chart.save()&lt;/span&gt;&lt;/code&gt; method with the &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;&amp;quot;vegafusion&amp;quot;&lt;/span&gt;&lt;/code&gt; data transformer enabeld.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;vf.transformed_data()&lt;/span&gt;&lt;/code&gt; has been removed. Instead, use Altair’s native &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;chart.transformed_data()&lt;/span&gt;&lt;/code&gt; method.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="python-enhanced-dataframe-compatibility"&gt;
&lt;h2&gt;Python: Enhanced DataFrame Compatibility&lt;/h2&gt;
&lt;p&gt;VegaFusion 2.0 brings improved DataFrame compatibility:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Support for any &lt;a class="reference external" href="https://narwhals-dev.github.io/narwhals/"&gt;Narwhals&lt;/a&gt;-compatible DataFrame type as inline datasets.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Zero-copy sharing of Arrow data from Polars to VegaFusion’s DataFusion runtime is now supported thanks to the &lt;a class="reference external" href="https://github.com/kylebarron/arro3"&gt;arro3&lt;/a&gt; project..&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The DuckDB SQL connection has been removed, but DuckDB relations are now directly supported as inline datasets, with automatic column pruning prior to conversion to Arrow.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reduced Python dependencies. VegaFusion now requires only &lt;a class="reference external" href="https://pypi.org/project/arro3-core/"&gt;&lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;arrow3-core&lt;/span&gt;&lt;/code&gt;&lt;/a&gt;, &lt;a class="reference external" href="https://pypi.org/project/packaging/"&gt;&lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;packaging&lt;/span&gt;&lt;/code&gt;&lt;/a&gt;, and &lt;a class="reference external" href="https://pypi.org/project/narwhals/"&gt;&lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;narwhals&lt;/span&gt;&lt;/code&gt;&lt;/a&gt;. In particular, &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;pyarrow&lt;/span&gt;&lt;/code&gt; and &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;pandas&lt;/span&gt;&lt;/code&gt; are no longer required dependencies.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="new-documentation"&gt;
&lt;h2&gt;New Documentation&lt;/h2&gt;
&lt;p&gt;VegaFusion 2.0 launches with completely revamped documentation:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;New PyData Sphinx theme at &lt;a class="reference external" href="http://vegafusion.io/v2/"&gt;vegafusion.io&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Standalone examples in Python and Rust&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Comprehensive support tables for Vega transforms and expressions&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="learn-more"&gt;
&lt;h2&gt;Learn more&lt;/h2&gt;
&lt;p&gt;Check out these resources to learn more:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://github.com/hex-inc/vegafusion/releases/tag/v2.0.0"&gt;2.0.0 Changelog&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://vegafusion.io/v2"&gt;VegaFusion Documentation&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://github.com/hex-inc/vegafusion"&gt;VegaFusion GitHub&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://github.com/hex-inc/vegafusion/issues"&gt;Report and Issue&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://github.com/hex-inc/vegafusion/discussions"&gt;Start a Discussion&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;/section&gt;
</content>
    <link href="https://vegafusion.io/posts/2024/2024-11-13_Release_2.0.0.html"/>
    <summary>A new era: Building blocks for analyzing, accelerating, and scaling Vega visualizations:</summary>
    <published>2024-11-13T00:00:00-05:00</published>
  </entry>
</feed>
