Skip to content

occrp/tabref

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tabref

tabref is a tool for cross-referencing datasets with a (potentially large) list of search terms. For example, it could be used to search mentions of a set of company or person names in a large stash of CSV files, or within tables in a database.

Here's why it's useful:

  • The tool will search across large amounts of data reasonably quickly and simply.
  • It's optimized to search people and company mentions, using text and company name normalization to produce matches more flexibly.

Usage

Here's what you need to get started with tabref:

  • A CSV file with a "name" column to be used as a set of search terms.
  • Either a CSV file, a directory of CSV files, or a database connection URI that contains tables you want to search across.

After running, tabref will drop a CSV file into the specified output directory that contains all the matching rows in the source CSV file or SQL table. The output file will also contain extra _match columns that describe the matching search term and match location.

# Search all tables in `mydb`:
$ tabref sql --db postgresql://localhost/mydb --match-list searches.csv --out-path matches/

# Search only the table `mytable`:
$ tabref sql --db postgresql://localhost/mydb --match-list searches.csv --out-path matches/ --table mytable

# Search inside a CSV file:
$ tabref csv --match-list searches.csv --out-path matches/ mycsv.csv

TODO

  • Use click's path handling
  • Multi-threading of matcher process

About

Cross-referencing tool for tabular data (in databases or CSV).

Resources

License

Stars

1 star

Watchers

18 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages