예제 #1
0
def generate_report_byquarter(year, quarter, type):
    data = data_report.get_data_report_topowner_per_quarter(year, quarters_to_months(quarter), get_type(type))
    title = 'Top contributor {} {} {}'.format(type ,year, quarter.upper())
    return render_template('top_contributor.htm', title=title, data=(data))
예제 #2
0
def generate_reportTopViewed_byquarter(year, quarter, type):
    data = data_report.get_data_report_topViewed(year, quarters_to_months(quarter), get_type(type))
    title = 'Top viewed {} {} {}'.format(type ,year, quarter.upper())
    return render_template('top_report.htm', title=title, data=(data))
예제 #3
0
def generate_report_byquarter(factor, year, quarter, type):
    data = data_report.get_data_report_regions(year, quarters_to_months(quarter), get_type(type), factor)
    data = processor_data.calculate_percents(data)
    title = '{} {} {} {}'.format(factor, type, year, quarter.upper())
    return render_template('factor_report.htm', title=title, data=data, factor=factor)
예제 #4
0
def generate_report_byquarter(year, quarter):
    data = data_report.get_data_report_per_quarter(year, quarters_to_months(quarter))
    title = 'Articles with Infographics {} {}'.format(year, quarter.upper())
    return render_template('infographic_publications.htm', title=title, data=(data))
예제 #5
0
def generate_report_byquarter(year, quarter, type):
    data = data_report.get_data_report__number_views_per_quarter(year, quarters_to_months(quarter), get_type(type))
    transformed_data = processor_data.process_data(data)
    transformed_data.title = '{} number of views % {} {}'.format(type, quarter.upper(), year)
    transformed_data.column_names = type_column_names[get_type(type)]
    return render_template('number_of_views.htm', transformed_data=transformed_data)