This is a simple tool to visualize ip addresses on a map. For example, you can use it to monitor realtime stream of ip addresses from Web application request log.
- Clone the git repo:
git clone https://github.com/guozheng/locviz.git
- Install package manager (we use yarn) libs:
brew install yarn && yarn install
- Start test client that writes ips to
/tmp/request-ips
:yarn startTestClient
- Start the server
yarn start
and point Web browser tohttp://localhost:8080
- Code is based on Alan Eng's snippet. It takes each zip code object that contains lat and lon and plots them on the map.
- Many thanks for the libs used in
package.json
such as D3.js, Express, socket.io, socket.io stream, tail-stream, maxmind, etc. - IP to location mapping is done using the free MaxMind geolite2 data. It is from a manual download, there exists an update program. Other similar data packs can be found in this IP-based Geolocation FAQ article.
MIT License, see LICENSE
.