NMF Denmark in the add model (placed in the window, top 10, history), scenario type (release / NMF) for the ranking and the what-if; NMF Denmark export
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+4
-3
@@ -335,7 +335,7 @@ 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>
|
||||
${fc.p_release != null ? `<p class="note">Chance they release something in the window (from their release rate): <b>${pct(fc.p_release)}</b>. If they release: ${pct(fc.add_any_rel)} · at their usual rate: ${pct(fc.add_any)}.</p>` : '<p class="note">No discography found on Deezer for this artist, so release timing isn\'t in the forecast.</p>'}
|
||||
${fc.p_release != null ? `<p class="note">Chance they release something in the window (from their release rate): <b>${pct(fc.p_release)}</b>. If they release: ${pct(fc.add_any_rel)} · at their usual rate: ${pct(fc.add_any)}.${fc.add_any_nmf != null ? ` If the release is placed on New Music Friday Denmark: <b>${pct(fc.add_any_nmf)}</b> (their releases were placed about ${pct(fc.p_nmf)} of the time).` : ''}</p>` : '<p class="note">No discography found on Deezer for this artist, so release timing isn\'t in the forecast.</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>
|
||||
@@ -352,6 +352,7 @@ function whatIfUI(a, h) {
|
||||
box.innerHTML = `<div class="wi">
|
||||
<div class="row"><label for="wi-h">Window starts in (weeks)</label><input type="range" id="wi-h" min="0" max="${meta.horizons.length}" value="${h}"><b id="wi-hv"></b></div>
|
||||
<div class="row"><label for="wi-r">Releases a song in the window</label><input type="checkbox" id="wi-r" checked><b></b></div>
|
||||
<div class="row"><label for="wi-n">…placed on New Music Friday Denmark</label><input type="checkbox" id="wi-n"><b></b></div>
|
||||
<div class="row"><label for="wi-e">New chart entry, weeks ago</label><input type="range" id="wi-e" min="-1" max="26" value="-1"><b id="wi-ev"></b></div>
|
||||
<div class="row"><label for="wi-t">Track Top-40 position now</label><input type="range" id="wi-t" min="0" max="40" value="0"><b id="wi-tv"></b></div>
|
||||
<div class="row"><label for="wi-a">Airplay Top-20 position now</label><input type="range" id="wi-a" min="0" max="20" value="0"><b id="wi-av"></b></div>
|
||||
@@ -368,7 +369,7 @@ function whatIfUI(a, h) {
|
||||
const run = async () => {
|
||||
label();
|
||||
let qs = `id=${encodeURIComponent(a.id)}&h=${$('wi-h').value}`;
|
||||
qs += `&release=${$('wi-r').checked ? 'yes' : 'no'}`;
|
||||
qs += `&release=${$('wi-r').checked ? 'yes' : 'no'}&nmf=${$('wi-n').checked ? 'yes' : 'no'}`;
|
||||
if (init) qs += `&entry=${$('wi-e').value < 0 ? 'none' : $('wi-e').value}&t40=${$('wi-t').value}&air=${$('wi-a').value}`;
|
||||
const r = await fetch(BASE + '/api/whatif?' + qs);
|
||||
if (r.status === 503) { $('wi-out').innerHTML = '<p class="note">The model is still loading on the server; try again in a minute.</p>'; return; }
|
||||
@@ -387,7 +388,7 @@ function whatIfUI(a, h) {
|
||||
<div class="kpis">${rows.map(([l, b, s]) => `<div class="kpi"><div>${l}</div><b>${pct(s)}</b>${d(b, s, 'p')}<div>was ${pct(b)}</div></div>`).join('')}
|
||||
<div class="kpi"><div>Plays, first week</div><b>${Math.round(w.scenario.mean)}</b>${d(w.base.mean, w.scenario.mean, 'n')}<div>was ${Math.round(w.base.mean)}</div></div></div>`;
|
||||
};
|
||||
['wi-h', 'wi-r', 'wi-e', 'wi-t', 'wi-a'].forEach(id => $(id).addEventListener('input', () => { label(); clearTimeout(timer); timer = setTimeout(run, 120); }));
|
||||
['wi-h', 'wi-r', 'wi-n', 'wi-e', 'wi-t', 'wi-a'].forEach(id => $(id).addEventListener('input', () => { label(); clearTimeout(timer); timer = setTimeout(run, 120); }));
|
||||
run();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user