Explore semantic data models written in malloy.
A static site for sharing data explorations.
On opening, a schema page is shown with views, dimensions and measures associated with the model sources.
Clicking on any schema item opens up Malloy Explorer with a pre-defined query to see the data for that item.
All interactions within the explorer are saved to the url so sharing a particular query/view of the model is as easy as sharing a link.
A notebook is a sequence of markdown and Malloy results that are rendered together in a single page to explain data.
- Clone the repo
git clone https://github.com/aszenz/data-explorer.git
- Look at the
models
directory, it contains example models, notebooks and data files like trading model which uses data from two csv files orders and contracts, you can add your own models, notebooks and their data files here. - Run
npm run start
to build and run the site locally athttp://localhost:3000
. - Deploy your site by copying the generated
dist
folder to any static web hosting service (like GitHub Pages, Netlify, or Vercel) or serve it using any HTTP server.
Warning
The built dist/index.html
file cannot be opened directly in the browser using the file://
protocol. You must serve it through a local web server. Navigate to the dist
directory and run one of these commands:
python -m http.server 8000
(then visit http://localhost:8000)npx serve -s . -p 8000
(then visit http://localhost:8000)
Note
To host the site under a subpath (commonly used for GitHub Pages), add the BASE_PUBLIC_PATH
environment variable when building the site.
For example, to host under https://yourusername.github.io/your-repo-name/
run:
BASE_PUBLIC_PATH=/your-repo-name/ npm run build
Then deploy the contents of the dist
folder to your GitHub Pages.
You can also look at this Github Actions File for an example of deploying to GitHub Pages.
Tip
Models can also reference data from external URLs, like the Super Store model which uses data from huggingface.