Skip to content

D68c — The front page is /, grouped by pack; the database page is its tables

  • Status: Accepted — amends D54 (where the front page is shown, and how it is laid out)
  • Date: 2026-11-15
  • Origin: browsing the UK graph in Datasette: / and /graph showed the same page
  • Area: surfaces

Decision

  • The front page is the home page. In Datasette, that is / for kg views browse and /data/ on a hosted peer.
  • It is titled by the graph's own title (D68).
  • "What it holds" gives one heading per pack in use: the first sentence of the pack's description, or "Shared by every pack" for a pack without one.
  • Under each heading come the pack's types, with their counts, breakdowns, totals and most-connected entities, and then the scopes that track them, as "Tracked: — N : ". The separate "Being tracked" section is gone.
  • Packs with tracked scopes come first, being what the graph is for; then the pack holding the most.
  • The database page (/graph) is the tables. Its description is one line: "The tables and views behind . Start from the front page…", linking back. Datasette then lists the tables, views and saved questions.</li> <li><strong><code>kg views export</code> writes the same <code>metadata.json</code>,</strong> so an exported file opened in Datasette reads the same way.</li> </ul> <h2 id="why">Why<a class="headerlink" href="#why" title="Permanent link">¶</a></h2> <ul> <li><strong>One page shown twice made <code>/graph</code> a dead end,</strong> and a reader had no way to tell the two apart.</li> <li><strong>A flat list of types read as one domain.</strong> A graph built on several packs (data centres, plus the politicians who voted on them) needs to say which types belong together, and which scopes follow which.</li> <li><strong>Ordering by count put the politics pack first on the UK graph.</strong> That graph is about data centres; the 1,112 people came in only because they voted on them.</li> </ul> <h2 id="rejected-alternatives">Rejected alternatives<a class="headerlink" href="#rejected-alternatives" title="Permanent link">¶</a></h2> <ul> <li><strong>Redirecting <code>/graph</code> to <code>/</code>:</strong> Datasette's own table list is the way into every table, the hidden internals aside, and a reader running SQL needs it.</li> <li><strong>Template overrides:</strong> D54 kept the pages to metadata, so that any Datasette reading an exported file shows them the same way. That still holds.</li> </ul> </article> </div> <script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script> </div> <button type="button" class="md-top md-icon" data-md-component="top" hidden> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8z"/></svg> Back to top </button> </main> <footer class="md-footer"> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-copyright"> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"annotate": null, "base": "../..", "features": ["navigation.sections", "navigation.top", "search.suggest", "content.code.copy"], "search": "../../assets/javascripts/workers/search.2c215733.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": null}</script> <script src="../../assets/javascripts/bundle.d7400e89.min.js"></script> </body> </html>