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 🙏

© 2025 – Pkg Stats / Ryan Hefner

data-metrics-badge

v0.5.7

Published

[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/datacite/data-metrics-badge) [![npm version](https://badge.fury.io/js/data-metrics-badge.svg)](https://badge.fury.

Downloads

167

Readme

Published on webcomponents.org npm version Build Status

Data Metrics Badge

The Data Metrics Badge provides an open and easy way to display the number of citations and usage that your research datasets and resources have received.

The Data Metrics Badge was created as part of the PARSEC, Building New Tools for Data Sharing and Reuse through a Transnational Investigation of the Socioeconomic Impacts of Protected Areas.

The Data Metrics Badge is a an easy way to embed usage and citations metrics from DataCite Services on your repository landing page. Usage statistics are processed according to the Code of Practice for Research Data. Citation statistics are collected via the DataCite and Crossref EventData Service.

Browsers support

| IE / Edge | Firefox | Chrome | Safari | Opera | | --------- | --------- | --------- | --------- | --------- | | Edge| last 2 versions| last 2 versions| last 2 versions| last 2 versions

One will need to include the web-components-loader for Edge and IE compatibility.

  <script src="https://unpkg.com/browse/@webcomponents/[email protected]/webcomponents-loader.js"></script>

Installation and Usage

Getting set up with a Data Metrics Badge is a straightforward process – just add the following code to the HTML of your website wherever you want the Data Metrics Badge to appear:


<script src="https://unpkg.com/vue"></script>
<script src="https://cdn.jsdelivr.net/npm/data-metrics-badge/dist/data-metrics-badge.min.js"></script>


<body>
  <data-metrics-badge doi="10.7272/q6g15xs4"></data-metrics-badge>
</body>

There is also a live demo.

Project setup

yarn install

Compiles and hot-reloads for development

yarn serve

Compiles and minifies for production

yarn build --target wc --name data-metrics-badge 'src/components/DataMetricsBadge.vue'

npm version patch -m "Upgrade to %s for reasons"

Run your tests

yarn test:unit tests/

Lints and fixes files

npm run lint

Publishing to NPMJS.com

After merging changes via a pull request, manually run the bump-version github action, using the next version number after the last released version. The bump-version action will set the correct version in package.json, commit it, and create a release tag. Then, create a release using that tag.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT

Customize configuration

See Configuration Reference.