def showWordTags(country): df = loadCountry.getCountryData(country) html_graph = [showTrending.plot_tags_word_cloud(df)] return render_template("tagword.html", title=country, graph=html_graph, country=country)
def showTagCount(country): df = loadCountry.getCountryData(country) html_graph = [showTrending.plot_tags(df)] return render_template("tagCount.html", title="Tag count", graph=html_graph, analysis='', country=country)
def showPublishHour(country): df = loadCountry.getCountryData(country) desc = loadCountry.getPublishHour(country) html_graph = [showTrending.plot_publish_hours(df)] return render_template("publishHour.html", title="Publish Hour", graph=html_graph, analysis=desc, country=country)
def showTagCount(country): df = loadCountry.getCountryData(country) html_graph = [showTrending.plot_tags(df)] desc = loadCountry.getTagCounts(country) return render_template("tagCount.html", title=country, graph=html_graph, analysis=desc, country=country)
def showCategory(country): df = loadCountry.getCountryData(country) desc = loadCountry.getCategoryDesc(country) if (country == "US" or country == "MX"): html_graph = [(showTrending.plot_title(df), "cat")] else: html_graph = [(showTrending.plot_category(df), "cat")] return render_template("category.html", title="Category", graph=html_graph, analysis=desc, country=country)