Efficiently performing multiple nested grouping and mapping in Javascript
I don't see what lodash has to offer here.  With modern JavaScript it can be written quite tersely thus:
const events = data.reduce((events, { log_type, date }) =&gt; {
  const event = (events[log_type] || (events[log_type] = []));
  const match = event.find(({ x }) =&gt; x == date);
  match ? match.y++ : event.push({ x: date, y: 1 });
  return events;
}, { });

The first line inside the .reduce method creates the event array if it doesn't exist.
The second line finds the element with a matching date.
The third line, if a matching date was found, increments its y property.  Else, it adds a new element with the date.
For example:


const data = [
  {
    log_type: 'eventOne',
    date: '2020-08-27T20:00:00+00:00'
  },
  {
    log_type: 'eventOne',
    date: '2020-08-27T20:00:00+00:00'
  },
  {
    log_type: 'eventTwo',
    date: '2020-08-27T00:00:00+00:00'
  },
  {
    log_type: 'eventTwo',
    date: '2020-08-27T00:00:00+00:00'
  },
  {
    log_type: 'eventTwo',
    date: '2020-08-27T40:00:00+00:00'
  },
  {
    log_type: 'eventOne',
    date: '2020-08-27T00:00:00+00:00'
  },
];

const events = data.reduce((events, { log_type, date }) =&gt; {
  const event = (events[log_type] || (events[log_type] = []));
  const match = event.find(({ x }) =&gt; x == date);
  match ? match.y++ : event.push({ x: date, y: 1 });
  return events;
}, { });

console.log(events);