npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mailwoman/ban

v6.5.0

Published

Base Adresse Nationale (France) rooftop address-point ingestion — builds the national FR precision shard on the situs address-point schema.

Readme

@mailwoman/ban

Base Adresse Nationale (France) rooftop ingestion. This package reads the open BAN CSV dumps (adresses-<dept>.csv, adresse.data.gouv.fr) and builds the national FR address-point shard on the same situs schema the US rooftop tier already uses — so the existing AddressPointSqliteLookup reads it with zero changes, and the resolver gains rooftop precision across France from the authoritative government register (26M addresses) instead of the sparse community fallback (OSM-FR, ~1.1M points).

It is the French counterpart of the 50-state US situs layer (#1012). It closes the measured FR rooftop gap: commune resolution was already ~99% @25 km, but @1 km sat at ~37% and was flat from clean to messy input — the flatness is the tell of a coverage ceiling, not a parse problem. BAN is the coverage.

The licensing boundary

Unlike the ODbL OpenStreetMap tier, BAN is published under the Licence Ouverte / Open Licence 2.0 (Etalab) — attribution only, no share-alike. So the built shard ships under the same terms as the permissive Mailwoman core (Who's On First, Overture, OpenAddresses, GeoNames); there is no lawyer sign-off gate. The one standing obligation is attribution:

  • This package is code, and code only. It contains no BAN bytes.
  • Attribution rides on any result resolved through a BAN point. The source on every BAN point is ban:fr, and the resolver should surface "© les contributeurs de la Base Adresse Nationale (adresse.data.gouv.fr)".

Building the shard

BAN's per-département dumps land under $MAILWOMAN_DATA_ROOT/…/ban/ (or the corpus source dir). The build streams them — no external CLI, no DuckDB — so it is dependency-light and OOM-safe on the 26M-row national set.

# 1. Download the per-département dumps (or the national adresses-france.csv.gz):
#    https://adresse.data.gouv.fr/data/ban/adresses/latest/csv/adresses-<dept>.csv.gz
#    → $MAILWOMAN_DATA_ROOT/ban/sources/   (or reuse an existing corpus/sources/ban)

# 2. Build the national shard (writes $MAILWOMAN_DATA_ROOT/ban/address-points-fr.db, sealed 0444):
node ban/out/scripts/build-address-point-shard.js \
  --csv-dir $MAILWOMAN_DATA_ROOT/corpus/sources/ban --release 2026-05-18

# Validate on a few départements first (transient; skips the provenance rewrite):
node ban/out/scripts/build-address-point-shard.js --depts 48,2A,05 --out /tmp/ban-sample.db

The build records provenance (source URL, license, release, row count, md5) in ban/ATTRIBUTION.json at creation, seals the artifact read-only, and swaps it into place atomically — it is a new, purely-additive file and never touches the OSM shard beside it.

The resolution tier

BANShardProvider.for(country) is wired into GeocodeDeps.nationalShards, consulted ahead of the OSM osmShards tier (a national authoritative register outranks the community fallback) and only for a non-US parse. BAN rows carry their own postcode + commune, so the lookup keys on the scoped (postcodelocality) probes; no bbox fall-through is needed. Interpolation for house numbers BAN doesn't carry is not built yet — the exact-point tier is the whole win here (BAN's density is the point).