This PR was made by the team Black Oil Pyrates in HACKTUDO.
Description:
This PR introduces a new ThreeWChart class to the 3W repository, enabling the creation of interactive visualizations from 3W dataset files using Plotly. The ThreeWChart module provides an intuitive way to display time-series data with background shapes indicating key class transitions, along with a custom legend for better event understanding.
Code Overview:
ThreeWChart class:
Attributes:
class_mapping: Maps class IDs to descriptive event names.
class_colors: Assigns colors to each class for visual distinction.
Methods:
_load_data: Loads and preprocesses the dataset from a Parquet file.
_get_background_shapes: Generates background shapes based on class transitions.
_add_custom_legend: Adds a custom legend with event names and colors to the chart.
plot: Generates the interactive chart with class annotations and displays it using Plotly.
Example Usage:
from charts import ThreeWChart
chart = ThreeWChart(file_path="dataset/0/WELL-00001_20170201010207.parquet")
chart.plot()
Dependencies:
Pandas: For data manipulation and preprocessing.
Plotly: For generating interactive visualizations.
This PR was made by the team Black Oil Pyrates in HACKTUDO.
Description:
This PR introduces a new
ThreeWChart
class to the3W
repository, enabling the creation of interactive visualizations from 3W dataset files using Plotly. TheThreeWChart
module provides an intuitive way to display time-series data with background shapes indicating key class transitions, along with a custom legend for better event understanding.Code Overview:
ThreeWChart
class:class_mapping
: Maps class IDs to descriptive event names.class_colors
: Assigns colors to each class for visual distinction._load_data
: Loads and preprocesses the dataset from a Parquet file._get_background_shapes
: Generates background shapes based on class transitions._add_custom_legend
: Adds a custom legend with event names and colors to the chart.plot
: Generates the interactive chart with class annotations and displays it using Plotly.Example Usage:
Dependencies: