项目作者: AndreaPasqualini

项目描述 :
The Johnson and Rice (2008) branching deregulation index in machine-readable form.
高级语言: HTML
项目地址: git://github.com/AndreaPasqualini/ibbea_branching_index.git
创建时间: 2019-10-07T14:13:05Z
项目社区:https://github.com/AndreaPasqualini/ibbea_branching_index

开源协议:MIT License

下载


IBBEA Branching Index

Johnson and Rice (2008) define a branching index to measure how much a US State restricts competition across banks.

The index is known to economists mostly thanks to Rice and Strahan (2010), who use it to study the effect of credit competition on small-firm performance.

The purpose of this repository is to collect the index from Rice and Strahan (2010) and provide it as a machine-and-human-readable HTML document together with a small Python program that translates it into a machine-readable CSV dataset.

preview of index

Methodology

Very simple.
I copy-pasted the HTML table that is found on the HTML version of the paper by Rice and Strahan (2010) into the file johnson_rice_branching_index.html.
The copy-paste is not exact: the caption of the table was originally contained into a table row, which I unpacked into raw text outside the table.
This means that the <table> tag only contains data to be exported to CSV and nothing else.

The program html2csv.py is a small Python program that uses pandas to parse the HTML table and export it to CSV.

Usage

  1. $ python3 html2csv.py ./johnson_rice_branching_index.html

where the first argument is the filename of the HTML file.
The output file will be a CSV file, which will have the same name except for the extension.