Tutorials

Step-by-step guides for data analysis and research methods

Data Analysis Tutorials

Our lab has developed comprehensive tutorials to help researchers work with complex datasets and analytical tools. These step-by-step guides include code examples, best practices, and real-world applications.


PostgreSQL Tutorial for Analyzing HMDA Data

From Big Data to Borrowing Bias

Learn how to download, import, and analyze Home Mortgage Disclosure Act (HMDA) data using PostgreSQL. This tutorial covers:

  • Downloading 12M+ mortgage lending records
  • Importing pipe-delimited data into PostgreSQL
  • Filtering and querying large datasets
  • Spatial analysis of lending patterns
  • Examining racial disparities in mortgage lending

Topics: Mortgage lending discrimination, redlining, spatial analysis, PostgreSQL, big data

View Tutorial →


CourtListener API Tutorial for Caselaw Analysis

Analyzing Legal Opinions in R

Learn how to use the Free Law Project’s CourtListener API to search, download, and analyze legal opinions. This tutorial includes:

  • Searching for cases using the CourtListener API
  • Downloading case text and metadata in R
  • Working with JSON data structures
  • Visualizing case trends over time
  • Best practices for API rate limiting

Topics: Legal data analysis, API integration, R programming, text analysis, ICWA cases

View Tutorial →


Coding Resources

Explore our code examples and workflows for spatial analysis and mapping:


Mapping the Social Determinants of Health

Mapping Food & Housing Insecurity with CDC PLACES

Learn how to download CDC PLACES data via Socrata API, join to census tracts, and create choropleth maps. This example covers:

  • Querying CDC PLACES data using Socrata API
  • Downloading census tract geometries with tigris
  • Joining spatial and attribute data
  • Mean-imputation for missing values
  • Creating maps and exporting GeoJSON

Topics: CDC PLACES, social determinants of health, food insecurity, housing insecurity, R, GIS

View Example →


Mapping Spatial Accessibility to Opioid Treatment Centers

Analyzing Access to Substance Use Treatment

Learn how to calculate spatial accessibility to opioid treatment centers using network analysis. This example demonstrates:

  • Geocoding treatment facility locations
  • Building transportation networks
  • Calculating travel times and service areas
  • Identifying treatment deserts
  • Visualizing accessibility patterns

Topics: Spatial accessibility, opioid treatment, network analysis, healthcare access, R, GIS

View Example →


Additional Resources

  • Datasets - Curated list of public datasets for social science research
  • Code Repository - GitHub repository with analysis scripts and tools
  • Publications - Our research publications with code and data

Contributing

Have suggestions for new tutorials or found an error? Please submit an issue or contact us.