Datasets:
The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: CastError
Message: Couldn't cast
title: string
url: string
external_resources: struct<scripts: list<item: string>>
child 0, scripts: list<item: string>
child 0, item: string
to
{'title': Value('string'), 'url': Value('string')}
because column names don't match
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 147, in get_rows_or_raise
return get_rows(
dataset=dataset,
...<4 lines>...
column_names=column_names,
)
File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
return func(*args, **kwargs)
File "/src/services/worker/src/worker/utils.py", line 127, in get_rows
rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
File "/src/services/worker/src/worker/utils.py", line 483, in safe_iter
yield from ds.decode(False) if ds.features else ds
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2951, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2461, in __iter__
for key, pa_table in self._iter_arrow():
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2486, in _iter_arrow
for key, pa_table in self.ex_iterable._iter_arrow():
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 547, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 430, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 343, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2378, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2306, in cast_table_to_schema
raise CastError(
...<3 lines>...
)
datasets.table.CastError: Couldn't cast
title: string
url: string
external_resources: struct<scripts: list<item: string>>
child 0, scripts: list<item: string>
child 0, item: string
to
{'title': Value('string'), 'url': Value('string')}
because column names don't matchNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
Animation2Code
Animation2Code is a benchmark for video-to-code generation of web animations. It contains 1,069 examples, each with a rendered web animation video and self-contained HTML/CSS/JavaScript that produced it.
- Paper: Animation2Code: Evaluating Temporal Visual Reasoning in Video-to-Code Generation (NeurIPS 2026)
- Project page: https://anya-ji.github.io/animation2code-website/
Dataset Structure
data/
├── train/ 769 examples
├── val/ 86 examples
└── test/ 214 examples
└── codepen-<collection_id>-<pen_id>[-<k>]/
├── animation.mp4
├── full.html
└── metadata.json
Each example directory contains exactly three files:
| File | Description |
|---|---|
animation.mp4 |
The rendered reference video (the task input). H.264 (yuv444p), 1024×768, 30 fps, about 2–8 s. |
full.html |
A self-contained HTML document with inline <style> and <script> tags (the ground-truth target). |
metadata.json |
Provenance and dependency information (see below). |
Example IDs
codepen-<collection_id>-<pen_id> names the CodePen collection and pen the example came from. When a single pen contained several independent animations, it was split into sub-examples with a -<k> suffix (e.g. codepen-DrPkOq-poyOMgr-1 … -4). All sub-examples of a pen are in the same split.
Metadata fields
In metadata.json:
| Field | Presence | Description |
|---|---|---|
title |
always | Pen title given by the original author. |
url |
always | Canonical CodePen URL, kept for attribution. |
external_resources |
486 / 1,069 | {"scripts": [...], "stylesheets": [...]}: URLs of external libraries and stylesheets the pen loads. These are not inlined into full.html and must be loaded from the network when rendering. |
jquery_translated |
41 / 1,069 | The jQuery URL that was removed when the pen's jQuery code was translated to vanilla JavaScript. |
Example:
{
"title": "Merry Christmas Tree!",
"url": "https://codepen.io/chrisgannon/pen/dypvKvR",
"external_resources": {
"scripts": [
"https://unpkg.co/gsap@3/dist/gsap.min.js",
"https://s3-us-west-2.amazonaws.com/s.cdpn.io/16327/MorphSVGPlugin3.min.js"
]
}
}
Usage
The data is stored as raw files (one directory per example), so download it with huggingface_hub:
import json
from pathlib import Path
from huggingface_hub import snapshot_download
root = Path(snapshot_download("anim2code/dataset", repo_type="dataset"))
# For a single split only: snapshot_download(..., allow_patterns="data/test/*")
for ex_dir in sorted((root / "data" / "test").iterdir()):
video_path = ex_dir / "animation.mp4"
html = (ex_dir / "full.html").read_text()
meta = json.loads((ex_dir / "metadata.json").read_text())
Or with the CLI:
hf download anim2code/dataset --repo-type dataset --local-dir anim2code_data
Dataset Statistics
| Split | Examples |
|---|---|
| train | 769 |
| val | 86 |
| test | 214 |
| total | 1,069 |
Durations: 2–8 s (mean 5.1 ± 2.4 s). Looping animations are captured for at least one full cycle.
License
This dataset is released under CC BY 4.0. The original code comes from public CodePen pens, which are MIT-licensed (CodePen licensing). Each example's metadata.json keeps the original pen URL so the original author can be credited.
Citation
@article{ji2026animation2code,
title = {Animation2Code: Evaluating Temporal Visual Reasoning in Video-to-Code Generation},
author = {Ji, Anya and Mudunuri, Abhijith Varma and Chan, David M. and Suhr, Alane},
year = {2026},
eprint = {2606.28593},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2606.28593},
}
- Downloads last month
- 13