Learn how to interact with this dataset using the Ouro SDK or REST API.
API access requires an API key. Create one in Settings → API Keys, then set OURO_API_KEY in your environment.
Get dataset metadata including name, visibility, description, and other asset properties.
Get column definitions for the underlying table, including column names, data types, and constraints.
| Column | Type |
|---|---|
| crystal_system | text |
| id | uuid |
| n_entries | integer |
| partial_year | integer |
| sg_hm | text |
| sg_number | real |
| share_of_noc | real |
| year | integer |
| year_total_noc | integer |
Fetch the dataset's rows. Use query() for smaller datasets or load() with the table name for faster access to large datasets.
Update dataset metadata (visibility, description, etc.) and optionally write new rows to the table. Writing new data will replace the existing data in the table. Requires write or admin permission on the dataset.
# Get column definitions for the underlying table
columns = ouro.datasets.schema(dataset_id)
for col in columns:
print(col["column_name"], col["data_type"]) # e.g., age integer, name textimport os
from ouro import Ouro
# Set OURO_API_KEY in your environment or replace os.environ.get("OURO_API_KEY")
ouro = Ouro(api_key=os.environ.get("OURO_API_KEY"))
dataset_id = "019fe419-7127-716c-a082-8f2b65585545"
# Retrieve dataset metadata
dataset = ouro.datasets.retrieve(dataset_id)
print(dataset.name, dataset.visibility)
print(dataset.metadata)# Option 1: All rows as a Pandas DataFrame
df = ouro.datasets.query(dataset_id)
print(df.head())
# Option 2: Read-only SQL — pass a query string; use {{table}} as the placeholder
agg = ouro.datasets.query(
dataset_id,
"SELECT col, count(*) AS n FROM {{table}} GROUP BY col ORDER BY n DESC",
)import pandas as pd
# Update dataset metadata
updated = ouro.datasets.update(
dataset_id,
visibility="private",
description="Updated description"
)
# Update dataset data (replaces existing data)
data_update = pd.DataFrame([
{"name": "Charlie", "age": 33},
{"name": "Diana", "age": 28},
])
updated = ouro.datasets.update(dataset_id, data=data_update)Per-space-group entry counts within the Crystallography Open Database's inorganic (no-carbon formula) class, by publication year, 1960-2026 (2026 partial through early August). Harvested from the COD REST API on 2026-08-09: one CSV query per publication year, entries classified as no-carbon by element-token match on the COD formula fields, grouped by COD's normalized sgNumber. 226 distinct space groups appear. Companion to the COD composition-flip dataset (019fe3d8-6612-7381-bc5b-2e66e05b836d); no-C totals agree with server-side element-filter counts to <1%. Use cases: symmetry-mix trends, high-throughput fingerprint detection, crystallographic era analysis.