DataSpace
  • DataSpace
  • Platform
    • Overview
    • Workspaces
    • User Roles
    • Transformation
      • Code
      • Preview
      • Logs
      • Plot
      • Ingest
    • Builds
    • Schedules
    • Secrets Store
  • Infrastructure
    • Overview
Powered by GitBook
On this page
  1. Platform
  2. Transformation

Plot

PreviousLogsNextIngest

Last updated 19 days ago

By creating an index.html file in the correct directory, an interactive plot can be created. The easiest way to create an interactive plot would be to utilize plotly. However, it is not necessary to use any library. Handcrafting an HTML file is also possible so long that an HTML file is created in the following directory:

/data/{TRANSFORM_ID}/artifacts/index.html

pyplot

Following is an example using pyplot

import plotly.graph_objects as go
import plotly.offline as pyo
import os 

def transform(df):
    fig = go.Figure()
    pyo.plot(fig, filename=f"/data/{os.environ['TRANSFORM_ID']}/artifacts/index.html")