Wider artist pool (artists credited on DR-played tracks, groups; weekly refresh, oldest first); Platt recalibration of the add model on recent closed windows; Bauer plays per artist on the site
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+10
-5
@@ -139,7 +139,7 @@ svg text { fill: var(--muted); font-size: 11px; }
|
||||
</table>
|
||||
</div>
|
||||
<button class="more" id="more" hidden>Show more</button>
|
||||
<p class="note"><b>New add</b> = the chance that the artist gets a song into rotation within the 8-week window: entering rotation (at or above the station's weekly play threshold) after at least 4 weeks out of rotation. For "any DR station", out of rotation everywhere first. An artist with a song in rotation now usually has to drop out before a new add, which is why current hits rank lower here. "In rotation now" shows where the artist is in rotation in the latest week; plays per week are for the window's first week. Click an artist for history and a what-if.</p>
|
||||
<p class="note">"In rotation now" lists DR stations where the artist is on the list, then Bauer stations (grey) with 14+ plays in the last 7 days. <b>New add</b> = the chance that the artist gets a song into rotation within the 8-week window: entering rotation (at or above the station's weekly play threshold) after at least 4 weeks out of rotation. For "any DR station", out of rotation everywhere first. An artist with a song in rotation now usually has to drop out before a new add, which is why current hits rank lower here. "In rotation now" shows where the artist is in rotation in the latest week; plays per week are for the window's first week. Click an artist for history and a what-if.</p>
|
||||
</section>
|
||||
|
||||
<section id="tab-model" hidden>
|
||||
@@ -175,6 +175,7 @@ const BASE = location.pathname.replace(/\/(index\.html)?$/, '');
|
||||
const API = p => fetch(BASE + '/api/' + p).then(r => r.json());
|
||||
const GROUPS = [['p3', 'P3'], ['p4', 'P4'], ['p5', 'P5'], ['p6beat', 'P6'], ['p8jazz', 'P8']];
|
||||
const P4S = ['p4kbh','p4sjaelland','p4fyn','p4syd','p4trekanten','p4vest','p4aarhus','p4nord','p4bornholm','p4esbjerg'];
|
||||
const BAUER = { nov: 'NOVA', dso: 'Radio Soft', the: 'The Voice', pop: 'Pop FM', rhu: 'Radio 100' };
|
||||
const COLORS = { p3: 'var(--p3)', p4: 'var(--p4)', p5: 'var(--p5)', p6beat: 'var(--p6)', p8jazz: 'var(--p8)' };
|
||||
let meta = null, data = { 1: null }, shown = 100, current = [];
|
||||
const $ = id => document.getElementById(id);
|
||||
@@ -195,10 +196,13 @@ function nowPlays(r, g) {
|
||||
if (g === 'p4') return P4S.reduce((s, c) => s + v(c), 0) / P4S.length;
|
||||
return v(g);
|
||||
}
|
||||
function nowChips(now) {
|
||||
function nowChips(now, bauer) {
|
||||
now = now || {};
|
||||
const on = GROUPS.filter(([g]) => g === 'p4' ? P4S.some(c => now[c]?.on) : now[g]?.on).map(([, l]) => l);
|
||||
return on.length ? on.join(' · ') : '<span class="note">—</span>';
|
||||
// Bauer: no published lists; 14+ plays in the last 7 days (two a day) shown as heavy rotation.
|
||||
const b = Object.entries(bauer || {}).filter(([, n]) => n >= 14).sort((x, y) => y[1] - x[1]).map(([s, n]) => `${BAUER[s] || s} ${n}`);
|
||||
const all = on.concat(b.map(x => `<span class="note">${x}</span>`));
|
||||
return all.length ? all.join(' · ') : '<span class="note">—</span>';
|
||||
}
|
||||
function chanPlays(r, g) {
|
||||
if (g === 'any') return r.mean;
|
||||
@@ -248,7 +252,7 @@ function render() {
|
||||
<td class="l name">${esc(r.name)}${r.danish ? '<small>DK</small>' : ''}</td>
|
||||
<td><span class="bar"><i style="width:${Math.round((p ?? 0) * 70)}px"></i>${pct(p)}</span></td>
|
||||
${GROUPS.map(([c]) => `<td class="hide-sm"><span class="cell" style="${heat(chanP(r, c))}">${pct(chanP(r, c))}</span></td>`).join('')}
|
||||
<td class="l hide-sm">${nowChips(r.now)}</td>
|
||||
<td class="l hide-sm">${nowChips(r.now, r.bauer)}</td>
|
||||
<td>${pl == null ? '—' : pl.toFixed(pl < 10 ? 1 : 0)}${range}</td>
|
||||
</tr>`;
|
||||
}).join('');
|
||||
@@ -322,10 +326,11 @@ async function showArtist(id) {
|
||||
<div class="kpi"><div>Any DR station</div><b>${pct(fc.add_any)}</b></div>
|
||||
${GROUPS.map(([g, l]) => `<div class="kpi"><div>${l}</div><b>${pct(chanP(fc, g))}</b></div>`).join('')}
|
||||
</div>
|
||||
<p class="note">In rotation now: ${nowChips(a.now)} · plays in the week of ${fp.week ? fmtDate(fp.week) : '—'}: <b>${Math.round(fp.mean ?? 0)}</b> (${Math.round(fp.lo ?? 0)}–${Math.round(fp.hi ?? 0)})</p>
|
||||
<p class="note">In rotation now: ${nowChips(a.now, Object.fromEntries(Object.entries(a.bauer || {}).map(([s, v]) => [s, v.plays])))} · plays in the week of ${fp.week ? fmtDate(fp.week) : '—'}: <b>${Math.round(fp.mean ?? 0)}</b> (${Math.round(fp.lo ?? 0)}–${Math.round(fp.hi ?? 0)})</p>
|
||||
</div>
|
||||
<div class="sec"><h3>Weekly plays, last 51 weeks and next 12</h3>${historyChart(a)}</div>
|
||||
<div class="sec"><h3>What if…</h3><div id="wi" class="note">Loading the model…</div></div>
|
||||
${a.bauer ? `<div class="sec"><h3>Bauer radio, last 7 days</h3><div class="chips">${Object.entries(a.bauer).sort((x, y) => y[1].plays - x[1].plays).map(([s, v]) => `<span class="chip"><b>${BAUER[s] || s}</b> ${v.plays} plays: ${v.songs.map(t => `${esc(t.title)} (${t.plays})`).join(', ')}</span>`).join('')}</div><p class="note">Bauer publishes no rotation lists or history; plays are collected daily from now on, and Bauer adds join the model once there are a few weeks of logs.</p></div>` : ''}
|
||||
${a.top_tracks.length ? `<div class="sec"><h3>Most played on DR (all time)</h3><div class="tracks">${a.top_tracks.map(t => `<div>${esc(t.title)} <span class="note">${t.total}</span></div>`).join('')}</div></div>` : ''}
|
||||
${runList.length ? `<div class="sec"><h3>Chart runs (IFPI)</h3><div class="chips">${runList.map(r => `<span class="chip">${r.chart === 't40' ? 'Track Top-40' : 'Airplay Top-20'}: ${esc(r.title)}, peak #${r.best}, ${r.weeks} wk, ${r.first.year}</span>`).join('')}</div></div>` : ''}
|
||||
`);
|
||||
|
||||
Reference in New Issue
Block a user