• Home
  • About Us
  • Contact Us
  • Disclaimer
  • Privacy Policy
Wednesday, October 15, 2025
newsaiworld
  • Home
  • Artificial Intelligence
  • ChatGPT
  • Data Science
  • Machine Learning
  • Crypto Coins
  • Contact Us
No Result
View All Result
  • Home
  • Artificial Intelligence
  • ChatGPT
  • Data Science
  • Machine Learning
  • Crypto Coins
  • Contact Us
No Result
View All Result
Morning News
No Result
View All Result
Home Artificial Intelligence

How I Turned IPL Stats right into a Mesmerizing Bar Chart Race | by Tezan Sahu | Oct, 2024

Admin by Admin
October 10, 2024
in Artificial Intelligence
0
1uidx2hd5dcalyh1ehwpmba.gif
0
SHARES
0
VIEWS
Share on FacebookShare on Twitter


In our fast-paced digital world, capturing and sustaining viewers consideration is tougher than ever. That is the place animated visualizations shine. They’ll:

  1. Convey advanced developments over time in an simply digestible format
  2. Interact viewers emotionally, making information extra memorable
  3. Encourage exploration and discovery inside datasets
  4. Simplify the communication of key insights to non-technical audiences

As information professionals, it’s essential we keep abreast of those highly effective storytelling instruments. Let’s dive into how we will leverage them successfully.

As an avid cricket fanatic, I knew I needed to do one thing associated to the Indian Premier League (IPL). However I didn’t wish to create simply one other run-of-the-mill visualization. No, I needed one thing that might make even essentially the most informal cricket fan sit up and take discover.

That’s when it hit me: what if I may present the variety of wins for every IPL crew over time? It could be like watching your complete historical past of the IPL unfold earlier than your eyes!

A fast search on Kaggle led me to a goldmine — a complete IPL dataset containing match outcomes from 2008 to 2024. I downloaded it sooner than Jasprit Bumrah’s yorker and saved it as ipl_matches_2008-2024.csv.

Now armed with my dataset, I confronted the daunting query: how on earth do I flip this into a kind of fancy animated charts?

Whereas I’m snug with coding visualizations from scratch utilizing Python, I used to be intrigued by the potential effectivity of low-code instruments. Enter Flourish — a instrument I stumbled upon that promised to assist create gorgeous visualizations with out coding — how cool is that!

Stumbled upon “Flourish” whereas looking for a instrument to create the animated visualization

The vary of choices for visualisations offered by Flourish is nice (even for free-tier utilization). On deciding on the “Bar chart race” choice, adopted by clicking the “Information” toggle, I used to be rapidly capable of perceive the info necessities for Flourish to generate a bar chart race visualization for us.

Understanding the info necessities in Flourish

After all, the uncooked IPL dataset was nowhere near this format, which implies I bought the chance to leverage the ability of GitHub Copilot to therapeutic massage the info & deliver it into the required format.

Right here’s the sequence of interactions I had with GitHub Copilot to assist me convert the uncooked IPL information into the specified format (with a bunch of fascinating IPL-related nuances):

As a primary step, I broadly defined the format that the dataset was initially in, and the way I needed the ultimate illustration:

Right here’s the consequence returned by GitHub Copilot:

I used to be pleasantly stunned to seek out that this piece of code was nearly right within the first go itself! The method proven is straightforward:

After extracting the distinctive dates of every match & the distinctive groups, initialize an information body with groups as rows & dates as columns. Now, iterate by way of every date & do the next:

  1. Filter matches as much as the present date
  2. Calculate the cumulative wins for every crew
  3. Replace the DataFrame with the cumulative wins

The one hiccup right here was this further piece of code — eradicating which, did the trick for me:

# Guarantee cumulative sum
if date != unique_dates[0]:
cumulative_wins.at[team, date] += cumulative_wins.at[team, unique_dates[unique_dates.index(date) - 1]]

cumulative_wins.head() resulted within the following:

However wait, there’s extra! The IPL, like all good drama, has its personal twists and turns…

Though this information, by itself, is adequate to be visualized in Flourish as a bar chart race, I made a decision to deal with a few of the nuances of IPL that can give the visualization a extra lifelike really feel.

Crew Renaming

All through the IPL historical past, there have been a number of events the place franchise homeowners modified, resulting in the rebranding of the groups Bear in mind when Deccan Chargers remodeled into Sunrisers Hyderabad?

Within the dataset, these are thought of separate groups in separate rows, the place publish renaming, the previous crew continues to stick with the cumulative variety of wins till that 12 months, whereas the brand new crew begins afresh with 0 wins.

To alter this, I attempted out the next prompts:

With a few minor fixes, that is what the ensuing code regarded like:

Now, to generalize this & apply it throughout the varied modifications, I attempted changing his right into a operate & used Bing to determine the years of those main crew modifications, earlier than making use of the operate to them:

Superior! I used to be capable of account for all of the franchise modifications that occurred over time. Nonetheless, one factor bothered me…

Defunct Groups

A bunch of groups within the IPL appeared in simply a few editions & then light away. Their presence within the ultimate visualisation after them being made defunct appeared pointless.

So, I attempted to have them eliminated after their ultimate look utilizing the next immediate:

This gave me one other neat operate, which I may apply to the groups that went defunct over time (once more, I discovered this information from Bing).

Crew Logos

Within the demo information in Flourish, I noticed that one column contained hyperlinks to photographs that could possibly be used for every bar within the bar chart race.

To make my visualization come out, I needed to do one thing comparable. So, I discovered the pictures for the logos for every of the distinctive groups in our dataset & added them to a brand new column:

READ ALSO

Why AI Nonetheless Can’t Substitute Analysts: A Predictive Upkeep Instance

TDS E-newsletter: September Should-Reads on ML Profession Roadmaps, Python Necessities, AI Brokers, and Extra

This small contact considerably enhances the viewer’s capability to trace groups all through the animation

And now, I used to be all set to create the visualization!

With our information primed and polished, it was time for the principle occasion!

Importing to Flourish was a chunk of cake —it was routinely capable of establish the Label, Values & Picture columns accurately.

Switching to the Preview toggle, I had one thing that nearly resembled what I had envisioned — a few setting modifications right here & there, and we had been executed.

Following are the modifications I made:

  • Used “Labels on bars (photographs in axis)” because the “Labels mode” underneath Labels for a modern look
  • Set picture sizing to “Match” and form to “Rectangle” for crisp logos
  • Lowered the Dimension % of the Present Time Counter & Totalizer underneath Counter & Totalizer for stability

And there you may have it — from a easy CSV file to a dynamic, participating visualization that tells the story of IPL crew performances over time — with only a sprint of creativity and a sprinkle of information magic. 🎉

Right here’s the ultimate output👇🏼

Closing Bar Chart Race visualization of IPL Crew wins over time (created by creator)

This easy-yet-engaging mission holds a number of invaluable insights for information scientists and analysts trying to improve their storytelling toolkit:

  1. Low-Code Doesn’t Imply Low-High quality: Instruments like Flourish can produce refined visualizations that rival custom-coded options.
  2. Information Prep Stays Crucial: Our information science expertise are invaluable in making ready and structuring information for efficient visualization.
  3. Effectivity Beneficial properties: For sure tasks, low-code instruments can considerably scale back time-to-insight with out sacrificing high quality.
  4. Accessibility: These instruments may also help bridge the hole between information groups and non-technical stakeholders, facilitating higher communication of insights.
Tags: BarChartIPLMesmerizingOctRaceSahuStatsTezanTurned

Related Posts

Depositphotos 649928304 xl scaled 1.jpg
Artificial Intelligence

Why AI Nonetheless Can’t Substitute Analysts: A Predictive Upkeep Instance

October 14, 2025
Landis brown gvdfl 814 c unsplash.jpg
Artificial Intelligence

TDS E-newsletter: September Should-Reads on ML Profession Roadmaps, Python Necessities, AI Brokers, and Extra

October 11, 2025
Mineworld video example ezgif.com resize 2.gif
Artificial Intelligence

Dreaming in Blocks — MineWorld, the Minecraft World Mannequin

October 10, 2025
0 v yi1e74tpaj9qvj.jpeg
Artificial Intelligence

Previous is Prologue: How Conversational Analytics Is Altering Information Work

October 10, 2025
Pawel czerwinski 3k9pgkwt7ik unsplash scaled 1.jpg
Artificial Intelligence

Knowledge Visualization Defined (Half 3): The Position of Colour

October 9, 2025
Nasa hubble space telescope rzhfmsl1jow unsplash.jpeg
Artificial Intelligence

Know Your Actual Birthday: Astronomical Computation and Geospatial-Temporal Analytics in Python

October 8, 2025
Next Post
Bitcoin Id 93612bde 2644 4174 Ba86 D89c52095175 Size900.jpg

Bitcoin Inventor's Controversial Identification Resurfaces in New HBO Documentary

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

POPULAR NEWS

Blog.png

XMN is accessible for buying and selling!

October 10, 2025
0 3.png

College endowments be a part of crypto rush, boosting meme cash like Meme Index

February 10, 2025
Gemini 2.0 Fash Vs Gpt 4o.webp.webp

Gemini 2.0 Flash vs GPT 4o: Which is Higher?

January 19, 2025
1da3lz S3h Cujupuolbtvw.png

Scaling Statistics: Incremental Customary Deviation in SQL with dbt | by Yuval Gorchover | Jan, 2025

January 2, 2025
Gary20gensler2c20sec id 727ca140 352e 4763 9c96 3e4ab04aa978 size900.jpg

Coinbase Recordsdata Authorized Movement In opposition to SEC Over Misplaced Texts From Ex-Chair Gary Gensler

September 14, 2025

EDITOR'S PICK

Istockphoto 947893638 612x612 1.jpg

XRP At Crucial Juncture As Value Restests 21 EMA

February 2, 2025
Jr Korpa Sgg6o7wdzd0 Unsplash Scaled 1.jpg

The Artwork of Noise | In the direction of Information Science

April 3, 2025
Zhyvov 1.png

4-Dimensional Knowledge Visualization: Time in Bubble Charts

February 12, 2025
Ddn nvidia logos 2 1 0525.png

DDN Groups With NVIDIA on AI Information Platform Reference Design

May 27, 2025

About Us

Welcome to News AI World, your go-to source for the latest in artificial intelligence news and developments. Our mission is to deliver comprehensive and insightful coverage of the rapidly evolving AI landscape, keeping you informed about breakthroughs, trends, and the transformative impact of AI technologies across industries.

Categories

  • Artificial Intelligence
  • ChatGPT
  • Crypto Coins
  • Data Science
  • Machine Learning

Recent Posts

  • Sam Altman prepares ChatGPT for its AI-rotica debut • The Register
  • YB can be accessible for buying and selling!
  • Knowledge Analytics Automation Scripts with SQL Saved Procedures
  • Home
  • About Us
  • Contact Us
  • Disclaimer
  • Privacy Policy

© 2024 Newsaiworld.com. All rights reserved.

No Result
View All Result
  • Home
  • Artificial Intelligence
  • ChatGPT
  • Data Science
  • Machine Learning
  • Crypto Coins
  • Contact Us

© 2024 Newsaiworld.com. All rights reserved.

Are you sure want to unlock this post?
Unlock left : 0
Are you sure want to cancel subscription?