Coder Social home page Coder Social logo

lineupjs / lineup_app Goto Github PK

View Code? Open in Web Editor NEW
7.0 5.0 2.0 6.54 MB

LineUp.js Demo Application

Home Page: https://lineup.js.org/app

License: MIT License

JavaScript 4.57% HTML 13.41% TypeScript 72.83% SCSS 9.19%
lineup papa-parse material typescript csv demo-application visual-analytics visual-analysis

lineup_app's Introduction

LineUp App

License: MIT Github Actions

LineUp is an interactive technique designed to create, visualize and explore rankings of items based on a set of heterogeneous attributes. This is a demo application using LineUp.js. Details about the LineUp visualization technique can be found at http://lineup.caleydo.org.

The application is deployed at: https://lineup.js.org/app. The develop version using LineUp v4 is deployed at https://lineup.js.org/app_develop. It is a Single Page Application that requires no server installation. No data is transferred to any server but just kept local in your browser local storage using IndexedDB.

Start Page

Soccer dataset

Features

  • Data Management
    • Choose one of the preloaded datasets
    • Import/Export CSV File
    • Import/Export JSON File
    • Import/Export LineUp JSON Dump
  • Session Management save different analyses with a custom session name. A session represents a view on the current dataset along with the currently specified sorting, filtering, grouping, and so on.
  • Export the current state to one of

Note Uploaded files are stored in your local web browser only.

Supported Browsers

  • last 2 Chrome versions (best performance)
  • last 2 Edge versions (best performance)
  • last 2 Firefox versions
  • Firefox Extended Support Release (ESR)

Usage

Start Page

Soccer Dataset

Hosting

This app is a client only app. Thus, requires no server since all data is stored on the browser only. To host it onself:

  1. build the app by following the development environemtn instructions and create a distribution package.
  2. copy the content of the /build directory to your target destination
  3. host the content through a web server such as NGINX or host it by running a local web server. A list of web servers can be found at https://gist.github.com/willurd/5720255.

Development Environment

Installation

git clone https://github.com/lineupjs/lineup_app.git
cd lineup_app
npm i -g yarn
yarn install
yarn sdks vscode

Common commands

yarn start
yarn clean
yarn compile
yarn test
yarn lint
yarn fix
yarn build
yarn docs

Authors

  • Samuel Gratzl (@sgratzl)

lineup_app's People

Contributors

dependabot[bot] avatar keckelt avatar sgratzl avatar thinkh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

caleydo agstn

lineup_app's Issues

manage local files

when uploading a local file it should be stored in the IndexedDB for later use. Each dataset should result in another card at the beginning with the option to delete and continue it.

Fix alignment of `Group by` dialog for numerical columns

  • Release number or git hash: v4.0.0-alpha.8
  • Web browser version and OS: Chrome 71-beta

Steps to reproduce

  1. Select a numerical column
  2. Open Group by dialog

Observed behavior

image

Expected behavior

  • Alignment should be correct. The buttons at the bottom of the dialog should be visible.

Compile errors when using lineupjs as local dependency (and not from npm)

Steps to reproduce

  1. Clone this repository
  2. Clone datavisyn/lineupjs
  3. cd lineupjs && npm link
  4. cd ../lineup_app && npm link lineupjs
  5. lineupjs: npm start or npm run watch (to get an initial build)
  6. lineup_app: npm start or npm run build

Observed behavior

ERROR in /lineup_app/src/data/forbes-top-2000-companies/index.ts(3,99):
TS7016: Could not find a declaration file for module 'lineupjs'. '/lineupjs/build/LineUpJS.js' implicitly has an 'any' type.
  Try `npm install @types/lineupjs` if it exists or add a new declaration (.d.ts) file containing `declare module 'lineupjs';`
ERROR in /lineup_app/src/data/fromFile.ts(4,23):
TS7016: Could not find a declaration file for module 'lineupjs'. '/lineupjs/build/LineUpJS.js' implicitly has an 'any' type.
  Try `npm install @types/lineupjs` if it exists or add a new declaration (.d.ts) file containing `declare module 'lineupjs';`
ERROR in /lineup_app/src/data/IDataset.ts(1,30):
TS7016: Could not find a declaration file for module 'lineupjs'. '/lineupjs/build/LineUpJS.js' implicitly has an 'any' type.
  Try `npm install @types/lineupjs` if it exists or add a new declaration (.d.ts) file containing `declare module 'lineupjs';`
ERROR in /lineup_app/src/data/soccer/index.ts(3,101):
TS7016: Could not find a declaration file for module 'lineupjs'. '/lineupjs/build/LineUpJS.js' implicitly has an 'any' type.
  Try `npm install @types/lineupjs` if it exists or add a new declaration (.d.ts) file containing `declare module 'lineupjs';`
ERROR in /lineup_app/src/data/world-happiness-report/index.ts(3,75):
TS7016: Could not find a declaration file for module 'lineupjs'. '/lineupjs/build/LineUpJS.js' implicitly has an 'any' type.
  Try `npm install @types/lineupjs` if it exists or add a new declaration (.d.ts) file containing `declare module 'lineupjs';`
ERROR in /lineup_app/src/data/wur/index.ts(3,75):
TS7016: Could not find a declaration file for module 'lineupjs'. '/lineupjs/build/LineUpJS.js' implicitly has an 'any' type.
  Try `npm install @types/lineupjs` if it exists or add a new declaration (.d.ts) file containing `declare module 'lineupjs';`
ERROR in /lineup_app/src/export.ts(1,48):
TS7016: Could not find a declaration file for module 'lineupjs'. '/lineupjs/build/LineUpJS.js' implicitly has an 'any' type.
  Try `npm install @types/lineupjs` if it exists or add a new declaration (.d.ts) file containing `declare module 'lineupjs';`
ERROR in /lineup_app/src/shared.ts(2,30):
TS7016: Could not find a declaration file for module 'lineupjs'. '/lineupjs/build/LineUpJS.js' implicitly has an 'any' type.
  Try `npm install @types/lineupjs` if it exists or add a new declaration (.d.ts) file containing `declare module 'lineupjs';`

Expected behavior

  • Compiling should also work with npm link
  • Or describe the development setup with lineupjs as non-npm dependency

Drag&drop CSV upload results in duplicated LineUp and side panel

  • Release number or git hash: lineup.js Demo and taggle.caleydoapp.org
  • Web browser version and OS: Chrome

Steps to reproduce

  1. Load some sample dataset (e.g. Soccer)
  2. Drag some CSV file onto the browser window

Observed behavior

  • Side panel and ranking table is shown twice. Once for the initial dataset and a second time for the uploaded dataset.

image

Expected behavior

  • Newly uploaded dataset replaces existing LineUp instance.

Shifted columns vs. header

If the windows size is smaller than the table width and the horizontal scrolling is necessary, the columns in the part that is accessible only by scrolling will be shifted.
Steps:
Downsize your window (in my case the window size was 1041*832)
Load taggle demo (https://taggle.caleydoapp.org/#soccer)
Scroll to access the matrix columns

shifted header

Note: I think I was already reporting this issue once, but I can't find it anymore. I am sorry if this is a duplicate.

Export CSV does not consider initial custom ranking

Steps to reproduce

  1. Clone https://github.com/thinkh/lineup_app/blob/taggle_user_study
  2. Run Lineup
  3. Export CSV file

Observed behavior

Expected behavior

  • The export should consider initial custom ranking

This issue might be related to #7.

Export to Codepen not working

Steps to reproduce

  1. Go to https://lineup.js.org/app/#soccer
  2. Export to Codepen

Observed behavior

  • Any unexpected output or action (or lack of expected output or action)

No lineup displayed

  • Web browser console errors (including tracebacks)
The resource from “https://unpkg.com/[email protected]/build/LineUpJS.min.css” was blocked due to MIME type (“text/plain”) mismatch (X-Content-Type-Options: nosniff). index.html

The resource from “https://unpkg.com/[email protected]/build/LineUpJS.min.js” was blocked due to MIME type (“text/plain”) mismatch (X-Content-Type-Options: nosniff). index.html

ReferenceError: LineUpJS is not defined
  • Server errors (relevant messages and tracebacks)
  • Static or animated images showing the UI behavior

image

Workaround

Open Pen settings and switch to non-minified css and js files.

uploader configuration

in the current version the uploader is a black box based on PapaParse. However, the user might want to customize the loading and detection of column types.

Therefore while uploading a preview of the detected file properties should be shown which allows the user to customize it. However, when not changing a thing within X seconds it should automatically proceed with the default values.

  • separator
  • column types
  • column label
  • custom descriptions (categories, domain ranges

Odd checkbox in Filter Dialog

Here's a non-standard checkbox, that also has a weird (though interesting) animation:
image

Probably better to just use a regular checkbox?

Select filters (in filter dialog) for categorical columns does not work

Steps to reproduce

  1. Open https://lineup.js.org/app/#soccer
  2. Click on filter icon for a categorical column
  3. Uncheck the first check mark
  4. Try to check selected categories

Observed behavior

  • Unable to check/uncheck filter
  • The first two rows should do the same, don't they?

lineup-filter-category-dialog

Expected behavior

  • Remove the first row and keep Un/Select All or add a label to the first row
  • Check/uncheck categories should work

Broken export to CodeSandbox

  • Release number or git hash: 4.0.0
  • Web browser version and OS: Chrome 87

Steps to reproduce

  1. Open https://lineup.js.org/app_develop/#soccer
  2. Export to example to CodeSandbox.io

Observed behavior

Error 1

DependencyNotFoundError
Could not find dependency: 'tslib' relative to '/node_modules/lineupjs/src/provider/ADataProvider.js'

grafik

If I follow the instructions and import tslib, I get the following error.

Error 2

TypeError
Cannot read property 'FLOAT_ASC' of undefined

...

  1 | 
> 2 | import * as LineUpJS from "lineupjs";
  3 | import "lineupjs/build/LineUpJS.css";
  4 | import * as Papa from "papaparse";
  5 | 

grafik

Switching the dependency to LineUp v4.1.1 shows the same error.

grafik

Expected behavior

The export should work without errors and show the demo.

CSV and JSON download broken

  • Release number or git hash: lineup.js Demo Page
  • Web browser version and OS: Chrome

Steps to reproduce

  1. start soccer dataset
  2. download JSON or CSV

Observed behavior

  • Nothing happens
app.js:124 Uncaught (in promise) DOMException: Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.
    at https://lineup.js.org/app/app.js:124:100635
(anonymous) @ app.js:124
Promise.then (async)
(anonymous) @ app.js:124

Expected behavior

  • File successfully downloaded

Grouping not working

After uploading a csv and trying to group, the menu doesn't apply the grouping. Clicking 'confirm' doesn't close the menu.
Clicking outside the menu will make the grouping to be removed.

image

Clicking on 'confirm' returns error:
image

Reproduced with selecting an internal dataset from the homepage.

The problem seems to happen with this type of column:
image

It actually groups, but then it ungroup because the confirm button doesn't work.

update readme

  • preview image
  • feature list
  • download instructions
  • self hosting instructions (e..g http server one liner ref)

Import does not load previously exported dataset

@mstreit commented on Fri Oct 12 2018

  • Release number or git hash: public soccer demo
  • Web browser version and OS: Chrome

Steps to reproduce

  1. Open soccer dataset
  2. Export CSV
  3. Import the previously exported CSV

Similar problems when exporting and importing JSON.

Observed behavior

  • Only loading bar is shown

Expected behavior

  • Dataset should appear in LineUp

extract current state of ranking upon export

upon export to CodePen or Github Gist the real current state should be recreated. Thus a method for extracting the builder for a given ranking is needed. In addition, filter settings and other live data needs to be set on the real instance

Let users manually switch the column type

Sometimes user wants to switch the column to a different type (other than the predefined one), e.g., to try different filters. The use case often appears, when users are uploading a CSV file on https://lineup.js.org/app_develop/ and some columns are not detected correctly. At the moment the user does not have the option to change it in the UI. The only option to change it is to open a codepen or similar and edit the column type. This is usually a lot of work for users that "just" want to analyze their data.

In the following are some switches users were requesting:

  • String to date
  • Date to string
  • String to categorical
  • Categorical to string
  • Number to categorical
  • String to link
  • Link to string
  • Boolean to categorical
  • Categorical to boolean

Of course not all switches are possible and useful. We must find a way how we can allow and on the other side restrict this functionality.

Suggestion

  1. Every column has a new menu point Switch column type ...
  2. On click a dialog opens
  3. The dialog provides possible column types (the list needs to be defined)
  4. When the user confirms the dialog the column is replaced with the new column type

Open questions

  1. Is a live preview and reset button possible?
    • Idea: We could place a preview of the new column next to original one. If the user confirms the dialog the original column is removed. Otherwise (on cancel/reset) the preview column is removed
    • If not we should hide the reset button and/or give the user a warning that this action cannot easily be undone.
  2. Which column types can switched into one another?
  3. What happens to categories, min/max values, ...?
  4. Can we keep sorting/grouping/group sorting for the column?

Alternative option

In case this feature request is too complicated, we should think how to improve the importer of the LineUp demo instead so that the user starts with the correct column type after uploading a dataset.

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.