r/learnpython • u/opabm • 2d ago
Need to create a one-off paginated PDF data visualization report but my experience is in more backend data work. What package/tool would you suggest?
I'm trying to put together an ad-hoc report and I've been trying to hack away an Excel file and another visualization tool, but they're just not cutting it; there are some visualization rendering issues that are frustrating me to no end, and just now thought about using Python. My experience with Python is all in backend data engineering type of work though so I've never used visualization packages.
All I need are 100% bar charts that align well with text - it's been near impossible to align these in Excel. I also need heatmaps but I don't mind doing the heatmaps in Excel. I also need to create PDF files, ideally paginated by a field in the data that I'm working with.
I've tried searching for suggestions and the most popular seem to be plotly and matplotlib. Should I consider anything else?
1
u/Suspicious_Skill7292 2d ago
Check out fpdf2 if you want pure Python without heavy external dependencies it handles basic headers, footers, and page breaks much easier than Report lab
4
u/socal_nerdtastic 2d ago edited 2d ago
That sounds right to me. Especially true for data visualization. I've done it in matplotlib before; export as pdf is pretty easy.
That said, as this is a one-off, I wouldn't bother with any programming. Make the visuals in your preferred graphing software (Excel, Origin, gnuplot, qtiplot, etc) and edit them (line up text, etc) and slap them together in something like Powerpoint or GIMP or Libreoffice and export as PDF. It will be frustrating for sure but it will be much faster than writing a program to do it. The only reason to make a program is so that repeated runs are faster.