This archive is retained to ensure existing URLs remain functional. It will not contain any emails sent to this mailing list after July 1, 2024. For all messages, including those sent before and after this date, please visit the new location of the archive at https://mailman.ripe.net/archives/list/[email protected]/
[atlas] CSVQ and JSON
- Next message (by thread): [atlas] Graphs and measurements are scaled by a factor of 1000
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Dr Eberhard W Lisse
el at lisse.NA
Thu Feb 6 10:53:21 CET 2020
Hi, I wanted to look at the log file of one of the built-in measurements this morning. Never mind the pretty printing, but I found that CSVQ [1] which I use for a lot of things can read JSON :=-)-O Given a log file "atlas.json" and executing csvq -i JSON allows (line separation for readability) SELECT ROUND(AVG(`avg`),4) AS Average, \ COUNT(*) AS Records \ FROM JSON_TABLE('{}',atlas); which results in something like +---------+---------+ | Average | Records | +---------+---------+ | 0.5673 | 9556 | +---------+---------+ I also find that the jsonlite library of R allows reading of the same file. Probably not news to anyone, but I found it kind of cool. greetings, el [1] https://github.com/mithrandie/csvq -- Dr. Eberhard W. Lisse \ / Obstetrician & Gynaecologist el at lisse.NA / * | Telephone: +264 81 124 6733 (cell) PO Box 8421 \ / Bachbrecht 10007, Namibia ;____/
- Next message (by thread): [atlas] Graphs and measurements are scaled by a factor of 1000
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]