Queries and visualization code for Mode Playbook.