Lysis offers simple way to create visual analysis from CSV file using Google charts. This tool was created to more easily visualize Google Form's responses. Google offers a summary of responses, but it doesn't cover every aspect of answers.
Lysis turns this
class Analysis(analysis.Analysis):
"""Pizza survey
Opinions of pizza
"""
@draw
def pizza_likers_haters_pie(self, rows):
"""Pizza likers/haters ratio pie chart
Who likes pizza and who doesn't
"""
counter = Counter(row[1] for row in rows)
headers = [['Answer', 'Count']]
return {
'chart': 'PieChart',
'data': headers + [(x, y) for x, y in counter.items()]
}
To this:
It produces HTML file which will show all charts created by analysis methods. You can use any chart type that Google supports. If want something else than charts, just customize render function.
Template which produces the output is very minimal, it can easily be edited to suit your needs.
First install Python and [pip](http://en.wikipedia.org/wiki/Pip_(package_manager\)).
Then run:
pip install -r requirements.txt
-
Create your data analyzing methods to
youranalysis.py
file. -
Run
python main.py data.csv
-
Open
output/index.html
to see the analytics
Check examples in examples
directory. Get started with simple-pizza example!
Charts are customizable by adding key options
to dict which is returned by analysis method. For example all available options for pie chart is listed in Google's documentation.
Labels in HTML are extracted from docstrings in Analysis class' and its methods.