Gig three Anime

The Big Three Anime

Let’s analyze Big Three Anime

One Piece, Naruto, and Bleach

Big Three, as the name, states the three long-running anime had made a huge impact in Shounen History. What makes these three special? The Big three dominated an entire decade, with amazing characters cast, stunning openings and soundtracks and not to forget the fight scenes.

Let’s Analyze Big Three Anime using Matplotlib Graphs based on Arc name and Total Episodes in each arc.

Unfortunately, we don’t have the data ready. But we can scrap it using BeautifulSoup.

Web Scraping Using Python

Since we require the list of all the Arc names with Total Episode in it. For this reason, you can Web Scrap and get all the Arc names and total episodes in each arc. There is one such amazing website named Listfist. Talking about ListFist, Listfist is a platform where you can find a list of many kinds. Furthermore, on ListFist you will find dozens of lists about the world, countries, movies, series, anime, sport, internet, and many other topics.

Getting started with Web Scraping, First Inspect the website. Second import the necessary modules. You can check out the tutorial on Web Scraping using Python. As the list will be in a table format, it becomes easy for us to use tags. Use the table tag and select the class attributes for Arc Name and Total Episodes in each arc. You can check this in the source code.

#web scrapping using Python
headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36'}

url = requests.get("https://listfist.com/list-of-{}-arcs".format(anime.replace(' ','-')),headers=headers)
    
#scrap and find the table tag, by inspecting ListFist website

soup = BeautifulSoup(url.content,'html.parser')
arc_names = soup.findAll('td',class_="col-2 even")
arc_total_episodes = soup.findAll('td',class_="col-8 even")

We have successfully scrapped all the data, what now? Simple, store it in a .csv file.

Working With CSV File Using Python

How To Read And Write csv Files In Python?

While working with datasets and spreadsheets, the most favorable file format used is CSV. A CSV (comma separated values) file allows data to be saved in a tabular structure with a .csv extension. You can view this file in an excel sheet.

Finally, we have all the data scrapped. Create a new file with .csv as an extension and write all the data in it. How do you do that?

#write the scrapped data into .csv files
rows = zip([i.text for i in arc_names],[j.text for j in arc_total_episodes])
with open("{}_analysis.csv".format(anime.replace(' ','_')), "wt+", newline="") as file:
    writer = csv.writer(file)
    #the columns and first row of the dataset
    writer.writerow(["Arc names","Total Episodes"])
    for row in rows:
        writer.writerow(row)

file.close()

You might be familiar with rows and columns, while working on a CSV file you need to write the data in rows and columns. You can automate this process by looping through each data you just scrapped. But first import the CSV module, second create a new file with the .csv extension. Then fill the rows with each Arc Name and Total Episodes. We will be using only 2 columns here.

As this is completed, we have a CSV file saved with the data we wanted. The next step is to read the CSV file. Import pandas library, which is the best data analyst python library. It’s time to analyze the data with Pie and Bar Graphs.

#read csv file
anime_name = name()
anaylsis_data = "{}_analysis.csv".format(anime_name.replace(" ","_"))
dataset = pd.read_csv(anaylsis_data)
df = pd.DataFrame(dataset)
df.head(10)   #shows first 10 arcs and total episodes

You can display which arc has the maximum number of episodes and which arc has the minimum.

arc_max = df[df["Total Episodes"]==df['Total Episodes'].max()]
print("Biggest Arc \n {}".format(arc_max))

arc_min = df[df["Total Episodes"]==df['Total Episodes'].min()]
print("Smallest Arc \n {}".format(arc_min))

Bar And Pie Graph Using Matplotlib

By using the pandas’ library, we can create a DataFrame by reading the CSV file. Once the DataFrame is created you can create Bar and Pie Graph. Why are we using Graphs in the first place?

Big three has a large number of episodes with many arcs. The main motive of this project is to analyze the percentage of each tag, which you can find out using a Pie Graph. By using Bar Graph, we can observe how many episodes long are Arc.

Note: Drop the rows i.e., Arc which is episodes less than 8. Adding everything makes the graph look clumsy.

#drop row from the DataFrame
for i in range(len(df['Total Episodes'])):
    if df['Total Episodes'][i]<=8:
        df.drop(i,inplace=True)

With the usage of Matplotlib, you can visualize the data properly. Here is an example to create a Bar and Pie Graph using Matplotlib. The more episodes the better excitement to watch that arc. The pie graph is already shared above, here is the bar graph.

The next step, Deploying this project as a Data Science web app. But before that let’s look into the Big Three, about which this entire project is based.

The Big Three Anime

First, One Piece started all back in 1997, getting an anime adaptation in 1999. One Piece is still successfully running and recently it even surpassed Batman and became the second-highest selling comic book series of all time, with Superman at first. One Piece has over 993 episodes and counting. From Romance dawn to Wano Arc, it has been an amazing journey, and it’s going to be even more thrilling when Luffy’s journey will end.

Second, Naruto is the most lovable anime with amazing characters cast. A journey of poor kid Uzumaki Naruto, who aims to become Hokage, the one who is acknowledged by his village. The mischievous boy with amazing willpower works hard to save his friend Sasuke Uchiha from entering darkness. In this journey, he gains massive development and becomes someone important in the hidden leaf village.

Third, Bleach is an action-packed anime filled with thrill. A story starts with a basic plot, Shinigami(Soul Reapers), fights Hollows and saves Humans. They also free the souls from Human society to Soul Society, the afterlife world, formed after a Feudal Japan. The drastic change takes place when Ichigo and his friends go to soul society to save Rukia. The Soul Society Arc was filled with action and meaningful fights, and the main plot of the story takes place at the end of this arc. Bleach does have many filler episodes but the real thrill starts when the Arrancar arc follows and Espadas shows up.

Few things that are similar in The Big Three are:

  • Amazing action scenes.
  • Dumb, Strong and Lovable Main Characters. (Smartest characters when they are in battle).
  • Best openings and soundtracks.
  • Badass Antagonist Groups
  • Beautiful Queens obsessed with Hero.
  • Badass Sensei (Teachers).
  • Strong Old Era Characters.
  • Smart Characters who are always one step ahead.
  • Strong Side characters who are liked more than main character.

Conclusion

Last but not least is the deployment of the Data Science project. You can deploy the Data Science project using Streamlit. Soon the article will be published on it.

Streamlit turns data scripts into shareable web apps in minutes.

The Big Three anime has a very loyal fanbase. Even if better anime exists fans always love these three. One last thing never compares these three, they are unique in their own way.

Web Scraping Dataset Credits: ListFist

Check out Listfist for A Fistful of Lists. One Piece Arcs List || Naruto Arcs List || Bleach Arcs List

If you like the project and content, Support Anime Vyuh by Buying a coffee.

Download the Jupyter Notebook for the source code.