diff --git a/app.py b/app.py index 990fc31b03e50ebcac8f0102c611a515d5e9f48e..4c28f6bb5c02284318920ee577473b72a3fd5670 100644 --- a/app.py +++ b/app.py @@ -87,6 +87,11 @@ def dontcleankeepdirty(rd_df): return rd_df rd_df=dontcleankeepdirty(rd_df) +def cleankeepdirty(rd_df): + # previously I deleted negative values, but keeping the nonesensical measurements illustrates our point. + #rd_df = rd_df.loc[sample(list(rd_df.index), 999)] + rd_df = rd_df[(rd_df["Reading_Level"] <55)] + return rd_df rd_df["Origin"] = ["ReadabilityScienceDeclining" for i in rd_df["Origin"]] @@ -269,6 +274,9 @@ def main(): ar, author_name, scraped_labels, author_score, art_df ) + df_author = df_author[(df_author["Reading_Level"] <55)] + + genre = [] genre.append("scatter plots") genre.append("tables") @@ -521,7 +529,10 @@ def main(): st.markdown("# Abstracts:") st.write(df_author) df_author_new = pd.concat([df_author, df_author_new]) + df_author_new = df_author_new[(df_author_new["Reading_Level"] <55)] + st.markdown("# Both:") + st.write(df_author_new) #show_links == "Yes"