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("
Publisher's Same Books Correlation
", unsafe_allow_html=True) +st.markdown( + "As you can see, this plot shows the most common genres which are printed by the publications which absolutely " + "shows the demand of the buyers.", + unsafe_allow_html=True) +st.markdown("
Publisher's Same Books Correlation
", + unsafe_allow_html=True) df = get_number_of_books_published_by_pubs(mysqldb) net = Network() @@ -63,3 +70,6 @@ def prepare_data(_mysqldb: MySQLConnection): with open("network.html", "r") as f: network_html = f.read() st.components.v1.html(network_html, width=800, height=600) +st.markdown( + "As you can see, this graph shows the correlations between different publications. The correlation depends on the thickness of the edges between the nodes; the thicker the edge, the stronger the correlation. For instance, the \"Neyestan\" publication has a strong correlation with the \"Bonyad NahjolBalagheh\" publication, as they are both considered Persian Islamic religious publications.", + unsafe_allow_html=True)