{
"source": <<!https://raw.githubusercontent.com/datasets/gdp/master/data/gdp.csv>> as gdp,
"bot5GDPs": ```select \* from "$gdp"
where year in (select max(year) from "$gdp")
order by value desc
limit 5;```
}
It would be better to convert the SQL request to JSON on the backend, already sorted, and return the table as just data. The raw query with variables in the string gives me bad PHP flashbacks.
One (artificial) example is the second one that does a join on a csv file hosted one place and a json file hosted somewhere else. Essentially, a lot of data exploration comes down to “fetch data from these locations, transform the structure in various ways, and maybe run some sql on the result.” KSON is basically a declarative way to do that. Another in the long line of code-> data transformations.
It would be better to convert the SQL request to JSON on the backend, already sorted, and return the table as just data. The raw query with variables in the string gives me bad PHP flashbacks.