Skip to content

Instantly share code, notes, and snippets.

@boertel
Created August 1, 2016 17:03
Show Gist options
  • Save boertel/68343a5967052dd7532eeeadf450d48b to your computer and use it in GitHub Desktop.
Save boertel/68343a5967052dd7532eeeadf450d48b to your computer and use it in GitHub Desktop.
charts = [
{
'key': 'foresults',
'title': 'Top Air Origins',
},
{
'key': 'horesults',
'title': 'Top Hotel Origins',
},
{
'key': 'hdresults',
'title': 'Top Hotel Destinations',
},
{
'key': 'fsresults',
'title': 'Alternate Searched Air Destinations',
},
{
'key': 'fbresults',
'title': 'Alternate Booked Air Destinations',
},
{
'key': 'hsresults',
'title': 'Alternate Searched Hotel Destinations',
},
{
'key': 'hbresults',
'title': 'Alternate Booked Hotel Destinations',
},
]
start = 53
for definition in charts:
chart = create_chart(results.get(definition['key']), start, definition['title'])
worksheet.insert_chart('D%s' % start, chart)
columns = 'A%(row)s:B%(row)s' % {'row': (start - 2)}
worksheet.merge_range(columns, definition['title'], merge_format)
start += 27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment