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

reversejp-wasm

v0.2.1

Published

ReverseJP is a Rust library for reverse geocoding in Japan.

Readme

Japan Geo Reverse Lookup

A Rust library for reverse geocoding in Japan. Given a longitude and latitude, this library returns information about the region(s) the coordinates are located in, including code, name, and English name.

Installation

Rust Crates.io Version

cargo add reversejp
// reversejp-rust/examples/demo.rs
use reversejp::ReverseJp;

let reverse_jp = ReverseJp::with_embedded_data().unwrap();
let props = reverse_jp.find_properties(139.7670, 35.6812);

for prop in props {
    println!("Code: {}, Name: {}, English Name: {}", prop.code, prop.name, prop.en_name);
}

Example output:

Code: 130010, Name: 東京都, English Name: Tokyo
Code: 1310100, Name: 千代田区, English Name: Chiyoda City

Performance benchmark(Under MacBook Pro with Apple M3 Max):

Python PyPI - Version

pip install reversejp
# reversejp-python/examples/demo.py
import reversejp

props = reversejp.find_properties(139.7670, 35.6812)

for prop in props:
    print(prop.code, prop.name, prop.en_name)

Example output:

130010 東京都 Tokyo
1310100 千代田区 Chiyoda City

Performance benchmark(Under MacBook Pro with Apple M3 Max):

-------------------------------------------------- benchmark: 1 tests --------------------------------------------------
Name (time in us)           Min       Max     Mean   StdDev   Median     IQR  Outliers  OPS (Kops/s)  Rounds  Iterations
------------------------------------------------------------------------------------------------------------------------
test_city_benchmark     11.2909  623.2501  13.9494  20.8232  12.5421  0.5411   91;3468       71.6877   21090           1
------------------------------------------------------------------------------------------------------------------------

JavaScript&TypeScript via WebAssembly NPM Version

# Install via bun or any other package manager
bun add reversejp-wasm

The command above produces a pkg/ directory containing the WebAssembly module and TypeScript bindings that can be published to npm or consumed directly.

// reversejp-wasm/example/index.ts
import init, { initialize, find_properties } from "../pkg/reversejp_wasm.js";

await init();
initialize();

// `find_properties` returns an array of objects with the same shape as the
// `Properties` struct in the Rust crate: `{ code, name, enName }`.
const results = find_properties(139.767, 35.6812);
console.log(JSON.stringify(results, null, 2));

Run via

bun run reversejp-wasm/example/index.ts

Output:

[
  {
    "code": "130010",
    "name": "東京都",
    "enName": "Tokyo"
  },
  {
    "code": "1310100",
    "name": "千代田区",
    "enName": "Chiyoda City"
  }
]

For basic JavaScript usage, see reversejp-wasm/preview/index.html which online previewed at https://ringsaturn.github.io/reversejp/.

License

MIT

Data is sourced from the Japan Meteorological Agency website.