← All Scripts
Live Data Script

Video Game Sales (1980–2024)

64,000+ real video game titles with global sales, critic scores, and regional breakdowns. Fetched live over HTTPS. No Kaggle account needed.

REAL DATA 64,000+ ROWS GAMING BAR CHART + CITY VIEW

The Script

This script fetches the real Kaggle "Video Game Sales & Industry Data" dataset directly over HTTPS. 64,000+ titles spanning 44 years of gaming, with sales figures for NA, Japan, PAL regions, critic scores, and publisher data. DuckDB reads the CSV in-flight. No file download, no Kaggle account, no setup.

-- fetch_videogames.lua — Video Game Sales & Industry Data (1980–2024)
--
-- Fetches the real Kaggle dataset (64,000+ titles) directly from columnlens.com.
-- DuckDB's httpfs extension reads the CSV over HTTPS — no local download needed.
-- Bar chart: total sales by genre. City View: height=total_sales,
-- color=genre, district=console.

ds.log("=== Video Game Sales — 1980–2024 ===")
ds.log("Fetching 64K+ titles from columnlens.com...")

ds.query([[
    SELECT *
    FROM read_csv_auto(
        'https://columnlens.com/datasets/Video_Games_Sales_Cleaned.csv'
    )
]])

ds.log("Loaded " .. ds.data.row_count .. " video game titles")
ds.log("Columns: " .. table.concat(ds.data.column_names, ", "))

-- Bar chart: total sales by genre
ds.chart.type  = "bar"
ds.chart.x     = 3      -- genre
ds.chart.y     = {7}    -- total_sales
ds.chart.title = "Total Sales by Genre (millions)"

ds.log("=== Chart ready ===")
ds.log("Try: SELECT publisher, round(sum(total_sales),2) AS total FROM _cl_result GROUP BY 1 ORDER BY 2 DESC LIMIT 10")
ds.log("City View: height=total_sales | color=genre | district=console")

Data Source

Kaggle "Video Game Sales & Industry Data" by Bhushan Divekar. CC0 public domain. Hosted on columnlens.com for direct HTTPS access.

What You Get

Title, console, genre, publisher, developer, critic score, total sales, regional sales (NA, JP, PAL, other), release date.

Try These Queries

SELECT publisher, round(sum(total_sales),2) AS total FROM _cl_result GROUP BY 1 ORDER BY 2 DESC LIMIT 10

City View

Set height to total_sales, color to genre, district to console. GTA, Wii Sports, and Mario tower over 64,000 other titles.


Run this script in ColumnLens

Paste it into the Script Console and explore 44 years of gaming history.

Download on the Mac App Store
Or try the free version (up to 100 MB)