Code Monkey home page Code Monkey logo

dashboards's Introduction

Dashboards by Keen IO

Building an analytics dashboard? Don’t start from scratch. Grab one of our CSS Grid-based templates and admire your data in minutes.

UPDATE: All examples in this repo have been updated to use keen-dataviz.js and keen-analysis.js, as well as CDN versions of all dependencies. When producing charts with keen-dataviz.js, the HTML wrapper for each chart (.chart-wrapper, described below) is rendered automatically.

Begin with a layout:

Hero Thirds Example

Add charts to each chart-stage HTML element:

<div class="grid-hero">
  <div class="hero chart-wrapper">
    <div class="chart-title">
      Chart Title
    </div>
    <div class="chart-stage">
      <div id="grid-1-1">
        <!-- chart goes here! -->
      </div>
    </div>
    <div class="chart-notes">
      Notes about this chart (optional)
    </div>
  </div>
</div>

And voilΓ !

Sample Dashboard

An attractive, custom analytics dashboard that's ready to be shown to your team or your customers. No hours lost tweaking CSS or testing responsiveness on eight different mobile devices.

The Templates

These layout templates are composed of a minimal set of custom styles. They cover the most common use cases and layout configurations we've encountered so far.

  • Layouts for pre-built, responsive dashboard views
  • Examples for specific domains, data models and popular integrations

Integrations

These templates can work with any data source or charting library, but they're particularly streamlined to work with Keen IO's Dataviz SDK. You can add some charts to your dashboard with just a few lines of code. Talk to our team to get started today.

Usage

Ready to use one of these awesome layouts? Here's how to get started.

  1. Download a copy of this repository as a zip file, using this link. You can also type git clone keen/dashboards in your terminal.

  2. Check out the various layouts and pick the one that best suits your needs. Find the template in the repository you downloaded at folder/layouts/(name-of-template).

  3. Start editing! In the destination folder will exist an .html file. Open it in your favorite text editor. There are three things you need to do to edit your dashboard:

  4. Setup: If you're a registered Keen IO user, navigate to your keen project or if you don't have a user at first, you can simply use some demo data that we've prepared for you. You can access those by going to the repository and navigating to demo-data. There, you will see some javascript files with some code in them. We will simply paste those in the .html file.

  5. Some copypasta. When you navigate to the bottom of the .html file, you can see that there are a bunch of script tags. Just before the end of the body tag, we're going to add in the code from sample.html. Simply copy and paste the code just before you see </body>.

  6. Once you've done that we need to hook up the specific items within the template to the code that we've just pasted in to our file. Each KeenDataviz instance has container property, which is a node selector required by query. That means that this query will try to find inside the html file a specified node. Please bear in mind that you have to set a height of this node in your stylesheet or using inline CSS. In these templates, you will see lines of that resemble something like:

<div class="chart-stage"> <!-- This is where you need to put the id property in! -->
  <img data-src="holder.js/100%x650/white">
</div>

Now we're going to change those lines so that it looks like this:

<div class="chart-stage" id="chart-01"> <!-- This is where you need to put the id property in! -->
  <!-- Get rid of that img tag! -->
</div>

You're finished! Congratulations on setting up your first chart! Repeat step three with the rest of the items in the template to complete your dashboard!

Docker

Clone the repository.

$ git clone https://github.com/keen/dashboards.git

Access the repository and build your Docker image.

$ cd dashboards
$ docker build -t keen/dashboards .

Run the Docker container.

$ docker run -d -p 80:80 keen/dashboards

Contributing

Contributions are 11,000,000% welcome! That's a lot!

Please file issues for any bugs you find or features you'd like to see. And if you're up for it, send in a pull request.

To develop, you'll need to first install dependencies using Bower:

$ npm install -g bower
$ bower install

Note: Updates to the site backed by the gh-pages branch go live immediately once pull requests are reviewed and approved.

Note #2: This project is moving fast, so make sure and stay up to date. Here's what we suggest. Fork this repo, clone the fork, and add the original repo as a remote called upstream:

$ git clone https://github.com/keen/dashboards.git
$ cd dashboards
$ git remote add upstream https://github.com/keen/dashboards.git

Pull from upstream frequently to keep your local copy up to date:

$ git pull upstream gh-pages

Support

Need a hand with something? Send us an email to [email protected] and we'll get back to you right away! For technical questions, use the keen-io tag on Stack Overflow.

dashboards's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dashboards's Issues

Usage instructions don't match repo

https://github.com/keen/dashboards#usage instructs to navigate to your keen project or to go to the repository and navigating to demo-data, to see javascript files. There's no folder "demo-data" in the repo. It appears that in the keen project one needs to navigate to Explorer, create a new query, save it and then choose "Embed" button to get the javascript code mentioned.

Dark theme?

Would it be possible to have dashboards displayed in a dark theme?

Bootstrap 4?

Hello,

Great dashboards!

Are there plans to build for Bootstrap 4 in the future?

Minor typo in readme

Thought about doing a pull request, but figured a comment would be better.

Minor typo in readme:
git clone https://github.com/username/dashboards.git

Should say:
git clone https://github.com/keen/dashboards.git

Refresh charts on resize

If you resize your browser window, you get some pretty crazy weirdness with the charts overflowing containers and have to reload the page to get them to look right. It'd be nicer to detect the resize if possible and just refresh the chart objects automatically.

Usage instructions don't match repo (cont.)

This issue is a continuation of the issue entitled "Usage instructions don't match repo" #97 that was closed (and I cannot reopen).

Please see the discussion of Issue #97 for background information.

The restored demo-data/sample.html file seems to be incorrect. It uses a client.draw() function calls where no draw() function seems to exist. As a result, the usage instructions will still not enable anyone to get an example of the repo up and running, at least not quickly.

I investigated, and I figured out that, if one replaces the cutting and pasting of the erroneous content of the sample.html file with a script reference to the file examples/starter-kit/starter-kit.js, the quick start process can be made to work. Reason: That script uses client.query() instead of client.draw(), and client.query() is a function that actually exists (and seems to work).

Script reference placed just before the tag:

<script type="text/javascript" src="/examples/starter-kit/starter-kit.js"></script>

I would also like to suggest that whoever attempts to correct this issue should verify that the solution works from the POV of the current repo, lest this issue linger one. It seems to be a major barrier for repo adoption by new users.

Dead link

The link to "Hero third example" in the README.md is dead.

Information on data format

I've downloaded the examples but I'm struggling to work out how to implement the data the charts. Is there any further documentation?
Thanks
Paul

Is this repo being actively maintained?

This looks great, and we would love to use it; but I been asked if this repo is still being actively maintained or not, as there is a gap since last code commit.

how to connect to flask,pymongo(example:starterkit)

import pymongo
from pymongo import MongoClient
from flask import Flask, request, render_template_string, redirect, render_template
import json
from bson import json_util
from bson.json_util import dumps
app = Flask(name)

FIELDS = {'dateTime':True, ... , '_id': False}

@app.route("/")
def index():
return render_template("index.html")

@app.route("/XXX/oldData")
def donorschoose_projects():
connection = pymongo.MongoClient('localhost',27017)
collection = connection.XXX.oldData
projects = collection.find(projection=FIELDS)
json_projects = []
for project in projects:
json_projects.append(project)
json_projects = json.dumps(json_projects, default=json_util.default)
connection.close()
return json_projects

if name == "main":
app.run()

After that, what should i do?

Make backends/APIs pluggable

I'm considering using Keen IO Dashboards in my own project, but would like to be able to plug in a different backend, with a different API. I'm guessing this is currently not possible. Is this something that could be abstracted to make it possible for others to call different backends with different APIs/queries, but still use Keen IO Dashboards?

Bower package is empty

I don't know why, but bower install keen-dashboards results in a license, a README, and nothing else.

Which is a shame, really; you could easily install the necessary CSS and whathaveyou by specifying it as such in the main stanza, which would mean folks like me who use Yeoman could use your layouts far more easily.

Might write a PR.

transparency causing viewing issues in mobile phone browser

Hi there,

I've set up a dashboard using your template (thank you for that). However, when I try to access my dashboard using a mobile phone, the transparency in the menu causes me to not see the menu options clearly. Is there a way to update the settings so that the transparency is gone?

thanks!

img_0077

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.