Hello, I am just starting out in the world of JavaScript so please be patient with me. I recently discovered the Arquero JavaScript library and I would like to incorporate it into a standalone HTML file. After reading through the documentation available on their website, it seems like this should be feasible. They provide a brief code example (shown below) that is primarily designed for use within a Node.js environment, but I am having trouble adapting it for use in a web browser. Can anyone guide me on how to structure this script in a basic HTML format?
// <script src="https://cdn.jsdelivr.net/npm/arquero@latest"></script> // This references the Arquero library
import { all, desc, op, table } from 'arquero';
// Average hours of sunshine per month, sourced from https://usclimatedata.com/.
const dt = table({
'Seattle': [69,108,178,207,253,268,312,281,221,142,72,52],
'Chicago': [135,136,187,215,281,311,318,283,226,193,113,106],
'San Francisco': [165,182,251,281,314,330,300,272,267,243,189,156]
});
// Sorted differences between Seattle and Chicago.
// Table expressions use arrow function syntax.
dt.derive({
month: d => op.row_number(),
diff: d => d.Seattle - d.Chicago
})
.select('month', 'diff')
.orderby(desc('diff'))
.print();