Skip to content

Instantly share code, notes, and snippets.

@xiejiangzhi
Last active May 14, 2022 12:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xiejiangzhi/ce35a031ba60d7a6baba0eff97f4a497 to your computer and use it in GitHub Desktop.
Save xiejiangzhi/ce35a031ba60d7a6baba0eff97f4a497 to your computer and use it in GitHub Desktop.
output('r = 1')
get_remote_data('https://raw.githubusercontent.com/curran/data/gh-pages/worldFactbook/GDPPerCapita.csv', (csv_str) => {
let vals = [];
for (l of Papa.parse(csv_str).data) {
vals.push(l[1])
}
Calc.setExpression({
id: 'mytable',
type: 'table',
columns: [{ latex: 'x', values: vals }, { latex: 'x * 0.5' }]
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment