openaq / openaq-cli

OpenAQ command line interface
MIT License
3 stars 0 forks source link

nothing in `parameters` column for `countries list --mini` #32

Open majesticio opened 1 year ago

majesticio commented 1 year ago

eg openaq countries list --mini has no values in the parameters columns. Could possibly drop the parameters column?

russbiggs commented 1 year ago

This is blank in both the mini output and the full output. The issue is a long vs wide format issue, since the parameters array is made up of objects e.g. :

{
"id": 1,
"name": "pm10",
"units": "µg/m³",
"displayName": null
}

For the mini output something like like

parameters : "pm10 µg/m³, pm25 µg/m³"

but for csv output we must have the quotes to escape the commas so they aren't interpreted as new columns. Quote escaping is handled really inconsistently by different spreadsheet/libraries so definitely a little brittle.

I'm open to ideas our to best display the "full" parameter version and how to handle in the mini form

majesticio commented 1 year ago

Perhaps we could use | or ; as delimiter

russbiggs commented 1 year ago

@majesticio you can go ahead and tackle this issue in the "table" output. We can hold off on how to handle the nested issues for --csv. Please open a separate issue for this specific to --csv and we can track its progress and ideas there