Giter Club home page Giter Club logo

fuzzy-name-match's Introduction

Fuzzy Name Matcher

Overview

Fuzzy Name Matcher promotes the merging of two datasets in the absence of unique keys using entity names. Under the hood, it leverages the thefuzz Python package for fuzzy string matching.

Usage

  1. Upload the two datasets that are supposed to be merged (in .csv or .dta format). primary file and secondary file denote the left- and right-hand-side dataset of the merge. A left-join is performed, i.e., values in the secondary file are attached to rows in the primary file. In case you .csv format, please ensure that the files are encoded in utf-8.
  2. Specify the relevant merge columns:
  • ID column: Name of the column that contains the unique entity ID.
  • Name column: Name of the column that contains the entity name (e.g., firm or person name).
  • Year column (optional): Name of the column that contains year information.
  • Quarter column (optional): Name of the column that contains quarter information.

    The Year column and Quarter column fields might be relevant for panel datasets where entity names can change over time or different entities can exhibit identical names at different points in time.
  1. Choose entity type (either firm names or person names). Based on the entity type different string normalization operations are performed to preprocess the names prior to matching. Select Firm (US) or Firm (Int) if the sample is U.S.-based only or international to accomodate different sets of legal forms.
  2. Start merge by clicking on "Start Matching" and download the results. Note: Klick on "Stop Program" to interrupt matching, e.g., if the runtime exceeds budget.

Docker Deployment

  1. Uncomment corresponding app.launch() command at the end of main.py

  2. Build docker image called fnm from working repository

docker build --tag fnm .
docker images
  1. Run docker container fnm in detached mode from latest image (fnm:latest) and expose container port (7878) to host post (7000)
docker run -d -it --name fnm -p 7000:7878 fnm:latest
docker ps -a
  1. Check for successful start-up. The app should be available via http://localhost:7000/. Optionally, check container contents.
docker logs -f fnm
docker exec fnm ls /app/
  1. Stop and remove container
docker stop fnm; docker rm fnm

Output

The resulting merge file has the following structure:

ID column
(pf)
Name column
(pf)
Name normalized
(pf)
Name normalized of match
(sf)
Match score
(1-100)
ID column
(sf)
Name column
(sf)
6094 MEDICIS PHARMACEUTICAL CORP medicispharmaceutical medicispharmaceutcp 90 21186 MEDICIS PHARMACEUT CP -CL A

Matching scores indicate string similarity with higher scores reflecting more similar strings. Values above 90-95 commonly denote reasonably accurate matches.

fuzzy-name-match's People

Contributors

simonschoe avatar fresh-p avatar patrickjbreuer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.