/** Demography link: the education reading shows the population by age groups. */ export function demographyQuery( territory: string | undefined, education: boolean, ): string { const query = new URLSearchParams(); if (territory) query.append('territories[]', territory); if (education) query.set('sector', 'education'); const text = query.toString(); return text ? '?' + text : ''; }