Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Export function #17

Open
hannesherold opened this issue Dec 19, 2021 · 4 comments
Open

Feature request: Export function #17

hannesherold opened this issue Dec 19, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@hannesherold
Copy link

An export function would be very useful to pass on (selected) statistics to clients or to archive them. For this purpose, it would be practical to define specific time periods for the export.

Processed and visually prepared data as in the panel would be excellent, for example in PDF format. In addition, CSV or Excel output of the raw data.

@Daandelange Daandelange added the enhancement New feature or request label Dec 19, 2021
@Daandelange
Copy link
Owner

+1 for a ranged (timespan) export in other format(s).

Related:

  • Ideally, I'd like to implement a range selector like retour-for-kirby v2 had. In the panel visualisation interface.
  • I've also been thinking about a (full) backup interface, which would be similar to this feature.

Now, what kind of data would one need to be exported ?

  • PDFs for visually archiving/presenting the stats ?
    (have you seen the individual chart download options?)
    (a quick way to have this now could be some custom CSS and print the panel to a PDF?)
    But I like the idea of presenting/compiling them in a nice way.
  • CVS for ... exporting to anything ? All raw data or specific values ? Something like in the panel table views ?

@hannesherold
Copy link
Author

A range selector in combination with print CSS styles would be very useful to generate an overview over a certain period of time, i.e. to jointly save different charts as a PDF. These PDFs could then be easily passed on to the clients (I have several projects where the clients themselves never use the panel).

It's useful to be able to download the charts individually, but what is really informative is the aggregation of different charts.

More fine-tuned features could then be to define which charts to include in the PDF (i.e. the export) and which not.

Another step could be automatic email reports with the monthly statistics.

The CSV export is probably not quite as important. The idea behind it is to make the data more accessible and flexible. But of course it's also very easy to access the SQLite database directly.

@Daandelange
Copy link
Owner

These are gorgeous ideas, thanks. They sound perfectly possible.
Maybe the email idea goes a bit far, but why not.

Meanwhile, considering the current plugin state, I have other priorities and I don't plan to implement them myself anytime soon. The issue can remain open for discussion until somebody would like to implement it.

@Daandelange
Copy link
Owner

An update on this : There is now a time span selector which allows to load more precise data in the charts, which are still saveable as PNG. This can take some time to do regularly so a more common export function could be nice.

So to sum-up there's 2 export finalities :

  1. Backup --> download the database for archival and restoration purposes.
  2. Insights --> formatted data for providing insights without using the panel.

Technically, the panel charts are html canvases rendered by chart.js and converted to data-URIs, so there's probably multiple approaches to this :

  • Styling the panel page and either:
    • Using the browser's print-->savePDF to generate a PDF with some custom CSS.
    • A frontend JS script to automatize image exports.
  • Using a PHP PDF/image generator library. (lots of work, need to re-generate the charts in php).
  • A mix of both : Archive images with a JS helper and use a PHP lib to lay-them-out in a PDF.
  • Other ?

What do you mean by « but what is really informative is the aggregation of different charts » ?
What aggregated information ? Which insights are missing compared to the ones already available ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants