Published on 2024-11-13 12:00 by Adam Surette
Dashboard
TLDW (Too Long Didn’t Watch)
This analysis of Nintendo’s console production shows that handheld consoles experience a gradual phase-out with overlapping game production, while stationary consoles see a sharper decline once a new model is released.
Handhelds, such as the Game Boy series, often have multiple years of game overlap due to factors like longer user times and portability. The early stationory consoles were similar.
In contrast, after 2000, Nintendo shifted to quickly discontinuing older stationary consoles to promote newer models, like the Wii U and Switch.
This highlights Nintendo’s strategic shift in balancing handheld and stationary consoles to meet changing consumer needs. Additionally, arcade games steadily declined as consoles became the focus from the 1980s onward.
Data Source
I did this project as a practice in using Dash and also as a practice for webscraping. All the data was scraped from Nintendo fan built wikis. Here is an example of one of them.
import requests
from bs4 import BeautifulSoup
import pandas as pd
url = 'https://nintendo.fandom.com/wiki/List_of_Nintendo_games_by_year_(North_America)'
# Send a request to fetch content of webpage
response = requests.get(url)
# Parse HTML content with BeautifulSoup
soup = BeautifulSoup(response.text, 'html.parser') # Used .text to get HTML content as a string
# Find the release year
years, titles, consoles = [], [], []
# Extract data based on actual page structure
for h3 in soup.find_all('h3'):
# Get the release year from the < h3 > tag
release_year = h3.get_text(strip=True)
# Find the list of games in < ul > following each < h3 > year header
ul = h3.find_next_sibling('ul')
if ul:
for li in ul.find_all('li'):
# Extract title and console
title = li.find('i').get_text() if li.find('i') else 'N/A'
console = li.get_text().split(' - ')[-1] # Get console info after " - "
# Append data to lists
years.append(release_year)
titles.append(title)
consoles.append(console)
# Create a DataFrame
df = pd.DataFrame({
"Release_Year": years,
"Game_Title": titles,
"Console": consoles
})
# Remove incorrect columns
df = df[df['Game_Title']!='N/A']
df['Release_Year'] = df['Release_Year'].str.replace('[\[\]]', '', regex=True)
df.to_csv('/.../.../.../csvname.csv', index=False)
Written by Adam Surette
← Back to all projects