Skip to main content

Getting Started

IRW datasets are hosted on Redivis, a platform for academic data sharing and analysis. There are a few different ways you can access IRW data—whether you’re just browsing, downloading tables, or working programmatically in R or Python.

NOTE: You can explore datasets, and download a table under 100 MB as a CSV from its page on this site, without logging in. The Stata package reads that same no-account path, so it needs no Redivis account either, within the same 100 MB limit. The R package (irw 1.4.0 or later, on CRAN) reads every public table with no account at all. A free Redivis account is required for everything else: larger downloads from this site, the Python package, the IRW MCP server, and the Redivis website and notebooks. You can create an account here.

The sections below walk through each access option and include example code to help you get started.

Option 1: Browse and Download from the Redivis Web Interface

If you’re just looking to explore or manually download individual datasets, you can:

  • View datasets through the IRW Data Browser
  • Download a table as a CSV from its page on this site, with no account, for tables under 100 MB.
  • Download tables as CSV files from the Redivis web interface (Redivis login required).

This is the simplest way to get started if you don’t need programmatic access.

Option 3: Use Redivis Client Libraries (R or Python)

If you prefer working outside of R or want low-level access to Redivis features, you can use the official Redivis client libraries. These are available for both R and Python.

Example access to IRW with Redivis Client Libraries:

Code
# first install the redivis R package (it is not on CRAN) with:
# install.packages("redivis", repos = c("https://redivis.r-universe.dev", getOption("repos")))
library("redivis")

dataset <- redivis::user("datapages")$dataset("item_response_warehouse") # connect to IRW
df <- dataset$table("4thgrade_math_sirt")$to_tibble() # download data
Code
# first install redivis Python package with `pip install --upgrade redivis`
import redivis

dataset = redivis.user('datapages').dataset('item_response_warehouse') # connect to IRW
df = dataset.table('4thgrade_math_sirt').to_pandas_dataframe() # download data

How to use the Redivis Client Libraries

There are two main ways to use the Redivis client libraries:

  1. Use a Redivis Notebook
  • Redivis notebooks come preloaded with the latest library – no installation or authentication required. Ideal for first-time users or lightweight workflows.
  • We also provide some example workflows with IRW in Redivis notebooks here.
  1. Use in Other Environments (e.g., RStudio, Jupyter, Colab, etc.)
  • Requires installing the appropriate client library (see example code above for installation)
  • In Python you will need to authenticate with your Redivis account (first-time use will prompt browser login for OAuth), or you may also use API tokens for authentication for long-running jobs (see here for more information about how to generate and set up your API token). In R, reading needs no login; see above.

For more detailed setup and usage examples, see the full Redivis R and Python client documentation here:

Option 4: Work with an AI Assistant

If you use an AI assistant such as Claude, ChatGPT, or Gemini, you can point it at the IRW in one of two ways. You can paste a short briefing that teaches it the data standard and the defaults that go wrong silently. If your assistant supports MCP, you can also install the IRW server (pip install "irw[mcp]"), which lets it search the warehouse and read tables using your own Redivis account. See Using an AI Assistant with the IRW for both.

Analysis of IRW data

We next provide some examples for working with IRW data. The below code blocks import multiple datasets from the IRW and compute some simple metadata (e.g., the number of responses). This should be a useful starting point for conducting your own analyses of the data.

A first analysis

Code
library(irw)
library(dplyr)
library(purrr)


compute_metadata <- function(df) {
  df <- df |> filter(!is.na(resp)) |> mutate(resp = as.numeric(resp))
  tibble(
    n_responses = nrow(df),
    n_categories = n_distinct(df$resp),
    n_participants = n_distinct(df$id),
    n_items = n_distinct(df$item),
    responses_per_participant = n_responses / n_participants,
    responses_per_item = n_responses / n_items,
    density = (sqrt(n_responses) / n_participants) * (sqrt(n_responses) / n_items)
  )
}

dataset_names <- c("4thgrade_math_sirt", "chess_lnirt", "dd_rotation")
tables<-irw::irw_fetch(dataset_names)
summaries_list <- lapply(tables,compute_metadata)
summaries <- bind_rows(summaries_list)
summaries<-cbind(table=dataset_names,summaries)
summaries
table n_responses n_categories n_participants n_items responses_per_participant responses_per_item density
4thgrade_math_sirt 19920 2 664 30 30.000000 664.0 1.0000000
chess_lnirt 10240 2 256 40 40.000000 256.0 1.0000000
dd_rotation 1178 2 121 10 9.735537 117.8 0.9735537
Code
import irw
import pandas as pd
from math import sqrt

dataset_names = ["4thgrade_math_sirt", "chess_lnirt", "dd_rotation"]

def compute_metadata(df):
    df = (df
          .loc[~df['resp'].isna()]
          .assign(resp=pd.to_numeric(df['resp']))
         )
    return pd.DataFrame({
        'n_responses': [len(df)],
        'n_categories': [df['resp'].nunique()],
        'n_participants': [df['id'].nunique()],
        'n_items': [df['item'].nunique()],
        'responses_per_participant': [len(df) / df['id'].nunique()],
        'responses_per_item': [len(df) / df['item'].nunique()],
        'density': [(sqrt(len(df)) / df['id'].nunique()) * (sqrt(len(df)) / df['item'].nunique())]
    })

tables = irw.fetch(dataset_names)
summaries_list = [compute_metadata(df).assign(table=name) for name, df in tables.items()]
summaries = pd.concat(summaries_list, ignore_index=True)
summaries = summaries[['table'] + [c for c in summaries.columns if c != 'table']]
print(summaries)