Giter Club home page Giter Club logo

tabres's Introduction

Display a graphical table of results using Swing.

Travis CI Build Status

This is a simple graphical results for use in Java and Clojure. The data is either in the form of a list of lists or comes directly from a java.sql.ResultSet.

Features:

  • Table data (i.e. SQL results, spreadsheet data, matrices) visualized.
  • All columns are sortable.
  • Width of all columns and frame can be automatically (re)sized.
  • Frames include scroll bars.

Note: While this is built as a Clojure project, it functions perfectly as a Java dependency as well (see the Java documentation and dependency).

Table of Contents

Obtaining

In your project.clj file, add the following:

Clojars Project

For Java projects, add the following to your maven pom.xml:

...
    <repositories>
        <repository>
            <id>clojars</id>
            <url>http://clojars.org/repo/</url>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>com.zensols.gui</groupId>
            <artifactId>tabres</artifactId>
            <version>0.0.7</version>
        </dependency>
    </dependencies>
...

Documentation

Additional documentation:

Usage

  • Display an adhoc list of animals: x
(require '[zensols.tabres.display-results :as dr])

(dr/display-results [["dog" "brown" 1]
                     ["cat" "yellow" 33]
                     ["fish" "silver" 14]]
                    :column-names ["Animal" "Color" "ID"]
                    :title "Animals")
  • Display the first 100 rows of the Iris flower data set:
(require '[clojure.java.io :as io])
(require '[clojure.data.csv :as csv])
(require '[zensols.tabres.display-results :as dr])

(let [url "https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data"
        cols ["sepal-length" "sepal-width" "petal-length" "petal-width" "class"]]
    (with-open [in (clojure.java.io/reader url)]
      (-> (csv/read-csv in)
          (#(take 100 %))
          (dr/display-results :title "iris dataset"
                              :column-names cols))))

Building

To build from source, do the folling:

  • Install Leiningen (this is just a script)
  • Install GNU make
  • Install Git
  • Download the source: git clone --recurse-submodules https://github.com/plandes/tabres && cd tabres
  • Build the software: make jar

Note that you can also build a single jar file with all the dependencies with: make uber

Changelog

An extensive changelog is available here.

License

Copyright © 2017, 2018 Paul Landes

Apache License version 2.0

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

tabres's People

Contributors

plandes avatar

Watchers

 avatar  avatar

tabres's Issues

License issue

The license clojure is distributed under (EPL) is not compatible with the GPL. This looks like a very awesome library, but the license issue means that I could not use it. Would you consider changing the license.

(Here's an example of a library that ran into this in the past)

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.