nataliaElv commited on
Commit
fe06679
1 Parent(s): e8df381

Could of words

Browse files
Files changed (2) hide show
  1. app.py +10 -3
  2. requirements.txt +3 -1
app.py CHANGED
@@ -1,8 +1,8 @@
1
  import streamlit as st
2
  import pandas as pd
3
  from github import Github
4
- from datetime import datetime, timedelta
5
- import time
6
 
7
  g = Github(st.secrets["ACCESS_TOKEN"])
8
  repo = g.get_repo(st.secrets["REPO_NAME"])
@@ -123,7 +123,14 @@ with col1:
123
 
124
  ## Dataframe: Number of open bugs ordered by date
125
 
126
- # ## Cloud of words: Issue titles and description
 
 
 
 
 
 
 
127
 
128
  # # Community engagement
129
  st.header("Community engagement")
 
1
  import streamlit as st
2
  import pandas as pd
3
  from github import Github
4
+ from wordcloud import WordCloud
5
+ import matplotlib.pyplot as plt
6
 
7
  g = Github(st.secrets["ACCESS_TOKEN"])
8
  repo = g.get_repo(st.secrets["REPO_NAME"])
 
123
 
124
  ## Dataframe: Number of open bugs ordered by date
125
 
126
+ ## Cloud of words: Issue titles
127
+ with col2:
128
+ st.subheader("Word cloud of issue titles")
129
+ wordcloud = WordCloud(width=800, height=400, background_color="white").generate(" ".join(open_issues["Issue"]))
130
+ plt.figure(figsize=(10, 5))
131
+ plt.imshow(wordcloud, interpolation="bilinear")
132
+ plt.axis("off")
133
+ st.pyplot(plt)
134
 
135
  # # Community engagement
136
  st.header("Community engagement")
requirements.txt CHANGED
@@ -1,3 +1,5 @@
1
  pandas
2
  pygithub
3
- datetime
 
 
 
1
  pandas
2
  pygithub
3
+ datetime
4
+ wordcloud
5
+ matplotlib