Skip to content

Downloads a table from a URL and outputs it as a CSV

Notifications You must be signed in to change notification settings

mccahan/get-table-csv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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"

About

Downloads a table from a URL and outputs it as a CSV

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published