How to Analyze Ball-by-Ball Cricket Data in R (cricketdata)

New Zealand have drawn first blood in the two-Test series against South Africa. It's a commanding victory built on a foundation of disciplined batting and relentless pressure. The numbers don't lie: the Black Caps are looking strong.
The first Test between New Zealand and South Africa concluded at Bay Oval today, with the hosts securing a decisive victory by 281 runs. Kane Williamson's twin centuries and Devon Conway's consistent performance set the tone for a dominant display. When you look at the data, it’s clear the Proteas struggled to contain the Kiwi batsmen and ultimately folded under the pressure.
Statistically speaking, New Zealand's batting performance was the critical factor. Key stats from the match highlight this:
Kane Williamson: 118 runs in the first innings, 109 runs in the second innings.
Devon Conway: 78 runs in the first innings.
Tom Latham: 20 runs in the first innings; 83 in the second.
South Africa, in stark contrast, struggled to build partnerships and sustain any momentum. Their batting averages plummeted across both innings.
Keegan Petersen: 2 runs in the first innings, 16 runs in the second innings.
* Zubayr Hamza: 25 runs in the first innings, 6 runs in the second innings.
New Zealand's bowlers maintained tight lines and lengths, stifling the South African batsmen. Matt Henry's exceptional figures of 3/31 in the first innings plumb in front were a major blow. And he wasn't alone. Southee (2/36) and Kuggeleijn (2/30) kept the pressure firmly on.
South Africa's first innings total of 162 was never going to be enough. They needed to show more fight.
The second innings was even worse. Collapsing to 111 all out, effectively handing the match to New Zealand. Questions will be asked about their preparation and approach. Playing with soft hands wasn't going to cut it against this Kiwi attack.
But let's not take anything away from New Zealand. Williamson, in particular, was in a different class. His ability to build an innings and accelerate when needed was crucial to New Zealand amassing their imposing totals. Knocking it around isn't something he needed to do.
Conway's contribution shouldn't be understated either. His solid start in the first innings allowed Williamson to settle in and build his innings. He's setting the tone for the Black Caps.
What does this mean for the series? New Zealand have the momentum, but South Africa have the potential to bounce back. They need to address their batting frailties and find a way to put pressure on the New Zealand bowlers. Can they?
The Proteas’ batting lineup will need serious adjustments if they hope to level the series. The lack of partnerships and the inability to convert starts into substantial scores are major concerns. Individual brilliance alone won't suffice; a cohesive team effort is essential.
And New Zealand? They'll be looking to replicate their performance in the second Test. Maintaining their discipline with both bat and ball will be key. No complacency. They know the Proteas are dangerous when cornered.
The second Test promises to be a fascinating contest. Will South Africa find a way to fight back, or will New Zealand continue their dominance? The cricket world awaits.