This repo is the sample code for the technique described in this blog post: . The general idea is that we can create dynamically generate static visualizations for chat bots and other applications by utilizing our existing HTML/JS/CSS skillsets within the context of Headless Chrome.
To run the sample:
- Create an account with World Weather Online to get trial access to their historical weather API.
- Create a
.envfile based on the template in
.env.defaults. The file should include the World Weather Online API Key and an optional port.
To generate an image for a city, point your browser to
http://localhost:PORT/api/CITYNAME. This will fetch the data from the API and use Headless Chrome to generate a graphic using C3.js.