Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New charts.py module for easy and interactive data visualization #122

Open
wants to merge 11 commits into
base: cosmetic_improvements
Choose a base branch
from

Conversation

yantavares
Copy link

@yantavares yantavares commented Oct 13, 2024

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.

@ricardoevvargas
Copy link
Collaborator

Hello, @yantavares.

Thank you for submitting this PR.

Over the last few weeks, we have been concentrating on the necessary steps to add to the 3W Dataset some types of undesirable events that occur during the well drilling stage. We believe that this increase (planned for the coming months) will promote significant progress in the 3W Project.

We intend to evaluate this and the other open PRs over the next few days.

Once again, thank you for submitting this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants