Python scripts and instructions for:
- Trimming and formatting the r/Place 2022 dataset
- Generating color and heat maps for use in Blender
- Rendering r/Place in 3D with Blender
The scripts can be run with Jupyter Notebook guides, or by using the provided command line tool.
Starting April 1st 2022, the social news website Reddit hosted r/Place - an event where users could place pixels on a shared canvas. Each user was only allowed to place one pixel every five minutes. Various communities organized efforts to create complex works of art. In total, the event lasted four days with over six million participants. Over 160 million pixels were placed on the canvas.
Reddit released a dataset containing the timestamp, hashed user ID, color, and x,y coordinate of every pixel placed during the whole event as an 11 GB CSV file with over 160 million rows.
This project takes that data, trims it down to a size around 1 GB, generates color and "heat" maps, and uses those maps to make beautiful 3D images and time lapses using the open source 3D software, Blender.
- Python >=3.10 (tested on 3.10.2)
- Blender >=3.1 (tested on 3.1.2)
- ~4 GB of free RAM (for processing the data)
- ~15 GB of free space on the hard drive (until the raw data is trimmed)
- It helps to have a powerful GPU for rendering the frames in Blender.
Some basic knowledge of Python and Blender is assumed. It also helps if you know the Pandas and NumPy (the Python libraries). If you are a beginner, here are some Tutorials I highly recommend:
-
Clone this repository (or download it as a Zip file and extract).
-
Download the r/Place 2022 dataset (named
canvas-history/2022_place_canvas_history.csv.gzip
) as a single file. Do not extract it. -
Open the repository in a terminal and create a new virtual environment with:
python3 -m venv .venv
-
Activate the virtual environment with:
Windows:
.\.venv\Scripts\activate
Linux:
source .venv/bin/activate
-
Install the required packages with:
python -m pip install -U pip wheel setuptools python -m pip install -r requirements.txt
Or, if you have Poetry installed:
poetry install
For a tutorial-like experience, you can run the scripts in Jupyter notebook. They allow you read along with the code and see the output.
In the command line, cd
into the root of this repository. With the virtual environment activated, open the notebook by entering the following command and clicking on one of the listed guides:
jupyter notebook guides
Follow the guide and execute the code cells to execute each step of the process.
In the command line, cd
into the root of this repository. With the virtual environment activated, run the following command:
python scripts/cli.py --help
For help with one of the subcommands, execute:
python scripts/cli.py <subcommand> --help
Process the raw data and save it in 2022_place_canvas_history.parquet
:
python scripts/cli.py trim data/2022_place_canvas_history.csv.gzip data/2022_place_canvas_history.parquet
Starting at the 72-hour mark, generate 1000 frames at 30 FPS at 1000x speed. Store the results in data/frames_color
and data/frames_heat
:
python scripts/cli.py generate data/2022_place_canvas_history.parquet data/frames_color data/frames_heat --start_ms 259200000 --timescale 1000 --frames 1000 --fps 30
Use the following command to generate a new requirements.txt
file for non-Poetry users:
poetry export --without-hashes > requirements.txt
This project has recently updated to use "heat maps" instead of "age maps". You can still find the older version here.
- the r/Place Atlas (2022): A searchable map of the r/Place canvas descriptions of all the different artworks.
- PlaceViewer: r/Place in VR.