GithubHelp home page GithubHelp logo

ammolytics / cartridges Goto Github PK

View Code? Open in Web Editor NEW
8.0 3.0 3.0 50 KB

An open-source dataset of ammunition cartridge information from SAAMI, CIP, and NATO STANAG

Home Page: https://blog.ammolytics.com

License: MIT License

JavaScript 100.00%
cartridge nodejs saami dataset cip ammunition-cartridge-information nato-stanag python

cartridges's Introduction

Build Status

Open Source Cartridge Dataset

A community-maintained dataset of ammunition cartridge information for use by developers, engineers, data scientists, and anyone who might find it useful.

Status

This project is a work-in-progress. To date, only the names of SAAMI and C.I.P cartridges are listed in the dataset.

Contributions are very welcome, and encouraged!

Installation

npm install cartridges

Python

Coming soon

Usage

NodeJS

const cartridges = require('cartridges');

console.log('Rimfire cartridge names:', cartridges.names.rimfire);
console.log('Cartridge details:', cartridges.rimfire.saami['22 Long']);

Python

Coming soon

Overview

Categories

Cartridges have a lot of variation, which presents some challenges for accurate and maintainable categorization. For the sake of simplicity, we use the following as top-level categories:

  • Pistol
  • Rifle
  • Rimfire
  • Shotshell

They aren't perfect, but most cartridges should be immediately recognizable as one of these. We've gotta start somewhere.

Structure

For each category above, there is a section within the top-level cartridges.json file listing cartridge names, as well as a directory containing separate JSON files for cartridges defined by each standardization body (e.g. saami.json). These separate JSON files will contain relevant information about the cartridges, according to the format below.

Format

Work In Progress

The following template should be used when adding a cartridge to the dataset. This template may evolve over time and backward-compatibility should be maintained to the best of our abilities. Language-specific packages based off of this dataset should use semantic versioning to ensure that format changes don't break userspace.

Units of measure

Cartridges are often defined in both the Metric and Imperial units of measure. In order to provide maximum flexibility, both units must be provided in the specification file.

{
  "name": "<official cartridge name>",
  "names": [
    "<other names for this cartridge>"
  ],
  "diameter_mm": "<bullet diameter in millimeters>",
  "diameter_in": "<bullet diameter in inches>",
  "specs": {
    "coal_mm": "<cartridge overall length in millimeters>",
    "coal_in": "<cartridge overall length in inches>",
    "bullet": {},
    "case": {},
    "primer": {}
  },
  "standard": "<name of body/org who maintains the spec (e.g.: SAAMI, NATO, CIP, proprietary)>",
  "references": [
    "<urls to the sources of the information provided here>"
  ]
}

References

cartridges's People

Contributors

erichiggins avatar gao8a avatar retn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cartridges's Issues

Add data in CSV format

CSV format is a better standard than JSON. We'll continue to support the latter, but CSV will be treated as the primary source-of-truth going forward. Build tools can be utilized to convert to other formats and structures.

Python support

Python will be important to our own use-cases at Ammolytics.

Note: Performance testing may be required since reading CSV and/or JSON files on import could cause issues. It may be necessary to bake the data directly into a Python dictionary within a .py file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.