garage44.eu/jeroen/cartopolis

logclone: git clone https://garage44.eu/jeroen/cartopolis.git

.. /docs/mockups/stats/v2-community.html

raw

<!doctype html>
<html lang="en"><head><meta charset="utf-8"><title>Cartopolis stats — v2, a community's numbers</title><link rel="stylesheet" href="style.css"></head>
<body>
<svg width="0" height="0" style="position:absolute">
<symbol id="hash" viewBox="0 0 24 24"><path d="M5 9h14M4 15h14M10 3 8 21M16 3l-2 18"/></symbol>
<symbol id="lock" viewBox="0 0 24 24"><rect x="5" y="11" width="14" height="10" rx="2"/><path d="M8 11V8a4 4 0 0 1 8 0v3"/></symbol>
<symbol id="search" viewBox="0 0 24 24"><circle cx="11" cy="11" r="7"/><path d="m20 20-4-4"/></symbol>
<symbol id="head" viewBox="0 0 24 24"><path d="M4 15v-3a8 8 0 0 1 16 0v3"/><rect x="3" y="14" width="4" height="6" rx="1.5"/><rect x="17" y="14" width="4" height="6" rx="1.5"/></symbol>
<symbol id="video" viewBox="0 0 24 24"><rect x="3" y="6" width="13" height="12" rx="2"/><path d="m16 10 5-3v10l-5-3"/></symbol>
<symbol id="mic" viewBox="0 0 24 24"><rect x="9" y="3" width="6" height="11" rx="3"/><path d="M5 11a7 7 0 0 0 14 0M12 18v3"/></symbol>
<symbol id="screen" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="12" rx="2"/><path d="M8 20h8M12 16v4"/></symbol>
<symbol id="pin" viewBox="0 0 24 24"><path d="M12 21s-6-5.5-6-11a6 6 0 0 1 12 0c0 5.5-6 11-6 11z"/><circle cx="12" cy="10" r="2.2"/></symbol>
<symbol id="chat" viewBox="0 0 24 24"><path d="M4 5h16v11H9l-5 4z"/></symbol>
<symbol id="globe" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/><path d="M3 12h18M12 3c3 3.2 3 14.8 0 18M12 3c-3 3.2-3 14.8 0 18"/></symbol>
<symbol id="plus" viewBox="0 0 24 24"><path d="M12 5v14M5 12h14"/></symbol>
<symbol id="at" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4"/><path d="M16 12v1.5a2.5 2.5 0 0 0 5 0V12a9 9 0 1 0-4 7.5"/></symbol>
<symbol id="smile" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/><path d="M8.5 14.5a4.5 4.5 0 0 0 7 0M9 9.5h.01M15 9.5h.01"/></symbol>
<symbol id="thread" viewBox="0 0 24 24"><path d="M5 4h14v9H11l-4 3v-3H5z"/><path d="M9 20h6l3 2v-2"/></symbol>
<symbol id="build" viewBox="0 0 24 24"><path d="M4 21V8l8-5 8 5v13M9 21v-6h6v6M3 21h18"/></symbol>
<symbol id="users" viewBox="0 0 24 24"><circle cx="9" cy="8" r="3.5"/><path d="M2.5 20a6.5 6.5 0 0 1 13 0M16 4.5a3.5 3.5 0 0 1 0 7M18 14a6 6 0 0 1 3.5 6"/></symbol>
<symbol id="eye" viewBox="0 0 24 24"><path d="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z"/><circle cx="12" cy="12" r="3"/></symbol>
<symbol id="arrow" viewBox="0 0 24 24"><path d="M5 12h14M13 6l6 6-6 6"/></symbol>
<symbol id="x" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6 6 18"/></symbol>
<symbol id="bell" viewBox="0 0 24 24"><path d="M6 16V11a6 6 0 0 1 12 0v5l2 2H4z"/><path d="M10 21h4"/></symbol>
<symbol id="cube" viewBox="0 0 24 24"><path d="M12 3 4 7.5v9L12 21l8-4.5v-9z"/><path d="M4 7.5 12 12l8-4.5M12 12v9"/></symbol>
<symbol id="walk" viewBox="0 0 24 24"><circle cx="13" cy="4.5" r="2"/><path d="M10 21l2-6-3-3 1-5 4 3 3 1M12 15l3 2 1 4M10 7l-3 2-1 3"/></symbol>
<symbol id="clock" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/></symbol>
<symbol id="door" viewBox="0 0 24 24"><path d="M5 21V3h11v18M3 21h16M13 12h.01"/></symbol>
<symbol id="grid" viewBox="0 0 24 24"><rect x="3" y="3" width="8" height="8" rx="1.5"/><rect x="13" y="3" width="8" height="8" rx="1.5"/><rect x="3" y="13" width="8" height="8" rx="1.5"/><rect x="13" y="13" width="8" height="8" rx="1.5"/></symbol>
<symbol id="note" viewBox="0 0 24 24"><path d="M5 3h10l4 4v14H5z"/><path d="M14 3v5h5M8 13h8M8 17h5"/></symbol>
<symbol id="hand" viewBox="0 0 24 24"><path d="M8 13V5.5a1.5 1.5 0 0 1 3 0V12M11 11V4.5a1.5 1.5 0 0 1 3 0V12M14 11.5V6a1.5 1.5 0 0 1 3 0v8c0 4-2.5 7-6.5 7S5 18 4 15l-1.5-3.5a1.5 1.5 0 0 1 2.6-1.4L8 13"/></symbol>
<symbol id="moon" viewBox="0 0 24 24"><path d="M20 14.5A8 8 0 1 1 9.5 4 6.5 6.5 0 0 0 20 14.5z"/></symbol>
<symbol id="cal" viewBox="0 0 24 24"><rect x="3" y="5" width="18" height="16" rx="2"/><path d="M3 10h18M8 3v4M16 3v4"/></symbol>
<symbol id="shield" viewBox="0 0 24 24"><path d="M12 3 5 6v6c0 4.5 3 7.7 7 9 4-1.3 7-4.5 7-9V6z"/><path d="m9 12 2 2 4-4"/></symbol>
<symbol id="chev" viewBox="0 0 24 24"><path d="m9 6 6 6-6 6"/></symbol>
<symbol id="back" viewBox="0 0 24 24"><path d="m15 6-6 6 6 6"/></symbol>
<symbol id="home" viewBox="0 0 24 24"><path d="M4 11 12 4l8 7v9h-5v-6H9v6H4z"/></symbol>
<symbol id="data" viewBox="0 0 24 24"><ellipse cx="12" cy="6" rx="7" ry="3"/><path d="M5 6v12c0 1.7 3.1 3 7 3s7-1.3 7-3V6M5 12c0 1.7 3.1 3 7 3s7-1.3 7-3"/></symbol>
<symbol id="bot" viewBox="0 0 24 24"><rect x="5" y="8" width="14" height="11" rx="3"/><path d="M12 4v4M9 13h.01M15 13h.01M9 16h6"/></symbol>
<symbol id="key" viewBox="0 0 24 24"><circle cx="8" cy="15" r="4"/><path d="m11 12 9-9M17 6l3 3"/></symbol>
<symbol id="flag" viewBox="0 0 24 24"><path d="M5 21V4h11l-2 4 2 4H5"/></symbol>
<symbol id="layers" viewBox="0 0 24 24"><path d="m12 3 9 5-9 5-9-5z"/><path d="m3 13 9 5 9-5"/></symbol>
<symbol id="bars" viewBox="0 0 24 24"><path d="M4 20V10M10 20V4M16 20v-7M22 20H2"/></symbol>
<symbol id="phone" viewBox="0 0 24 24"><rect x="7" y="2.5" width="10" height="19" rx="2.5"/><path d="M11 18.5h2"/></symbol>
<symbol id="down" viewBox="0 0 24 24"><path d="M12 4v11M7 10l5 5 5-5M5 20h14"/></symbol>
<symbol id="info" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/><path d="M12 11v5M12 8h.01"/></symbol>
<symbol id="link" viewBox="0 0 24 24"><path d="M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1"/></symbol>
</svg>

<h1><span class="wm">carto<i>polis</i></span> stats, v2: <em>a community's own numbers, for its moderators</em></h1>
<p class="lede">Decided after v1: a community's <b>owner and moderators</b> see its numbers, in the community's own Moderation section. It counts nothing the server does not already count for Admin › Stats; it only cuts those counts to one community. No public numbers page, and no page of a person's own sessions. Everything on this sheet is <b>new</b>; the figures are invented.</p>

<div class="screen">
<div class="browser">
  <div class="chrome"><div class="dots"><i></i><i></i><i></i></div><div class="url">cartopolis.org<b>/c/oosterpoort/stats</b></div></div>
  <div class="app" style="height:880px">
    <div class="top">
      <div class="wm"><img src="../../../assets/icon/cartopolis.svg"><span>carto<i>polis</i></span></div>
      <div class="mid"><div class="seg"><div class="on"><svg class="i s"><use href="#chat"/></svg>Community <span class="cnt">5</span></div><div><span class="live"></span>World</div><div class="adm"><svg class="i s"><use href="#shield"/></svg>Admin</div></div></div>
      <div class="crumbs"><span>Community</span><span class="sep">›</span><span>Oosterpoort Neighbours</span><span class="sep">›</span><b>Stats</b></div>
      <div class="sp"></div>
      <div class="av c7" style="width:32px;height:32px">J</div>
    </div>
    <div class="appbody">
    <div class="rail">
      <div class="ws home"><svg class="i"><use href="#users"/></svg><span class="b badge">2</span></div>
      <div class="tip">Home</div>
      <div class="ws on" style="background:#3f7d6e">ON</div>
      <div class="ws" style="background:#4d6a91">FS<span class="b badge">3</span></div>
      <div class="ws" style="background:#a0623e">BE</div>
      <div class="ws" style="background:var(--raised);color:var(--dim)"><svg class="i"><use href="#search"/></svg></div>
      <div class="ws" style="background:var(--raised);color:var(--dim)"><svg class="i"><use href="#plus"/></svg></div>
      <div class="sp"></div>
    </div>
    <div class="side">
      <div class="chd"><h3>Oosterpoort Neighbours <svg class="i s" style="color:var(--dim)"><use href="#chev"/></svg></h3>
        <div class="meta"><span><svg class="i s"><use href="#pin"/></svg>Oosterpoort, Groningen</span><span><svg class="i s"><use href="#users"/></svg>214</span></div></div>
      <div class="sec"><h4>Topics <span>+</span></h4>
        <div class="it"><span class="hash">#</span><span class="n">general</span></div>
        <div class="it"><span class="hash">#</span><span class="n">street-party</span></div>
        <div class="it unread"><span class="hash">#</span><span class="n">lost-and-found</span><span class="badge">3</span></div>
        <div class="it unread"><span class="hash">#</span><span class="n">road-works</span><span class="badge">2</span></div>
        <div class="it"><span class="hash">#</span><span class="n">swap-and-give</span></div>
        <div class="it"><span class="hash">#</span><span class="n">choir</span></div>
      </div>
      <div class="sec"><h4>Moderation <span class="role">moderator</span></h4>
        <div class="it"><span class="hash"><svg class="i s"><use href="#users"/></svg></span><span class="n">Asking to join</span><span class="badge y">2</span></div>
        <div class="it"><span class="hash"><svg class="i s"><use href="#flag"/></svg></span><span class="n">Reports</span><span class="badge y">1</span></div>
        <div class="it on" style="background:rgba(216,192,122,.14);color:var(--cream)"><span class="hash" style="color:var(--warn)"><svg class="i s"><use href="#bars"/></svg></span><span class="n">Stats</span><span class="new" style="margin:0">new</span></div>
        <div class="it"><span class="hash"><svg class="i s"><use href="#grid"/></svg></span><span class="n">Settings</span></div>
      </div>
    </div>
    <div class="main wide">
      <div class="chh"><div class="t"><b>Stats</b><span>Oosterpoort Neighbours · seen only by the owner and moderators</span></div><div class="btn ghost"><svg class="i s"><use href="#down"/></svg>CSV</div></div>
      <div class="body">
        <div class="filters"><div class="seg"><div>7 days</div><div class="on">30 days</div><div>90 days</div><div>12 months</div></div><div class="opt"><span class="box"></span>Compare with the period before</div></div>
        <div class="tiles t5">
          <div class="tile"><div class="k">Members</div><div class="v">214</div><div class="d"><span class="up"><b>19</b></span> net this month</div></div>
          <div class="tile"><div class="k">Active members</div><div class="v">96</div><div class="d">45% wrote or came by</div></div>
          <div class="tile"><div class="k">Messages</div><div class="v">1,840</div><div class="d"><span class="up"><b>31%</b></span> · all sealed</div></div>
          <div class="tile"><div class="k">Public posts</div><div class="v">38</div><div class="d">212 followers elsewhere</div></div>
          <div class="tile"><div class="k">Call minutes</div><div class="v">310</div><div class="d">14 calls in topics</div></div>
        </div>
        <div class="cards k2">
          <div class="card2"><h5>Joining and leaving<span class="sub">people, per week</span></h5>
            <div class="legend"><span><i style="background:var(--s1)"></i>Joined</span><span><i style="background:var(--s2)"></i>Left</span></div>
            <svg class="chart" id="joins" viewBox="0 0 440 190" height="190"></svg></div>
          <div class="card2"><h5>Topics<span class="sub">30 days</span></h5>
            <div class="mt" id="topics"></div></div>
        </div>
        <div class="cards k2">
          <div class="card2"><h5>Public posts on the fediverse</h5>
            <div class="rank"><div class="hd"><span>Server following the community</span><span>Followers</span></div>
              <div class="r"><i class="bar" style="width:100%"></i><span>mastodon.social</span><span>88</span></div>
              <div class="r"><i class="bar" style="width:48%"></i><span>mastodon.nl</span><span>42</span></div>
              <div class="r"><i class="bar" style="width:31%"></i><span>lemmy.world</span><span>27</span></div>
              <div class="r"><i class="bar" style="width:63%"></i><span>31 other servers</span><span>55</span></div></div>
            <div class="note" style="margin-top:10px"><svg class="i s"><use href="#info"/></svg><span>Posts brought <b>146 replies</b> and <b>402 boosts</b> from outside Cartopolis this month.</span></div></div>
          <div class="card2"><h5>Where members share places<span class="sub">places sent in topics and posts</span></h5>
            <div class="rank"><div class="r"><i class="bar" style="width:100%"></i><span>Meeuwerderweg / Oosterpoort</span><span>34</span></div><div class="r"><i class="bar" style="width:62%"></i><span>Grote Markt</span><span>21</span></div><div class="r"><i class="bar" style="width:41%"></i><span>Hoofdstation</span><span>14</span></div><div class="r"><i class="bar" style="width:24%"></i><span>Zuiderpark</span><span>8</span></div></div>
            <div class="btn ghost" style="justify-content:center;margin-top:10px"><svg class="i s"><use href="#globe"/></svg>See them in World</div></div>
        </div>
      </div>
    </div>
    </div>
  </div>
</div>
<div class="notes">
  <h2><span>E</span>A community's stats</h2>
  <ul>
    <li><b>In Moderation, beside Reports and Settings</b> <span class="new">new</span>, for the owner and the moderators. Members do not see it; a server admin sees every community's numbers in Admin › Stats.</li>
    <li><b>Counts, never names.</b> There is no "most active members" list and no per-person column: a moderator learns how much a topic is used, not who uses it. Who is a member was already theirs to see.</li>
    <li><b>Fewer than 5</b>: a topic where fewer than 5 different people wrote shows that instead of numbers, so a small topic cannot be read as one person's activity.</li>
    <li><b>Active member</b> means wrote in a topic, joined a call, or opened the community in the 30 days — the same sessions Admin › Stats keeps, cut to this community.</li>
    <li><b>Messages</b> are counted per topic as the server relays them; topics are encrypted, so this is the only thing it can count.</li>
    <li><b>Fediverse</b>: followers per server and the replies and boosts that came in, from the public half of the community.</li>
  </ul>
</div>
</div>

<div class="grid g2" style="margin-top:8px">
  <div class="box"><h3><span>✓</span>Decided on v1 (2026-10-18)</h3><ul class="q">
    <li><b>Moderators see their community's numbers</b> — this sheet.</li>
    <li><b>No public numbers</b> on about.cartopolis.org; the "Public numbers" switch on v1's sidebar goes.</li>
    <li><b>No page of a person's own sessions.</b></li>
    <li><b>Sessions are kept per account for 90 days</b>, so "who comes back", "active in 30 days" and the funnel stay.</li>
    <li><b>Global Privacy Control is not honoured</b>: nothing counted identifies anyone, and every browser is counted the same.</li>
  </ul></div>
  <div class="box"><h3><span>?</span>Still open</h3><ul class="q">
    <li>Should a moderator's view stop at members, or also count people who are not members — visitors to the community's public page and its posts?</li>
  </ul></div>
</div>

<script>
const $ = s => document.querySelector(s);
const css = v => getComputedStyle(document.documentElement).getPropertyValue(v).trim();

// joined up, left down, one axis in people
(() => { const svg = $('#joins'); const joined = [3, 2, 4, 2, 3, 5, 3, 4, 6, 9, 11, 5], left = [1, 0, 1, 2, 1, 0, 1, 1, 2, 3, 2, 1];
  const wk = ['27 Jul', '', '', '', '24 Aug', '', '', '', '21 Sep', '', '', '12 Oct'];
  const x0 = 26, x1 = 440, mid = 112, sc = 8; let s = '';
  [-4, 0, 4, 8, 12].forEach(t => { const y = mid - t * sc; s += `<line x1="${x0}" x2="${x1}" y1="${y}" y2="${y}" stroke="${t ? css('--grid') : css('--line')}"/><text x="${x0 - 6}" y="${y + 3.5}" text-anchor="end">${Math.abs(t)}</text>`; });
  const bw = (x1 - x0) / 12;
  joined.forEach((v, i) => { const x = x0 + i * bw + 6, w = bw - 12;
    s += `<rect x="${x}" y="${mid - v * sc}" width="${w}" height="${v * sc - 1}" rx="3" fill="${css('--s1')}"/>`;
    if (left[i]) s += `<rect x="${x}" y="${mid + 1}" width="${w}" height="${left[i] * sc - 1}" rx="3" fill="${css('--s2')}"/>`;
    if (wk[i]) s += `<text x="${x + w / 2}" y="${mid + 4 * sc + 16}" text-anchor="middle">${wk[i]}</text>`; });
  s += `<text class="v" x="${x0 + 10 * bw + bw / 2}" y="${mid - 11 * sc - 5}" text-anchor="middle">11</text>`;
  s += `<text x="${x0 + 10 * bw + bw / 2 - 18}" y="${mid - 11 * sc - 5}" text-anchor="end">street-party announced</text>`;
  svg.innerHTML = s; })();

// topics
(() => { const rows = [['street-party', 820, 41, 410], ['general', 512, 58, 470], ['lost-and-found', 230, 22, 240], ['road-works', 196, 17, 90], ['swap-and-give', 74, 9, 81], ['choir', null, null, null]];
  let h = '<div class="row h" style="grid-template-columns:1.4fr .8fr .9fr .7fr"><span>Topic</span><span class="n">Messages</span><span class="n">People writing</span><span class="n">Change</span></div>';
  rows.forEach(([t, m, p, b]) => { if (m === null) { h += `<div class="row" style="grid-template-columns:1.4fr 2.4fr"><span><span style="color:var(--line)"># </span>${t}</span><span style="color:var(--dim);text-align:right">fewer than 5 people wrote</span></div>`; return; }
    const ch = Math.round((m / b - 1) * 100);
    h += `<div class="row" style="grid-template-columns:1.4fr .8fr .9fr .7fr"><span><span style="color:var(--line)"># </span>${t}</span><span class="n">${m.toLocaleString('en')}</span><span class="n">${p}</span><span class="n ${ch >= 0 ? 'up' : 'dn'}">${ch >= 0 ? '+' : ''}${ch}%</span></div>`; });
  $('#topics').innerHTML = h; })();
</script>
</body></html>