joshdavham commited on
Commit
a0b2145
·
1 Parent(s): bf77912

create basic streamlit app

Browse files
Files changed (2) hide show
  1. app.py +27 -0
  2. requirements.txt +6 -0
app.py ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import numpy as np
3
+ import pandas as pd
4
+ import matplotlib.pyplot as plt
5
+
6
+ st.title("CIJ by the numbers")
7
+
8
+ st.markdown("[Comprehensible Japanese (CIJ)](https://cijapanese.com/) is a \
9
+ video platform for learning Japanese.")
10
+
11
+ df = pd.read_csv("stats.tsv", sep="\t")
12
+
13
+ # Plot the WPM histogram
14
+ levels = list(df['level'].unique())
15
+ colors = ['red', 'green', 'blue', 'yellow']
16
+
17
+ fig, ax = plt.subplots()
18
+
19
+ for level, color in zip(levels, colors):
20
+ subset = df[df['level'] == level]
21
+ ax.hist(subset['wpm'], bins=10, edgecolor='black', color=color, alpha=0.5, label=f"Level {level}")
22
+
23
+ ax.legend(title="Level")
24
+ ax.set_xlabel("WPM")
25
+ ax.set_ylabel("Frequency")
26
+
27
+ st.pyplot(fig)
requirements.txt CHANGED
@@ -5,14 +5,19 @@ cachetools==5.5.0
5
  certifi==2024.8.30
6
  charset-normalizer==3.3.2
7
  click==8.1.7
 
 
 
8
  gitdb==4.0.11
9
  GitPython==3.1.43
10
  idna==3.10
11
  Jinja2==3.1.4
12
  jsonschema==4.23.0
13
  jsonschema-specifications==2023.12.1
 
14
  markdown-it-py==3.0.0
15
  MarkupSafe==2.1.5
 
16
  mdurl==0.1.2
17
  narwhals==1.8.1
18
  numpy==2.1.1
@@ -23,6 +28,7 @@ protobuf==5.28.2
23
  pyarrow==17.0.0
24
  pydeck==0.9.1
25
  Pygments==2.18.0
 
26
  python-dateutil==2.9.0.post0
27
  pytz==2024.2
28
  referencing==0.35.1
 
5
  certifi==2024.8.30
6
  charset-normalizer==3.3.2
7
  click==8.1.7
8
+ contourpy==1.3.0
9
+ cycler==0.12.1
10
+ fonttools==4.53.1
11
  gitdb==4.0.11
12
  GitPython==3.1.43
13
  idna==3.10
14
  Jinja2==3.1.4
15
  jsonschema==4.23.0
16
  jsonschema-specifications==2023.12.1
17
+ kiwisolver==1.4.7
18
  markdown-it-py==3.0.0
19
  MarkupSafe==2.1.5
20
+ matplotlib==3.9.2
21
  mdurl==0.1.2
22
  narwhals==1.8.1
23
  numpy==2.1.1
 
28
  pyarrow==17.0.0
29
  pydeck==0.9.1
30
  Pygments==2.18.0
31
+ pyparsing==3.1.4
32
  python-dateutil==2.9.0.post0
33
  pytz==2024.2
34
  referencing==0.35.1