Issue 1460 export results as parquet format#1487
Conversation
…ue_1460_export_results_as_parquet_format # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
|
Thanks @samuelafolabi looks good, I will review it tomorrow. |
vincentvanhees
left a comment
There was a problem hiding this comment.
Code looks great Samuel, only a few comments below. My main concern is an error message I get when I test it on one of my files (Axivity cwa).
I am only using GGIR defaults parameter values and save_dashboard_parquet = TRUE.
GGIR(
datadir = datadir,
outputdir = outputdir,
overwrite = TRUE,
mode = 1:5,
do.report = c(2, 4, 5),
save_dashboard_parquet = TRUE
)
which results in error
Error: Invalid: Can only convert data frames to Struct type
I think the error originates around line 174 in write_parquet.R, where the nested epoch-level time series are attached as a list-column. From that point onward arrow::arrow_table(consolidated) is no longer possible.
@vincentvanhees Thank you for reveiwing. Is it possible you share some files with me so I could rigorously test before tagging you to the PR again? Thanks once again. |
Yea, thanks for the heads-up. I saw the recent commits. I'll pull them in before I make these fixes. |
No problem, I have sent you an email with the link. |
Improve dashboard parquet generation by hardening epoch merge behavior and filename-to-ID matching for edge-case recordings, preventing Arrow struct conversion failures. Add and refine .Rd docs for parquet export helpers (including author info and dashboard privacy-focused usage note), and align documentation style with GGIR conventions.
…_export_results_as_parquet_format
vincentvanhees
left a comment
There was a problem hiding this comment.
Thanks, all looks better now. A few more comments.
Please also update the NEWS.md file in the root of the repository. As you will see there is a block for GGIR version 3.3-? at the top of that file to reflect the upcoming release. Please add a line to this block. For example:
- Functionality added to save all key output to one parquet file per person. #1460
where the #1460 is my way of tracking the GitHub item an update corresponded to.
Oh yes! I had plans of reading the comment section of the issue over again after the PR is merged. I assumed it would help reinforce my understanding of things and avoid making similar mistakes in future. Then the issue could be manually closed after that. @vincentvanhees |
|
@vincentvanhees I have made the fixes required. Should have done it earlier but I have been under the weather. Kindly review. Please let me know if there are any other things needed to be done. I also noticed you just made a release some hours ago. I pulled the latest changes in from main and created a new section in the NEWS.md file titled "# CHANGES IN GGIR VERSION 3.3-", since my new updates could only possibly get pushed with the next release. |
|
Thanks @samuelafolabi, as you can see the checks failed. Let me know if you need any help fixing this: No problem regarding your speed of work, I have also been quite busy myself. In terms of next steps: How is the dashboard progressing? Are you planning to make it public? We can also email about this. |
|
Ah! Thank you, I see it. I think it is something I can fix. I'll let you know if otherwise. The dashboard is progressing well; and yes, I am making it public. I'll send you a progress report ASAP. |
|
Hello @vincentvanhees. Fixed it. I reproduced the main GitHub Actions checks locally. I was only left with this warning and a note (Find attached image) after fixing. I guess it should pass now.
|
vincentvanhees
left a comment
There was a problem hiding this comment.
Looks great @samuelafolabi
Thanks for adapting the code to store the parquet files in a separate directory.


Fixes #1460
This PR adds a new parameter save_dashboard_parquet to GGIR that allows users to export a consolidated, web dashboard-ready Parquet file from the GGIR output CSVs.
Checklist before merging:
inst/NEWS.Rdwith a user-readable summary. Please, include references to relevant issues or PR discussions.DESCRIPTION,zenodo.json, andinst/CITATIONfiles.If NEW GGIR parameter(s) were added then these NEW parameter(s) are:
man/GGIR.RdR/load_params.RR/check_params.Rvignettes/GGIRParameters.Rmdwith references to the GGIR parts the parameter is used in.