View on GitHub

dnd

D&D character stats dataset generator

D&D Character Stats Dataset Generator

The script generate_stats.R simulates the creation of 10,000 D&D characters. The resulting dataset can be used to build machine learning models (e.g. predict character race) or to just practice data analysis.

Methodology

  1. Generate 10,000 rows of ability scores using the Roll 4d6 Drop Lowest method described here.
  2. Randomly assign with uniform probability each row one of the playable races from the 5e Player’s Handbook.
  3. Apply the racial ability modifiers to the rolled ability scores as described here
  4. Calculate each row’s height and weight using the method described here

Dataset

Link to resulting dataset on Kaggle

Fields

Analysis

Link to Jupyter notebook analyzing the resulting dataset