This repository is meant as a way to disseminate data related to bankruptcies in the United States with a specific focus on farmer bankruptcies -- usually referred to as chapter 12. Chapter 12 was enacted in 1986 as a response to the 1980s farm crisis and it went into effect on November 26, 1986.
Please see the Frequently Asked Questions section to better understand farm bankruptcies (ie chapter 12), the data, and the limitations in interpreting the data.
The data are at differing levels of observation with national annually for both the calendar year and the fiscal year since the passage of Chapter 12. The government fiscal years goes from October 1 to September 30 for each year. In 1995, these national values are available at the quarterly level as well as at the court district level. In 2001, information on all other chapters of bankruptcy (business and non-business) are available for national and district. In 2007, the data are available at the monthly level onward for both the national and district. And if you would like data on the individual filings of chapter 12 bankruptcies, they are available from the start of the 2008 government fiscal year onward.
Please see the data issues for these data sources before using the data in an analysis.
For most users, the raw data are of the most importance and they are referenced above. However, this project is open-source and meant to be allow users to replicate the results to cross-check the validity of the data. If any errors are found, please submit a pull request.
- Raw data can be found in the 0-data
- Tidy data can be found in 1-tidy
- Some generic figures can be found in 2-eda
- National Time Series of chapter 12 filings. From 1986 onward as well as 2005 onward to reflect the BAPCPA influence.
- National Maps of chapter 12 filings by either court districts or state.
- National Maps with Location of chapter 12 filings from October 2007 onward
A few packages needs to be installed to maintain this repository. Most of these are on CRAN and can be installed with the install.packages()
command but one requires the devtools to be installed to install a package on GitHub:
install.packages("devtools", "gdata", "haven", "httr", "lubridate", "readxl", "rvest", "stringr", "tabulizer", "tidyverse", "zipcode", "zoo")
devtools::install_github("rdinter/usdarnass")
A quick reasoning for each package:
- gdata - for some old excel files which cannot be read with up to date packages
- haven - to read SAS files for the FJC data
- httr - web scraping the USCourts.gov
- lubridate - formatting for time series data
- readxl - reading newer excel files
- rvest - web scraping the USCourts.gov
- stringr - useful for string parsing
- tabulizer - useful for parsing the PDF tables
- tidyverse - useful for data munging
- usdarnass - downloading data from QuickStats
- zipcode - determining latitude and longitudes for locations in the FJC data
- zoo - useful for time series data