diff --git a/phase3 Dashboard/model/__init__.py b/phase3 Dashboard/model/__init__.py index 8346b49..598c893 100644 --- a/phase3 Dashboard/model/__init__.py +++ b/phase3 Dashboard/model/__init__.py @@ -316,6 +316,7 @@ def get_publisher_translator(mysql: MySQLConnection) -> pd.DataFrame: GROUP BY p.id, t.name) AS translator_counts ON p.id = translator_counts.publisher_id\ AND tp.name = translator_counts.translator_name\ GROUP BY p.name\ + HAVING MAX(translation_count) > 100\ ORDER BY book_count desc" return pandas_sql(mysql, query) @@ -336,5 +337,5 @@ def get_publisher_genres(mysql: MySQLConnection) -> pd.DataFrame: GROUP BY t.id, p.id\ ) AS max_counts ON t.id = max_counts.tag_id AND p.id = max_counts.publisher_id\ GROUP BY t.name\ - limit 20;" + HAVING MAX(book_count) >= 500" return pandas_sql(mysql, query) diff --git "a/phase3 Dashboard/pages/4\360\237\223\212_Further_analysis.py" "b/phase3 Dashboard/pages/4\360\237\223\212_Further_analysis.py" index 3aa7a02..aa71e33 100644 --- "a/phase3 Dashboard/pages/4\360\237\223\212_Further_analysis.py" +++ "b/phase3 Dashboard/pages/4\360\237\223\212_Further_analysis.py" @@ -42,14 +42,21 @@ def prepare_data(_mysqldb: MySQLConnection): labels={'book_count': 'Book Count', 'publisher_name': 'Publisher Name'}, title="Publisher Translator Book Count") st.plotly_chart(fig1, use_container_width=True) +st.markdown( + "As you can see, this plot shows the most translations by the publications which demonstrates " + "that how much did the publications preferred to translate good books except of creating them.", unsafe_allow_html=True) fig2 = px.bar(publisher_genres, x='genre_name', y='max_book_count', hover_data=['best_publisher_name'], color='max_book_count', labels={'max_book_count': 'Max Book Count', 'genre_name': 'Genre Name'}, title="Publisher Genres Max Book Count") st.plotly_chart(fig2) - -st.markdown("