Skip to content

Commit

Permalink
now it's ready to deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
muabdalaleam committed Aug 24, 2023
1 parent 557c514 commit 3116537
Show file tree
Hide file tree
Showing 17 changed files with 24 additions and 19 deletions.
Binary file modified data-analysis/Youtube gaming dashboard.pbix
Binary file not shown.
Binary file modified data-analysis/__pycache__/functions.cpython-310.pyc
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


# -------------Reading data and setting constants----------------
stacked_channels = pd.read_pickle("../Cleaned files/stacked_channels.pickle")
stacked_channels = pd.read_pickle("../cleaned-files/stacked_channels.pickle")

subs_vs_channel_name_len = pio.read_json("plots/json/subs_vs_channel_name_len_line_chart.json")
video_stats_per_tag = pio.read_json("plots/json/video_stats_per_tag.json")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

# -------------Reading data and setting constants----------------

base_games = pd.read_pickle("../Cleaned files/base_games.pickle")
stacked_games = pd.read_pickle("../Cleaned files/stacked_games_df.pickle")
base_games = pd.read_pickle("../cleaned-files/base_games.pickle")
stacked_games = pd.read_pickle("../cleaned-files/stacked_games_df.pickle")


video_stats_per_game = pio.read_json('plots/json/video_stats_per_game.json')
Expand Down
Binary file modified data-analysis/pages/__pycache__/channels_dashboard.cpython-310.pyc
Binary file not shown.
Binary file modified data-analysis/pages/__pycache__/games_dashboard.cpython-310.pyc
Binary file not shown.
Binary file modified data-analysis/pages/__pycache__/videos_dashboard.cpython-310.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion data-analysis/pages/channels_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


# -------------Reading data and setting constants----------------
stacked_channels = pd.read_pickle("../Cleaned files/stacked_channels.pickle")
stacked_channels = pd.read_pickle("../cleaned-files/stacked_channels.pickle")

subs_vs_channel_name_len = pio.read_json("plots/json/subs_vs_channel_name_len_line_chart.json")
video_stats_per_tag = pio.read_json("plots/json/video_stats_per_tag.json")
Expand Down
4 changes: 2 additions & 2 deletions data-analysis/pages/games_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

# -------------Reading data and setting constants----------------

base_games = pd.read_pickle("../Cleaned files/base_games.pickle")
stacked_games = pd.read_pickle("../Cleaned files/stacked_games_df.pickle")
base_games = pd.read_pickle("../cleaned-files/base_games.pickle")
stacked_games = pd.read_pickle("../cleaned-files/stacked_games_df.pickle")


video_stats_per_game = pio.read_json('plots/json/video_stats_per_game.json')
Expand Down
14 changes: 8 additions & 6 deletions machine-learning/.ipynb_checkpoints/app-checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@
preprocessors[processor_name] = dill.load(f)


subs_vs_channel_name_len = pio.read_json("../Data analysis/plots/json/subs_vs_channel_name_len_line_chart.json")
social_accounts_affect_on_vid_stats = pio.read_json("../Data analysis/plots/json/social_accounts_affect_on_vid_stats.json")
video_stats_per_game = pio.read_json('../Data analysis/plots/json/video_stats_per_game.json')
total_subs_vs_start_date = pio.read_json("../Data analysis/plots/json/total_subs_for_channels_per_start_date.json")
duration_vs_views = pio.read_json("../Data analysis/plots/json/desc_len_vs_views_scatter_plot.json")
subs_vs_channel_name_len = pio.read_json("../data-analysis/plots/json/subs_vs_channel_name_len_line_chart.json")
social_accounts_affect_on_vid_stats = pio.read_json("../data-analysis/plots/json/social_accounts_affect_on_vid_stats.json")
video_stats_per_game = pio.read_json('../data-analysis/plots/json/video_stats_per_game.json')
total_subs_vs_start_date = pio.read_json("../data-analysis/plots/json/total_subs_for_channels_per_start_date.json")
duration_vs_views = pio.read_json("../data-analysis/plots/json/desc_len_vs_views_scatter_plot.json")
# ============================================================


Expand Down Expand Up @@ -723,8 +723,10 @@ def get_key(val, dict):
col3.metric("AVG Views for one like", f"{np.mean(df['viewCount'] / df['likeCount']):.2f}")
col4.metric("Views count for one subscriber", f"{np.mean(df['total_views'] / df['subscribers']):.2f}")

fig = px.bar(df.sort_values(by= "likeCount"), x= "likeCount", y= "title", title="Most liked videos.", width=1600, height= 1000,
fig = px.bar(df.sort_values(by= "likeCount"), x= "likeCount", y= "title", title="Most liked videos.", width=900, height= 600,
orientation='h', labels= {"likeCount": "Likes", "title": "Video name"})

fig.update_traces(marker=dict(color='red'))

st.plotly_chart(fig)
# ============================================================
14 changes: 8 additions & 6 deletions machine-learning/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@
preprocessors[processor_name] = dill.load(f)


subs_vs_channel_name_len = pio.read_json("../Data analysis/plots/json/subs_vs_channel_name_len_line_chart.json")
social_accounts_affect_on_vid_stats = pio.read_json("../Data analysis/plots/json/social_accounts_affect_on_vid_stats.json")
video_stats_per_game = pio.read_json('../Data analysis/plots/json/video_stats_per_game.json')
total_subs_vs_start_date = pio.read_json("../Data analysis/plots/json/total_subs_for_channels_per_start_date.json")
duration_vs_views = pio.read_json("../Data analysis/plots/json/desc_len_vs_views_scatter_plot.json")
subs_vs_channel_name_len = pio.read_json("../data-analysis/plots/json/subs_vs_channel_name_len_line_chart.json")
social_accounts_affect_on_vid_stats = pio.read_json("../data-analysis/plots/json/social_accounts_affect_on_vid_stats.json")
video_stats_per_game = pio.read_json('../data-analysis/plots/json/video_stats_per_game.json')
total_subs_vs_start_date = pio.read_json("../data-analysis/plots/json/total_subs_for_channels_per_start_date.json")
duration_vs_views = pio.read_json("../data-analysis/plots/json/desc_len_vs_views_scatter_plot.json")
# ============================================================


Expand Down Expand Up @@ -723,8 +723,10 @@ def get_key(val, dict):
col3.metric("AVG Views for one like", f"{np.mean(df['viewCount'] / df['likeCount']):.2f}")
col4.metric("Views count for one subscriber", f"{np.mean(df['total_views'] / df['subscribers']):.2f}")

fig = px.bar(df.sort_values(by= "likeCount"), x= "likeCount", y= "title", title="Most liked videos.", width=1600, height= 1000,
fig = px.bar(df.sort_values(by= "likeCount"), x= "likeCount", y= "title", title="Most liked videos.", width=900, height= 600,
orientation='h', labels= {"likeCount": "Likes", "title": "Video name"})

fig.update_traces(marker=dict(color='red'))

st.plotly_chart(fig)
# ============================================================
Binary file modified machine-learning/temp/channel_name
Binary file not shown.
3 changes: 2 additions & 1 deletion machine-learning/temp/duration_in_minutes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
�K9.
�K
.
Binary file modified machine-learning/temp/duration_in_seconds
Binary file not shown.
Binary file modified machine-learning/temp/video_description
Binary file not shown.
Binary file modified machine-learning/temp/video_tags
Binary file not shown.
Binary file modified machine-learning/temp/video_title
Binary file not shown.

0 comments on commit 3116537

Please sign in to comment.