Skip to content

Commit

Permalink
Create data_visualization.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored May 10, 2024
1 parent 6972938 commit 7fb3d57
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions data_analytics/data_visualization.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import plotly.express as px

class DataVisualization:
def __init__(self, data):
self.data = data

def visualize_data(self):
# Create interactive dashboards
fig = px.scatter(self.data, x='amount', y='frequency', color='cluster')
fig.show()

fig = px.histogram(self.data, x='transaction_type', nbins=20)
fig.show()

fig = px.box(self.data, x='cluster', y='amount')
fig.show()

0 comments on commit 7fb3d57

Please sign in to comment.