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 |
|---|---|
| abundance_earth_crust | real |
| abundance_solar_log | real |
| boiling_point_K | real |
| cost_2013_usd_per_100g | real |
| cost_partner_usd_per_100g | real |
| heat_of_atomization_kJ_per_mol | integer |
| heat_of_vaporization_kJ_per_mol | real |
| hhi_production | real |
| hhi_reserve | real |
| id | uuid |
| melting_point_K | real |
| symbol | text |
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.
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 |
|---|---|
| abundance_earth_crust | real |
| abundance_solar_log | real |
| boiling_point_K | real |
| cost_2013_usd_per_100g | real |
| cost_partner_usd_per_100g | real |
| heat_of_atomization_kJ_per_mol | integer |
| heat_of_vaporization_kJ_per_mol | real |
| hhi_production | real |
| hhi_reserve | real |
| id | uuid |
| melting_point_K | real |
| symbol | text |
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.
import 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 = "019f8ff8-fcfc-7ca5-b58f-898350f6bb27"
# Retrieve dataset metadata
dataset = ouro.datasets.retrieve(dataset_id)
print(dataset.name, dataset.visibility)
print(dataset.metadata)# 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 = "019f8ff8-fcfc-7ca5-b58f-898350f6bb27"
# Retrieve dataset metadata
dataset = ouro.datasets.retrieve(dataset_id)
print(dataset.name, dataset.visibility)
print(dataset.metadata)# 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 text# 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)# 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-element reference properties for magnet-candidate screening: physical constants, crustal/solar abundance, HHI supply-risk indices (production + reserves; Gaultois et al. Chem. Mater. 2013 — the same table behind the hhi_score column in magnet_dataset_clean, weight-fraction-weighted), and elemental cost. Cost columns: cost_partner_usd_per_100g (partner-provided vintage) and cost_2013_usd_per_100g (pymatgen cost DB, Wolfram/Wikipedia Sept 2013 — stale, kept for reference). Toxicity and environmental-impact columns pending source selection (candidates: PubChem GHS hazard codes, NIOSH/OSHA exposure limits, Nuss & Eckelman 2014 cradle-to-gate GWP/CED).
Per-element reference properties for magnet-candidate screening: physical constants, crustal/solar abundance, HHI supply-risk indices (production + reserves; Gaultois et al. Chem. Mater. 2013 — the same table behind the hhi_score column in magnet_dataset_clean, weight-fraction-weighted), and elemental cost. Cost columns: cost_partner_usd_per_100g (partner-provided vintage) and cost_2013_usd_per_100g (pymatgen cost DB, Wolfram/Wikipedia Sept 2013 — stale, kept for reference). Toxicity and environmental-impact columns pending source selection (candidates: PubChem GHS hazard codes, NIOSH/OSHA exposure limits, Nuss & Eckelman 2014 cradle-to-gate GWP/CED).