GithubHelp home page GithubHelp logo

timelyportfolio / metrics-graphics Goto Github PK

View Code? Open in Web Editor NEW

This project forked from metricsgraphics/metrics-graphics

0.0 3.0 0.0 2.11 MB

A library optimized for concise, principled data graphics and layouts.

Home Page: http://metricsgraphicsjs.org

CSS 8.93% Python 4.16% JavaScript 86.91%

metrics-graphics's Introduction

MetricsGraphics.js is a library optimized for visualizing and laying out time-series data. At under 50KB (minified), it provides a simple way to produce common types of graphics in a principled, consistent and responsive way. The library currently supports line charts, scatterplots and histograms as well as features like rug plots and basic linear regression.

A sample set of examples may be found on the examples page. The example below demonstrates how easy it is to produce a graphic. Our graphics function provides a robust layer of indirection, allowing one to more efficiently build, say, a dashboard of interactive graphics, each of which may be pulling data from a different data source. For the complete list of options, and for download instructions, take a look at the sections below.

data_graphic({
    title: "Downloads",
    description: "This graphics shows Firefox GA downloads for the past six months."
    data: downloads_data, \\ an array of objects, such as [{value:100,date:...},...]
    width: 600,
    height: 250,
    target: '#downloads', \\ the html element that the graphic is inserted in
    x_accessor: 'date',  \\ the key that accesses the x value
    y_accessor: 'value', \\ the key that accesses the y value
})

While we are currently using semantic versioning, you should consider v0.* to have commits that will break things if you are external to Mozilla. This library is in its pre-Cambrian period of wild ideas, and parts of the API will slowly but surely become solidified as we use this more and more internally.

Though originally envisioned for Mozilla Metrics dashboard projects, we are making this repository public for other to use, knowing full well that we are far from having this project in good-enough shape. Take a look at the issues to see the milestones and other upcoming work on this repository. We plan on having fuller documentation in the next milestone, as well as a guide to how to contribute to the library in a way that makes us feel warm inside when we accept your pull request.

MetricsGraphics.js is shared under a Mozilla Public License. The current logo is courtesy of Font Awesome.

http://metricsgraphicsjs.org

Quick-start guide

  1. Download the latest release from here.
  2. Follow the examples in index.htm and main.js to see how graphics are laid out and built. The examples use json data from /data, though you may easily pull data from elsewhere.

Dependencies

The library depends on D3 for binding data to DOM elements, Bootstrap to facilitate layout and jQuery, which we're currently using to facilitate DOM manipulations.

How to contribute

We're grateful for anyone wishing to contribute to the library. Feel free to fork the project and submit your changes as Pull Requests. If both of us r+ the Pull Request, we'll merge it into the master branch.

Changes should be made to the files under src rather than to js/metrics-graphics.js. Please use dev.htm to test changes locally. At least once a release, we regenerate the raw and minified versions of js/metricsgraphics.js.

Resources

Release process

  1. Copy over any changes made in dev.htm to examples.htm
  2. Run make.py
  3. Commit newly generated js/metricsgraphics.js and js/metricsgraphics.min.js files and examples.htm (if applicable) with a message such as, “v0.5 prepared files for release”
  4. Deploy all files to metricsgraphicsjs.org

Download package

The download package includes everything that you see on metricsgraphicsjs.org. In order to use the library in your own project, the only files that you'll need are:

  1. js/metricsgraphics.min.js
  2. css/metricsgraphics.css
  3. css/metricsgraphics-dark.css
  4. images/missing-data.png
  5. images/missing-data-dark.png

Remember to include the calls to the third-party libraries, as they appear in the code for the examples pages.

metrics-graphics's People

Contributors

almossawi avatar hamilton avatar mreid-moz avatar tlatorre-uchicago avatar

Watchers

 avatar  avatar  avatar

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.