External Data Format Examples

This page demonstrates different data storage formats available in JSPlots.

By default, data is embedded directly in the HTML file. For larger datasets, external formats can be more efficient.




Available Data Formats

JSON External (:json_external)

Data is stored as .json files in a data/ subdirectory.

Parquet (:parquet)

Data is stored as .parquet files in a data/ subdirectory.

CSV External (:csv_external)

Data is stored as .csv files in a data/ subdirectory.




Time Series Data

Plot Attributes


Data: df.parquet




Stock Price vs Volume

Plot Attributes


Data: stock_data.parquet




Usage Notes

This example uses Parquet format (the recommended format for production use).

To use external formats, simply set the dataformat parameter when creating a JSPlotPage:

page = JSPlotPage(
    data_dict,
    plot_elements,
    dataformat = :parquet  # or :json_external, :csv_external
)

Important: When using external formats, you must use the provided launcher scripts (open.sh or open.bat) to avoid CORS errors when viewing files locally.




Summary

This page demonstrated external data formats:

File size comparison: Parquet is typically the smallest, followed by JSON, then CSV.

Recommendation: Use Parquet format for production applications with larger datasets.


This page was created using JSPlots.jl.