You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the output for measurements is displayed in a long format. Introducing a --wide flag can reshape the output data into a wide format. This will make it easier for users to view and compare measurements for different parameters side by side.
Example (shortened for brevity)
"long" format
parameter
DATETIME_LOCAL
VALUE
no2 ppm
2023-08-29 08:00:00
0.0093
so2 ppm
2023-08-29 08:00:00
0
"wide" format that would use --wide flag
DATETIME_LOCAL
no2 ppm value
so2 ppm value
2023-08-29 08:00:00
0.0093
0
example use: openaq measurements list 2178 --from 2023-08-29 --wide
The text was updated successfully, but these errors were encountered:
Something to consider with wide format: Since the column length is variable joining between two outputs can be difficult:
e.g. consider Location A which measures PM2.5 and PM10 and Location B PM2.5, PM10, NO2 and SO2
Location A in wide format may look like:
DATETIME_LOCAL
PM2.5 value
PM10 value
2023-08-29 08:00:00
0.0093
0
while Location B may look like:
DATETIME_LOCAL
NO2 value
SO2 value
PM2.5 value
PM10 value
2023-08-29 08:00:00
1.1
1
0.93
0.0234
If I wanted to join these two CSVs (append one to the other) it would be difficult due to the difference number of columns (also the columns may not be in the same order).
This can be worked around with a static number of columns for wide for format, i.e. ALL parameters supported by OpenAQ, which would make joining two or more locations easier. The downside would obviously be LOTS of columns which LOTS of null values
Currently, the output for measurements is displayed in a long format. Introducing a
--wide
flag can reshape the output data into a wide format. This will make it easier for users to view and compare measurements for different parameters side by side.Example (shortened for brevity)
example use:
openaq measurements list 2178 --from 2023-08-29 --wide
The text was updated successfully, but these errors were encountered: