Counting the frequency of certain entries in a list of JSON objects
The approach in your code is straightforward and hence easy to understand. 

Nits:


use more of ES2015+ if you use some parts of it anyway - for example Map is handy here;
don't mix function and =&gt; notations - unless the former is absolutely required;
don't use array .map if you don't need the output array - to avoid garbage collection lags;




const getSectionFrequencyData = data =&gt; {
  const getSection = entry =&gt; /[a-z]+|$/.exec(entry.url || '')[0];

  const frequencies = new Map();
  for (const entry of data) {
    const section = getSection(entry) || 'home';
    frequencies.set(section, (frequencies.get(section) || 0) + 1);
  }

  const sorted10 = new Map(
    [...frequencies.entries()]
      .sort((a, b) =&gt; b[1] - a[1])
      .slice(0, 10)
  );

  return [
    ['sections', ...sorted10.keys()],
    ['frequency', ...sorted10.values()],
  ];
};