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 🙏

© 2024 – Pkg Stats / Ryan Hefner

pelias-pip-service

v2.5.0

Published

Module that starts a Who's on First-based point-in-polygon service

Downloads

41

Readme

This repository is part of the Pelias project. Pelias is an open-source, open-data geocoder originally sponsored by Mapzen. Our official user documentation is here.

Pelias Point-in-Polygon Service

Overview

This service provides Who's on First-based point-in-polygon lookup functionality.

Requirements

Node.js is required.

See Pelias software requirements for required and recommended versions.

Installation

$ git clone [email protected]:pelias/pip-service.git
$ cd pip-service
$ npm install

NPM

NPM Module

The pelias-pip-service npm module can be found here:

https://npmjs.org/package/pelias-pip-service

Usage

To start the PiP service, use the start script ./bin/start, or use npm start.

It will look for Who's on First data in the place configured in pelias.json.

Requests are made to the endpoint in the format: http://localhost:3102/<lon>/<lat>.

For example: http://localhost:3102/-106.937/34.060

Downloading data

Because pelias/whosonfirst is a dependency of this package, its downloader can be used:

npm run download

This will download Who's on First data using the same configuration options from pelias.json as the whosonfirst downloader. That means it will automatically put the data in the place the service will expect to load it from.

Privacy Concerns

The service supports the DNT header by looking for one of the following headers:

  • DNT
  • dnt
  • do_not_track

When any of these headers are supplied in the request (with any value), the request log will output /[removed]/[removed] instead of the longitude/latitude values.

Configuration via Environment Variables

The service supports additional environment variables that affect its operation:

| Environment Variable | Default | Description | | -------------------- | ------- | ----------- | | HOST | undefined | The network address that the PiP service will bind to. Defaults to whatever the current Node.js default is, which is currently to listen on 0.0.0.0 (all interfaces). See the Node.js Net documentation for more information. | | PORT | 3102 | The TCP port that the PiP service will use for incoming network connections |