Promotion: Verbesserung der Visualiserungen und Exportfunktionen in der Systematischen Literaturrecherche; Fehlerbehebung
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
|
||||
from config_netzwerk import theme, export_fig_visual, bib_filename
|
||||
|
||||
from ci_template.plotly_template import export_figure
|
||||
from ci_template.plotly_template import export_figure as export_figure_ci
|
||||
|
||||
import os
|
||||
|
||||
@ -63,8 +63,10 @@ from config_netzwerk import (
|
||||
export_fig_visualize_languages,
|
||||
)
|
||||
|
||||
def export_figure(fig, name, flag, bib_filename=None):
|
||||
export_figure(fig, name, flag, export_fig_png)
|
||||
from config_netzwerk import export_fig_png
|
||||
|
||||
def export_figure_local(fig, name, flag, bib_filename=None):
|
||||
export_figure_ci(fig, name, flag, export_fig_png)
|
||||
|
||||
from ci_template.plotly_template import get_colors, get_plot_styles, get_standard_layout
|
||||
|
||||
@ -322,7 +324,7 @@ def visualize_network(bib_database):
|
||||
fig.update_layout(**layout)
|
||||
|
||||
fig.show(config={"responsive": True})
|
||||
export_figure(fig, "visualize_network", export_fig_visualize_network, bib_filename)
|
||||
export_figure_local(fig, "visualize_network", export_fig_visualize_network, bib_filename)
|
||||
|
||||
# Einfache Pfadanalyse nach dem Anzeigen der Figur
|
||||
if 'e-learning' in G and 'online:lernen' in G:
|
||||
@ -429,7 +431,7 @@ def visualize_tags(bib_database):
|
||||
fig.update_layout(**layout)
|
||||
|
||||
fig.show(config={"responsive": True})
|
||||
export_figure(fig, "visualize_tags", export_fig_visualize_tags, bib_filename)
|
||||
export_figure_local(fig, "visualize_tags", export_fig_visualize_tags, bib_filename)
|
||||
|
||||
# Visualisierung 3: Häufigkeit Index
|
||||
def visualize_index(bib_database):
|
||||
@ -477,7 +479,7 @@ def visualize_index(bib_database):
|
||||
fig.update_layout(**layout)
|
||||
fig.update_traces(marker=plot_styles['balken_primaryLine'])
|
||||
fig.show(config={"responsive": True})
|
||||
export_figure(fig, "visualize_index", export_fig_visualize_index, bib_filename)
|
||||
export_figure_local(fig, "visualize_index", export_fig_visualize_index, bib_filename)
|
||||
|
||||
# Visualisierung 4: Häufigkeit Forschungsunterfragen
|
||||
def visualize_research_questions(bib_database):
|
||||
@ -526,7 +528,7 @@ def visualize_research_questions(bib_database):
|
||||
fig.update_layout(**layout)
|
||||
fig.update_traces(marker=plot_styles['balken_primaryLine'])
|
||||
fig.show(config={"responsive": True})
|
||||
export_figure(fig, "visualize_research_questions", export_fig_visualize_research_questions, bib_filename)
|
||||
export_figure_local(fig, "visualize_research_questions", export_fig_visualize_research_questions, bib_filename)
|
||||
|
||||
# Visualisierung 5: Häufigkeit spezifischer Kategorien
|
||||
def visualize_categories(bib_database):
|
||||
@ -570,7 +572,7 @@ def visualize_categories(bib_database):
|
||||
fig.update_layout(**layout)
|
||||
fig.update_traces(marker=plot_styles['balken_primaryLine'])
|
||||
fig.show(config={"responsive": True})
|
||||
export_figure(fig, "visualize_categories", export_fig_visualize_categories, bib_filename)
|
||||
export_figure_local(fig, "visualize_categories", export_fig_visualize_categories, bib_filename)
|
||||
|
||||
# Zeitreihenanalyse der Veröffentlichungen
|
||||
def visualize_time_series(bib_database):
|
||||
@ -617,7 +619,7 @@ def visualize_time_series(bib_database):
|
||||
fig.update_layout(**layout)
|
||||
fig.update_traces(line=plot_styles['linie_primaryLine'])
|
||||
fig.show(config={"responsive": True})
|
||||
export_figure(fig, "visualize_time_series", export_fig_visualize_time_series, bib_filename)
|
||||
export_figure_local(fig, "visualize_time_series", export_fig_visualize_time_series, bib_filename)
|
||||
else:
|
||||
print("Keine gültigen Veröffentlichungsjahre gefunden.")
|
||||
|
||||
@ -651,7 +653,7 @@ def visualize_top_authors(bib_database):
|
||||
fig.update_layout(**layout)
|
||||
fig.update_traces(marker=plot_styles['balken_primaryLine'])
|
||||
fig.show(config={"responsive": True})
|
||||
export_figure(fig, "visualize_top_authors", export_fig_visualize_top_authors, bib_filename)
|
||||
export_figure_local(fig, "visualize_top_authors", export_fig_visualize_top_authors, bib_filename)
|
||||
else:
|
||||
print("Keine Autoren gefunden.")
|
||||
|
||||
@ -697,7 +699,7 @@ def visualize_top_publications(bib_database):
|
||||
fig.update_layout(**layout)
|
||||
fig.update_traces(marker=plot_styles['balken_primaryLine'])
|
||||
fig.show(config={"responsive": True})
|
||||
export_figure(fig, "visualize_top_publications", export_fig_visualize_top_publications, bib_filename)
|
||||
export_figure_local(fig, "visualize_top_publications", export_fig_visualize_top_publications, bib_filename)
|
||||
|
||||
##########
|
||||
|
||||
@ -829,7 +831,7 @@ def create_path_diagram(data):
|
||||
layout["autosize"] = True
|
||||
fig.update_layout(**layout)
|
||||
fig.show(config={"responsive": True})
|
||||
export_figure(fig, "create_path_diagram", export_fig_create_path_diagram, bib_filename)
|
||||
export_figure_local(fig, "create_path_diagram", export_fig_create_path_diagram, bib_filename)
|
||||
|
||||
#############
|
||||
|
||||
@ -962,7 +964,7 @@ def create_sankey_diagram(bib_database):
|
||||
layout["autosize"] = True
|
||||
fig.update_layout(**layout)
|
||||
fig.show(config={"responsive": True})
|
||||
export_figure(fig, "create_sankey_diagram", export_fig_create_sankey_diagram, bib_filename)
|
||||
export_figure_local(fig, "create_sankey_diagram", export_fig_create_sankey_diagram, bib_filename)
|
||||
|
||||
##########
|
||||
|
||||
@ -1090,7 +1092,7 @@ def visualize_sources_status(bib_database):
|
||||
layout["autosize"] = True
|
||||
fig.update_layout(**layout)
|
||||
fig.show(config={"responsive": True})
|
||||
export_figure(fig, "visualize_sources_status", export_fig_visualize_sources_status, bib_filename)
|
||||
export_figure_local(fig, "visualize_sources_status", export_fig_visualize_sources_status, bib_filename)
|
||||
|
||||
#############
|
||||
|
||||
@ -1195,7 +1197,7 @@ def visualize_languages(bib_database):
|
||||
fig.show(config={"responsive": True})
|
||||
# Tabelle ausgeben
|
||||
print(tabulate(df.sort_values("Anzahl", ascending=False), headers="keys", tablefmt="grid", showindex=False))
|
||||
export_figure(fig, "visualize_languages", export_fig_visualize_languages, bib_filename)
|
||||
export_figure_local(fig, "visualize_languages", export_fig_visualize_languages, bib_filename)
|
||||
|
||||
# Visualisierung der Verteilung von ENTRYTYPE innerhalb jeder Sprache
|
||||
def visualize_language_entrytypes(bib_database):
|
||||
@ -1297,7 +1299,7 @@ def visualize_language_entrytypes(bib_database):
|
||||
fig.update_layout(**layout)
|
||||
fig.show(config={"responsive": True})
|
||||
print(tabulate(grouped.sort_values(["Sprache", "Eintragstyp"]), headers=["Sprache", "Eintragstyp", "Anzahl", "Anteil innerhalb Sprache (%)", "Typgruppe"], tablefmt="grid", showindex=False))
|
||||
export_figure(fig, "visualize_language_entrytypes", export_fig_visualize_languages, bib_filename)
|
||||
export_figure_local(fig, "visualize_language_entrytypes", export_fig_visualize_languages, bib_filename)
|
||||
|
||||
#############
|
||||
|
||||
|
||||
Reference in New Issue
Block a user