Skip to contents

The rtemis demo dataset is hosted on two sites: as rtemis/demo on the Hugging Face Hub and as rtemisorg/rtemis-demo on Kaggle. Both copies hold the same two Parquet files, data/regression.parquet and data/classification.parquet, and the same Croissant file, croissant.json, which describes them.

Each site also generates its own Croissant metadata for every dataset it hosts. This article reads the metadata each site generates, compares the two documents with the dataset’s own croissant.json, and reads the records from each site through the dataset’s own metadata.

The article downloads from both sites when it is built.

library(croissant)
# One cache per site, so that each site's files download from that site
cache_hf <- tempfile("croissant_hf_")
cache_kaggle <- tempfile("croissant_kaggle_")

The metadata each site generates

read_croissant_hf() reads the metadata the Hub generates from its Parquet conversion of the dataset and from the dataset card.

hf_generated <- read_croissant_hf("rtemis/demo")
#> 2026-11-14 16:45:06 ▶ Reading hf://datasets/rtemis/demo... [read_croissant_hf]
#> 2026-11-14 16:45:07 Read demo: Croissant 1.1, 2 record sets, 2 enumerations, 3 files [read_croissant_hf]
#> 2026-11-14 16:45:07 ℹ The repository also holds Croissant metadata of its own: read_croissant("hf://datasets/rtemis/demo/croissant.json") [note_own_croissant]
hf_generated
#> <Croissant>
#>   demo
#>   rtemis demo Synthetic tabular data for demonstrations and tests of supervis...
#>   Record sets (2)
#>     classification  102 fields: split, x1, x2, x3, x4, x5, x6, x7, and 94 more
#>     regression      102 fields: split, x1, x2, x3, x4, x5, x6, x7, and 94 more
#>   Enumerations (2)
#>     classification_splits (1), regression_splits (1)
#>   Files (3)
#>     repo                                     git+https, https://huggingface.c...
#>     parquet-files-for-config-classification  file set, application/x-parquet,...
#>     parquet-files-for-config-regression      file set, application/x-parquet,...
#>   Metadata
#>     version           Croissant 1.1
#>     license           https://choosealicense.com/licenses/cc0-1.0/
#>     creator           rtemis
#>     url               https://huggingface.co/datasets/rtemis/demo
#>     keywords          tabular-regression, tabular-classification, cc0-1.0, 1K...
#>     other properties  alternateName
#>   Usage
#>     fields(x, "classification")           fields
#>     read_record_set(x, "classification")  records

read_croissant_kaggle() reads the metadata Kaggle generates, the document that the dataset page offers as “Export metadata as Croissant”.

kaggle_generated <- read_croissant_kaggle("rtemisorg/rtemis-demo")
#> 2026-11-14 16:45:07 ▶ Reading https://www.kaggle.com/datasets/rtemisorg/rtemis-demo... [read_croissant_kaggle]
#> 2026-11-14 16:45:07 Read rtemis demo: Croissant 1.0, 0 record sets, 2 files [read_croissant_kaggle]
kaggle_generated
#> <Croissant>
#>   rtemis demo
#>   Synthetic tabular data for demonstrations and tests of supervised learning:...
#>   Files (2)
#>     archive.zip               application/zip, 1.082 MB, https://www.kaggle.c...
#>     application-json_fileset  file set, application/json, includes *.json, in...
#>   Metadata
#>     version           Croissant 1.0
#>     dataset version   1.0.0
#>     license           CC0: Public Domain
#>     creator           rtemis
#>     publisher         Kaggle
#>     url               https://www.kaggle.com/datasets/rtemisorg/rtemis-demo/v...
#>     keywords          audience > beginner, task > binary-classification, task...
#>     other properties  alternateName, includedInDataCatalog, isAccessibleForFr...

The dataset’s own metadata

croissant.json is an ordinary file of each copy of the dataset; neither site reads it or changes it. read_croissant() reads it from the Hub by its hf://datasets/ path, here at the tag v1.0.0, and read_croissant_kaggle() reads it from Kaggle when given its path in the dataset as file.

own_hf <- read_croissant("hf://datasets/rtemis/[email protected]/croissant.json")
#> 2026-11-14 16:45:07 ▶ Reading hf://datasets/rtemis/[email protected]/croissant.json... [read_croissant]
#> 2026-11-14 16:45:08 Read demo: Croissant 1.1, 2 record sets, 21 enumerations, 2 files [read_croissant]
own_kaggle <- read_croissant_kaggle("rtemisorg/rtemis-demo", file = "croissant.json")
#> 2026-11-14 16:45:08 ▶ Reading https://www.kaggle.com/api/v1/datasets/download/rtemisorg/rtemis-demo/croissant.json... [read_croissant_kaggle]
#> 2026-11-14 16:45:08 Read demo: Croissant 1.1, 2 record sets, 21 enumerations, 2 files [read_croissant_kaggle]
own_hf
#> <Croissant>
#>   demo
#>   Synthetic tabular data for demonstrations and tests of supervised learning:...
#>   Record sets (2)
#>     regression      101 fields: x1, x2, x3, x4, x5, x6, x7, x8, x9, and 92 more
#>     classification  101 fields: x1, x2, x3, x4, x5, x6, x7, x8, x9, and 92 more
#>   Enumerations (21)
#>     x9_levels (3), x10_levels (2), x19_levels (4), x20_levels (2), and 17 more
#>   Files (2)
#>     regression.parquet      application/x-parquet, 700.9 kB, data/regression....
#>     classification.parquet  application/x-parquet, 691.8 kB, data/classificat...
#>   Metadata
#>     version          Croissant 1.1
#>     dataset version  1.0.0
#>     license          https://creativecommons.org/publicdomain/zero/1.0/
#>     creator          E.D. Gennatas
#>     publisher        rtemis
#>     published        2026-11-01
#>     url              https://huggingface.co/datasets/rtemis/demo
#>     keywords         synthetic data, supervised learning, regression, classif...
#>     responsible AI   data_collection, data_collection_type, data_collection_r...
#>   Usage
#>     fields(x, "regression")           fields
#>     read_record_set(x, "regression")  records

The two objects differ only in base, the location each document’s relative contentUrls resolve against: the Hub revision for one and the Kaggle API for the other.

own_hf@base
#> [1] "hf://datasets/rtemis/[email protected]"
own_kaggle@base
#> [1] "https://www.kaggle.com/api/v1/datasets/download/rtemisorg/rtemis-demo"

write_croissant() writes the metadata without base, and writes the same JSON-LD for both.

identical(write_croissant(own_hf), write_croissant(own_kaggle))
#> [1] TRUE

Comparison

The following table summarizes each document with the accessors about(), files(), record_sets(), enumerations(), and fields().

summarize_croissant <- function(x) {
  a <- about(x)
  or_absent <- function(v) {
    if (is.null(v)) "absent" else paste(v, collapse = ", ")
  }
  rs <- names(record_sets(x))
  f <- data.table::rbindlist(lapply(rs, function(r) fields(x, r)))
  n_described <- if (nrow(f) > 0L) sum(!is.na(f[["description"]])) else 0L
  c(
    `Croissant version` = x@version,
    `Dataset version` = or_absent(a[["dataset_version"]]),
    License = or_absent(a[["license"]]),
    Creator = or_absent(a[["creator"]]),
    `citeAs` = if (is.null(a[["cite_as"]])) "absent" else "present",
    `datePublished` = or_absent(a[["date_published"]]),
    Files = paste(
      paste0(files(x)[["id"]], " (", files(x)[["encoding_format"]], ")"),
      collapse = "; "
    ),
    `Record sets` = if (length(rs) > 0L) paste(rs, collapse = ", ") else "none",
    Enumerations = as.character(length(enumerations(x))),
    `Fields with a description` = paste0(n_described, " of ", nrow(f)),
    `Data types` = if (nrow(f) > 0L) {
      paste(sort(unique(f[["data_type"]])), collapse = ", ")
    } else {
      "none"
    }
  )
}
comparison <- data.frame(
  `Hugging Face generated` = summarize_croissant(hf_generated),
  `Kaggle generated` = summarize_croissant(kaggle_generated),
  `croissant.json, either site` = summarize_croissant(own_hf),
  check.names = FALSE
)
knitr::kable(comparison)
Hugging Face generated Kaggle generated croissant.json, either site
Croissant version 1.1 1.0 1.1
Dataset version absent 1.0.0 1.0.0
License https://choosealicense.com/licenses/cc0-1.0/ CC0: Public Domain https://creativecommons.org/publicdomain/zero/1.0/
Creator rtemis rtemis E.D. Gennatas
citeAs absent absent present
datePublished absent absent 2026-11-01
Files repo (git+https); parquet-files-for-config-classification (application/x-parquet); parquet-files-for-config-regression (application/x-parquet) archive.zip (application/zip); application-json_fileset (application/json) regression.parquet (application/x-parquet); classification.parquet (application/x-parquet)
Record sets classification, regression none regression, classification
Enumerations 2 0 21
Fields with a description 0 of 204 0 of 0 202 of 202
Data types cr:Float64, cr:Int32, sc:Text none sc:Float, sc:Integer, sc:Text

The Hub describes its Parquet conversion of the data, stored on the branch refs/convert/parquet: one file set and one record set per table, with an added split field whose values an enumeration lists. Its data types come from the Parquet schema, and its name, description, license, and keywords from the dataset card.

Kaggle describes the version’s zip archive and the files within it whose format it recognizes; its name, alternateName, description, license, and keywords come from the dataset’s settings on Kaggle.

The dataset’s own metadata names each Parquet file with its SHA-256, gives each field a description and the data type of its R column, and lists the levels of each categorical field in an enumeration.

Validation

validate_croissant() reports the issues of each document.

validate_croissant(hf_generated)
#> <CroissantIssues>
#>   0 errors, 3 warnings
#>   Warnings
#>   - [Croissant(demo)] The recommended property citeAs is absent.
#>   - [Croissant(demo)] The recommended property datePublished is absent.
#>   - [Croissant(demo)] The recommended property version is absent.
validate_croissant(kaggle_generated)
#> <CroissantIssues>
#>   0 errors, 2 warnings
#>   Warnings
#>   - [Croissant(rtemis demo)] The recommended property citeAs is absent.
#>   - [Croissant(rtemis demo)] The recommended property datePublished is absent.
validate_croissant(own_hf)
#> <CroissantIssues>
#>   0 errors, 0 warnings

Records

read_record_set() reads a record set from the files its metadata names. The Hub-generated record set classification reads from the Hub’s Parquet conversion:

generated <- read_record_set(
  hf_generated,
  "classification",
  cache_dir = cache_hf
)
#> 2026-11-14 16:45:09 ▶ Reading record set classification of demo... [read_record_set]
#> 2026-11-14 16:45:09 ℹ Downloading hf://datasets/rtemis/demo@ac707d2/classification/train/0000.parquet (691.8 kB) [hf_fetch]
#> 2026-11-14 16:45:09 Read in 1,000 x 102 in 0.9 s [read_record_set]
dim(generated)
#> [1] 1000  102

The dataset’s own record set classification reads from the uploaded Parquet file, from each site. Each download is verified: from the Hub against the SHA-256 the Hub lists for the file, and from Kaggle against the SHA-256 in the metadata.

from_hf <- read_record_set(own_hf, "classification", cache_dir = cache_hf)
#> 2026-11-14 16:45:10 ▶ Reading record set classification of demo... [read_record_set]
#> 2026-11-14 16:45:10 ℹ Downloading hf://datasets/rtemis/demo@465df0b/data/classification.parquet (691.8 kB) [hf_fetch]
#> 2026-11-14 16:45:10 Read in 1,000 x 101 in 0.7 s [read_record_set]
from_kaggle <- read_record_set(
  own_kaggle,
  "classification",
  cache_dir = cache_kaggle
)
#> 2026-11-14 16:45:10 ▶ Reading record set classification of demo... [read_record_set]
#> 2026-11-14 16:45:10 ℹ Downloading https://www.kaggle.com/api/v1/datasets/download/rtemisorg/rtemis-demo/data%2Fclassification.parquet [download_cached]
#> 2026-11-14 16:45:11 Read in 1,000 x 101 in 1.0 s [read_record_set]
identical(from_hf, from_kaggle)
#> [1] TRUE
dim(from_hf)
#> [1] 1000  101

The Hub-generated records hold the split column in addition to the dataset’s columns:

setdiff(names(generated), names(from_hf))
#> [1] "split"

The dataset’s own metadata describes each column, as fields() returns:

knitr::kable(fields(own_hf, "classification")[c(1L, 101L), c("column", "description")])
column description
x1 Numeric, standard normal; correlation 0.5 with the other numeric features of x1 to x10. Noise: unrelated to the outcome.
class Outcome. Categorical, levels no and yes; yes is the positive class. P(yes) = logistic(1.5 * (f - 0.35)), where f is the signal function. Bayes error: 0.181.