Skip to content

Download the readout as a PDF report and an XLSX workbook - #85

Draft
aivanchenk wants to merge 2 commits into
mainfrom
feat/download-plots
Draft

Download the readout as a PDF report and an XLSX workbook#85
aivanchenk wants to merge 2 commits into
mainfrom
feat/download-plots

Conversation

@aivanchenk

@aivanchenk aivanchenk commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Closes #69.

Guide

Open the map, click any pixel, wait for the time series to finish loadin and click download. The button is disabled until the series is loaded, shows Preparing… while the export runs, and surfaces a short message underneath if it fails.

image

One click gives you two files, named off the same stem so they sort next to each other:

File What it is
..._2025-12-31.pdf A one page A4 report: title, selection facts, map preview, both plots, colour legend, basemap attribution. The thing you send a colleague or paste into notes.
…_2025-12-31.xlsx The raw hourly numbers for that pixel, plus a provenance sheet. The thing you replot in Python, R or Excel.
image image

Known limitations

  • The fingerprint in the PDF renders in its default state, full window with day on the x axis. Mirroring the panel's transpose and year toggles means lifting state out of FingerprintPlot, deferred as an easy follow-up.
  • Plots are rasterised into the PDF, not embedded as vectors. svg2pdf.js would do it, deliberately out of scope here.
  • The export covers the selected pixel, not the surrounding 40x40 patch.

Anastasiia Ivanchenko added 2 commits August 26, 2026 22:16
The PDF's map preview was read back off the live canvas, which printed
whatever the user happened to be looking at: a dark globe tilted off its
axis lands in an A4 report as a black sphere on a white page. Render a
dedicated offscreen map instead, always plan view, always the light
basemap, always framed on the selected cell, at a fixed pixel ratio so
the print resolution does not depend on the display.

Collapse the PDF/CSV/XLSX menu into a single Download button. The two
files answer different questions and are wanted together, so choosing
between them was a step with no decision in it. CSV goes: the workbook
carries the same rows with real date cells and provenance on its own
sheet.

Also:
- Give both plots a height prop so the export stage renders them taller
  than the 220px sidebar, filling the page's content width.
- Retry transient chunk fetches. One coordinate fans out into many
  requests and a single flaky one failed the whole series.
- Move the facts block above the history slider and chart.
@github-actions

Copy link
Copy Markdown

🚀 Vercel preview deployed

Preview URL: https://earth-prints-5a3txtu99-anastasiia-s-projects10.vercel.app

@aivanchenk

Copy link
Copy Markdown
Collaborator Author

@lazarusA need your feedback on pdf and excel files. How do scientists from your department will use it and what format do they prefer? Would you be able to share some examples?

@aivanchenk
aivanchenk requested a review from lazarusA August 26, 2026 19:49
@lazarusA

lazarusA commented Aug 26, 2026

Copy link
Copy Markdown
Member

in addition to excel files, it would be good also to provide

  • a csv file
  • individual images png (jpeg maybe also, pdf if possible [not sure about this one]) of
    • fingerprints
    • timeseries (optional).

@aivanchenk

Copy link
Copy Markdown
Collaborator Author

@lazarusA should we give an option for users to choose how they'd like to download, or provide a single zip archive for all items? In my opinion zip would be better

@lazarusA

Copy link
Copy Markdown
Member

indeed, let's not give many options, probably for now doing zip will be fine. We adapt later if feedback is not very positive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add options to save / download plots

2 participants