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

bbox-to-heatmap

v1.3.9

Published

Crawling Flickr's geotagged photographs and drawing a heatmap

Readme

bbox-to-heatmap

このツールは、写真共有SNS『Flickr』上で共有されている撮影位置の緯度経度情報(ジオタグ)の付いた写真を沢山集めて、地図上にヒートマップとして描くツールです。沢山写真が存在する場所が地図上で赤く表示されます。例えばこのページの下の方にいくつかの可視化例がありますので、みてみましょう。みなさんも何か仮説を立てて、検索キーワードと範囲をきめて、データを集め、可視化してみましょう。

Usage

対話型実行例

対話型で実行します。情報科学概論の講義で利用する場合はこの方法を使ってください。

npx -y -p bbox-to-heatmap@latest run
  • 上記のコマンドを打つと以下のプロンプトが表示されるので、kibacoで通知されたパスワードを入力してください。
? パスワードを入力してください »
  • 次に集める画像の範囲指定(BBOX)が求められます。西,南,東,北の順で緯度経度を指定します。
    • BBOXは次のページを使うと簡単に求められます:https://boundingbox.klokantech.com/
    • 使い方はこちら
      • BBOX指定方法
? 検索範囲(BBOX)をカンマ区切り入力してください。 » 
  • 最後に検索する画像をハッシュタグで限定します。集めたい写真のハッシュタグを入力してください。(例:dog,catなど・・・)
? 検索タグを入力してください。全ての写真を集める場合はそのままEnterを押してください。 »
  • これで写真をFlickrから収集し始めます。20000枚集めた時点で自動終了しますが、Ctrl+Cを押すことで途中終了も可能です。終了するとブラウザが立ち上がりヒートマップが表示されます。情報科学概論受講生はスクリーンショット等で保存し発表会資料としてください。
    • 可視化ツールの使い方
      • 可視化ツール

高度な実行

  • 20000毎以上集めたい時はコマンドにサイズオプションを指定してください。ただし、この数に関わらず指定されたハッシュタグの写真を集め終えた時点でプログラムは終了します。
npx -y -p bbox-to-heatmap@latest run --max=50000
  • 検索タグはデフォルトではカンマ区切りで複数指定した場合、OR検索となります。AND検索やタグ以外に投稿本文等からも全文検索したいときはsearchmodeオプションが使えます。
npx -y -p bbox-to-heatmap@latest run --searchmode=or

npx -y -p bbox-to-heatmap@latest run --searchmode=fulltext
  • 結果をその場で表示するのではなくHTMLファイルに保存する場合は--portableオプションが使えます。
npx -y -p bbox-to-heatmap@latest run --portable
  • --portableが付いていると、Webブラウザを立ち上げる代わりに、結果のHTMLファイルを出力します。WSLやSSH等、Webブラウザの使えない環境で利用してください。
    • 実行が終わると最終行に以下のように、結果可視化のためのHTMLファイルのパスが表示されるので、このファイル(index.html)を、エクスプローラーやファインダーで探し、Webブラウザに読み込みます。
Open C:\Users\ ~省略~ \index.html

コマンド型実行例

  • 一度にBBOXや検索キーワード等を設定して起動したい場合は、範囲・タグはコマンドに埋め込んで実行できます。但しパスワードは埋め込めません。完全にコマンド対話をなくす場合はご自身のFlickr APIキーを取得して指定する必要があります。
npx -y -p bbox-to-heatmap@latest run --bbox=<範囲> --search=<タグ>


npx -y -p bbox-to-heatmap@latest run --bbox=<範囲> --search=<タグ> --apikey=<apiキー>
  • bbox: ジオタグ付き写真を集める検索範囲を入力してください。以下のサイトで得られます。
    • https://boundingbox.klokantech.com/
    • BBOX指定方法
  • タグ: ここで指定されたタグの付いた写真のみを収集します。(省略すると全写真)
  • apiキー: Flickrから取得するAPIキー。これを指定すればパスワードは必要ありません。

コマンド詳細

全てのオプションを知りたい場合は以下のコマンドで表示されます。

npx -y -p bbox-to-heatmap@latest run --help

Examples(コマンド型)

Example1 (BBOX)

Heatmap of Disneyland

npx -y -p bbox-to-heatmap@latest run --bbox=-117.928104,33.8034,-117.915487,33.81802 --max=10000

Heatmap of Disneyland

##Example2 (BBOX and Tag) Who drinks the most beer, wine, and whisky in Europe?

Heatmap Whisky in Europe

npx -y -p bbox-to-heatmap@latest run --bbox=-19.69,36.03,26.37,59.18 --search=whisky --max=10000

Whisky heatmap

Heatmap of Wine in Europe

npx -y -p bbox-to-heatmap@latest run --bbox=-19.69,36.03,26.37,59.18 --search=wine --max=10000

Wine heatmap

Heatmap of Beer inEurope

npx -y -p bbox-to-heatmap@latest run --bbox=-19.69,36.03,26.37,59.18 --search=beer --max=10000

Beer heatmap