image image image image
image
Online Code Book Downloadable Code Book Code Repository SCDB Web 101
Code Repository
Users of the Supreme Court Database are oftentimes interested in manipulating the data in a particular fashion, or merging the data with other available data sources about the Supreme Court. This section of the website contains contributed computer code that can be used to perform particular common tasks. (In the future the website will also host contributed datasets that can be easily merged on to the Supreme Court Database.)

If you have questions or comments about the available code please email the author. If you have code you would like to contribute please contact us.
  1. Select Citations, Including Split Votes
  2. Date Added : August 24, 2009
    click to show/hide details
    Some analysts may wish to select a unit of analysis different from the four formats that we distribute. Any selection can be accomplished by parsing the identification variables (SCDB Case ID, SCDB Docket ID, SCDB Issues ID, and SCDB Vote ID). This code selects the first issue for the first docket associated with a particular citation, keeping two records if there is a split vote on that issue. This corresponds to the ANALU=0, or 4 in the legacy database.
    Author : Andrew D. Martin / email
    Download File : citationSplitVote.do
  3. Select All Dockets, Including Split Votes
  4. Date Added : August 24, 2009
    click to show/hide details
    Some analysts may wish to select a unit of analysis different from the four formats that we distribute. Any selection can be accomplished by parsing the identification variables (SCDB Case ID, SCDB Docket ID, SCDB Issues ID, and SCDB Vote ID). This code selects the first issue for associated with each docket, keeping two records if there is a split vote on that issue. This corresponds to the ANALU=0, 1, or 4 in the legacy database.
    Author : Andrew D. Martin / email
    Download File : docketSplitVote.do
  5. Convert Justice-Centered Data into Wide Format
  6. Last Modified : August 27, 2009
    click to show/hide details
    The Justice Centered Data contain one record for each justice participating in the dispute for the chosen unit of analysis. For example, each docket will have a record for each justice in the Cases Organized by Docket dataset. For some types of analysis it is useful to have one record for each unit of analysis with a column of data for each justice. This is the way in which the vote data was included in the legacy Supreme Court Database. This Stata program takes data from our long format and "flips" it to a wide format.
    Author : Andrew D. Martin / email
    Download File : wideVote.do
  7. Compute Term-by-term Percentages of Cases with Concurrences
  8. Date Added : April 14, 2011
    click to show/hide details
    This code takes the justice-centered data and allows us to compute term-by-term percentages of cases that have one or more concurring votes. This code could be modified to do a similar aggregation for any justice-specific variable.
    Author : Patrick C. Wohlfarth and Andrew D. Martin / email
    Download File : concurrences.do
  CONTACT   TOP
Online Code Book Downloadable Code Book Code Repository SCDB Web 101
image The Supreme Court Database has been generously supported by the National Science Foundation.
Creative Commons License