db.query(`select location, date, weather from weather where location='${location}' limit 20`)
// As an alternative to the above approach using ${} within the template literal, you can also pass an array of variables as a second arg to the DatabseClient.query() method.
// This version will do any needed escaping if your variable has any tricky characters like quotes (‘“) in it. See https://observablehq.com/@observablehq/connecting-to-databases#query for more details!
db.query('select location, date, weather from weather where location=$1 limit 20',[location])
viewoflocation=select(['Seattle','New York'])
One platform to build and deploy the best data apps
Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.