Creates a static .html file with charts using Google Charts API
Project description
plot2html
Helping people publish beautiful automated reports that contribute to transparency, high quality monitoring and faster decision making
With this library, you can create static .html files with text and charts using Google Charts API.
On the command line:
pip install plot2html
On your python file:
import pandas as pd
from plot2html import CreateReport
rep = CreateReport("Example of plot2html Report")
rep.text("<h2>Smart title you can create</h2>This is an example what what you can do with plot2html.")
temp = pd.read_csv('https://raw.githubusercontent.com/rafatro/plot2html/main/tests/Temperature_London_Rome.csv',parse_dates=[0])
options = {'title': 'Average temperature at London and Rome',
'hAxis': {'title': 'Date'},
'vAxis': {'title': 'Average Daily Temperature (Celsius)'},
'colors': ['#a52714', '#097138']
}
rep.plot(data=temp.pivot(index='date', columns='location', values='tavg').reset_index()
,x='date'
,y=['London','Rome']
,type='line'
,width='half'
,height=400
,options=options)
rep.text('''This text is an explanation about the chart to the left.<br>
The first chart above shows data from <a href='https://meteostat.net/'>Meteostat</a>, that provides open source data about meteorology.<br>
You can see Rome temperatures follow the same trend as London's, because both cities are in the northern hemisphere, but Rome is a bit hotter, especialy on the summer.
''',width="half")
rep.exporthtml("C:/Users/rafae/Desktop/plot2html/tests/index.html")
You will get this output:
This is just the begining.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
plot2html-0.0.6.tar.gz
(4.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file plot2html-0.0.6.tar.gz.
File metadata
- Download URL: plot2html-0.0.6.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97b3e1e7c020af6eaef4b365f704309c560027ae65f353ddfcd41dcea11b98b4
|
|
| MD5 |
d7fe8506b7012f5933c94088c880f7fe
|
|
| BLAKE2b-256 |
6426afa80ab8c96229f4e2d522f8417903ac586ff9fd64acaf35a94a2ab04d02
|
File details
Details for the file plot2html-0.0.6-py3-none-any.whl.
File metadata
- Download URL: plot2html-0.0.6-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38fc814f61e232e52a04042f56848b855afd3542c8625eef5761e7228e2939f3
|
|
| MD5 |
aff600ca99db78491e44f3f84138b417
|
|
| BLAKE2b-256 |
a676f785696070b5e653f6e02470b297b5c9fa9898fe48d9d4b5d2a313072b53
|