Пример #1
0
# Standard imports
import os

# Local imports
from tools import createdocument

print('Started testing createdocument.py')

testDoc = createdocument.ReportDocument(file_name_prefix='report_test03_v')
testDoc.finish()
print('Finished', os.path.realpath(__file__))

print('Finished testing createdocument.py')
Пример #2
0
# -*- coding: utf-8 -*-
"""
Created on Wed Jun 17 17:51:03 2020

@author: Giovanni Guarnieri Soares
"""

import matplotlib.pyplot as plt

from tools import imcsf_covid_19, getdata, createdocument


def run(country_objs, doc):
    for obj in country_objs:
        imcsf_covid_19.make_predict(obj.df["new_cases"].to_list(),
                                    obj.location,
                                    savegraphs=False,
                                    doc=doc)


if __name__ == '__main__':
    countries = ["Brazil", "Italy"]
    obj_list = [getdata.CovidData(country=country) for country in countries]
    report = createdocument.ReportDocument()
    run(obj_list, report)
    report.finish()
    plt.show()
Пример #3
0
fig = plt.figure('Debug-Plateau', figsize=(10, 6), dpi=80)
plt.plot(time_series, color='red', linewidth=2, marker='s', label='A')
plt.axvline(left_border,
            color='lightblue',
            linestyle='-.',
            label='Plateau_left')
plt.axvline(right_border,
            color='darkblue',
            linestyle='-.',
            label='Plateau_right')
plt.hlines(tau,
           left_border,
           right_border,
           color='green',
           linestyle='--',
           label='tau')
plt.legend(loc='upper left')
plt.grid()
plt.xlabel("Index")
plt.ylabel("Aggregated Time Series")
plt.draw()

doc = createdocument.ReportDocument(title='Here is a title',
                                    file_name_prefix='report_test02_v',
                                    user_name='Test Function')
doc.add_heading("Here is an example level 3 header", level=3)
doc.add_paragraph("Here is the figure:")
doc.add_fig()
print("Figure added to", doc.file_name)
doc.finish()