Skip to content

Flexible json converter #20

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Flexible json converter #20

wants to merge 10 commits into from

Conversation

emprzy
Copy link
Contributor

@emprzy emprzy commented Jun 24, 2025

This pull request:

  • Introduces a script (json_converter.py) that converts, validates, and saves .csv files to the RespiLens JSON format
  • Extracts metadata building (metadata_builder.py) and saving (save_respilens_data.py) functionality from process_cdc_data.py to be available as scripts in the RespiLens/scripts/ directory
  • Creates scripts/schemas/location-metadata.schema.json and scripts/schemas/respilens-data.schema.json JSON schema files, to use for validating location metadata and RespiLens data
  • A README.md file in the scripts/ directory, for useful info on how to utilize the scripts

This would address issues #11 and #12.

@jcblemai I have other notes and questions, but those would be easier to address in a call.

emprzy added 10 commits June 6, 2025 15:14
CSV portion finished, json portion not yet started
Unfinished, untested
json converter actually unfinished
Remove json->json conversion pipeline, add json schemas as separate files, extract saving function from CDC data downloader to be available universally
Add option to not re-build metadata, move schemas into their own folder
`save_data()` previously would overwrite files in a directory if it received a new file with the same name. This addition blocks it from doing so and alerts users without failing the script.
Extra logic for `json_converter.py`, a logging context manager for `json_converter.py`, small helper function changes, and a `README.md` in the `scripts/` directory for guides on how to use the scripts
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.

1 participant