taishi-i commited on
Commit
b9ed42e
1 Parent(s): 129744f

update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py CHANGED
@@ -1,4 +1,5 @@
1
  import json
 
2
 
3
  import altair as alt
4
  import japanize_matplotlib
@@ -260,6 +261,21 @@ def main():
260
  ax.axis("off")
261
  st.pyplot(fig, use_container_width=True)
262
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
263
  with col2:
264
  if selected_source_type == "GitHub":
265
  vs_type = "stargazers_count"
 
1
  import json
2
+ from collections import Counter
3
 
4
  import altair as alt
5
  import japanize_matplotlib
 
261
  ax.axis("off")
262
  st.pyplot(fig, use_container_width=True)
263
 
264
+ if selected_source_type == "GitHub":
265
+ all_languages = [
266
+ language
267
+ for languages_list in df["languages"]
268
+ for language in languages_list
269
+ ]
270
+ language_counts = Counter(all_languages)
271
+ language_df = pd.DataFrame(
272
+ language_counts.items(), columns=["Language", "Count"]
273
+ )
274
+ language_df = language_df.sort_values(by="Count", ascending=False)
275
+
276
+ st.markdown("### Language Usage Table")
277
+ st.dataframe(language_df)
278
+
279
  with col2:
280
  if selected_source_type == "GitHub":
281
  vs_type = "stargazers_count"