
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
pmatcher
Advanced tools
Monadic election precinct matcher for gerrymandering data collection and research at MGGG
Matching election data to shapefiles is hard. It is usually context-dependent and implemented on a project-by-project basis. It also sometimes involves some manual labor. This attempts to make life easier for everyone who has to deal with precinct matching.
pip install pmatcher
VEST releases its precincts with VTD codes and county FIPS codes. To validate this approach, I ran the matcher on known, good data.
Results (in % accuracy):
Exact match 0.9444831591173054
Insensitive match 0.9444831591173054
Insensitive normalized match 0.9932636469221835
Aggressive insensitive normalized match 0.9983739837398374
matcher.default()
Applies exact, insensitive, normalized, and weighted_manual in that order.
All batteries included!
matcher.exact()
Matches exact strings.
matcher.insensitive()
Matches strings (case-insensitive).
matcher.insensitive_normalized()
Matches strings with special characters removed (e.g.(), #, -).
matcher.weighted_manual()
Uses a weighted levenshtein algorithm.
First looks for token-distance, followed by token word distance for tiebreaking.
matcher.save_progress("progress.json")
Saves progress/mapping to a json file.
matcher.load_progress("progress.json")
Loads progress/mapping from a json file.
from pmatcher import PrecinctMatcher
matcher = PrecinctMatcher(list_1, list_2)
mapping = matcher.default()
from pmatcher import PrecinctMatcher
matcher = PrecinctMatcher(list_1, list_2)
matcher.exact()
matcher.insensitive()
matcher.insensitive_normalized()
matcher.insensitive_normalized(aggressive=True)
mapping = matcher.weighted_manual()
FAQs
Monadic election precinct matcher for gerrymandering data collection and research at MGGG
We found that pmatcher demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.