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

osm-meta-util

v0.1.4

Published

A tool to download OSM metadata

Downloads

6

Readme

OSM-Meta-util

A tool to download and process OSM Metadata. This data contains the most recent annotations around a commit to OSM. Specifically, commit text, username, bounding box, creation date and number of edits. The data is downloaded from the planet repository, which contains minutely changesets to OSM.

Once installed the tool can be used to pipe in compressed XML data between two dates and output it in JSON. OSM Meta Util can also be used in polling mode and continuously download the latest data every minute.

A joint project built by Development Seed and the American Red Cross.

Installing

Clone the repo or download it as a zip. npm install the dependencies.

Running

Require osm-meta-util in your node app.

var MetaUtil = require('osm-meta-util');

The MetaUtil constructor builds a Node Stream, so you can pipe it into stream transformers or into process.stdout

There are a few ways of using the utility:

1. Downloading between two dates

The files are named in numerical order since February 28th, 2012. They're incremented every minute. You need the file name related to the start and end date. For example, 001181708 refers to http://planet.osm.org/replication/changesets/001/181/708.osm.gz, created on 2015-02-10 20:56.

var MetaUtil = require('osm-meta-util');
// Getting historical metadata, specify a start & end
var meta = MetaUtil({
     'delay': 1000,
     'start': '001181708', //2015-02-10 20:56
     'end': '001181721' //2015-02-10 21:09
 }).pipe(process.stdout)

2. Continuously

// Live Mode! Updates every minute
var meta = MetaUtil().pipe(process.stdout)

3. Using as a command line utility

MetaUtil({
    'start': process.argv[2],
    'end': process.argv[3],
    'delay': process.argv[4]
}).pipe(process.stdout)

Use it in combination with jq

node app 001181708 001181721 1000 | jq -c '{user:.user, date: .closed_at}'