Ejemplo n.º 1
0
def curri_page():
    """ This is the curriculum category page. This method is used to generate the
    graphs and tables that display on this page.
    """
    # The Graph class is instantiated and assigned to the graph variable.
    graph = Graph()

    CA_distplot = graph.curri_distplot("ca_avgtone_curri_topstates",
                                       "California")
    TX_distplot = graph.curri_distplot("tx_avgtone_curri_topstates", "Texas")
    MA_distplot = graph.curri_distplot("ma_avgtone_curri_topstates",
                                       "Massachusetts")
    NY_distplot = graph.curri_distplot("ny_avgtone_curri_topstates",
                                       "New York")

    CA_html_table = graph.table_generator("ca_curri_topstates", "curriculum")
    TX_html_table = graph.table_generator("tx_curri_topstates", "curriculum")
    MA_html_table = graph.table_generator("ma_curri_topstates", "curriculum")
    NY_html_table = graph.table_generator("ny_curri_topstates", "curriculum")

    return render_template('curriculum.html',
                           CA_distplot=CA_distplot,
                           TX_distplot=TX_distplot,
                           MA_distplot=MA_distplot,
                           NY_distplot=NY_distplot,
                           CA_html_table=CA_html_table,
                           TX_html_table=TX_html_table,
                           MA_html_table=MA_html_table,
                           NY_html_table=NY_html_table)