Skip to content

Latest commit

 

History

History
21 lines (12 loc) · 649 Bytes

README.md

File metadata and controls

21 lines (12 loc) · 649 Bytes

download-table-csv

Downloads websites and outputs a table as a CSV.

Installation

npm install -g get-table-csv

Usage

get-table-csv <url> <selector>

Options:

  • -c to require the rows to have the same number of columns as the first row. Helps strip out extra rows, e.g. footnotes at the end.
  • -h to replace the first row with custom column names

Example

Download the Local Area Unemployment Statistics figures by MSA from the U.S. Bureau of Labor Statistics

get-table-csv https://www.bls.gov/web/metro/laummtrk.htm '#laummtrk' -c -h "MSA,UNEMPLOYMENT_RATE,UNEMPLOYMENT_RANK"