IT2901-SINTEF01 / frontend

Frontend for our open data visualisation platform.
https://sintef01.netlify.app/
Apache License 2.0
13 stars 1 forks source link
apollo react storybook visx

Open Data Visualisation Platform – Frontend

Build, lint, and test Issues License Version Codacy Badge

SINTEF

This repository contains the frontend for the "Open Data Visualisation Platform" developed in collaboration with SINTEF. You may find the backend here. By providing both a dashboard and a Storybook page, users will be able to test different visualisations of their desired datasets. Consult the releases page to get a local, stable copy of the service.

Overview

You can view the current deployment here and our deployed storybooks here.

The frontend is built with React.js, written in TypeScript. We also utilise the Storybook.js library to give an easy to use and intuitive overview of our React components. For deployment we decided to use Netlify. Refer to our wiki for more information regarding our architecture and structure.

Setup

Install the dependencies with:

yarn

Running

Run the application in development mode with:

yarn start

You can view the project at http://localhost:3000.

Launch your local instance of Storybook.js with:

yarn storybook

Then you can view your storybook at http://localhost:6006

Testing

Run the entire test suite with auto-running on file changes with:

yarn test

Installation of NPM package

Our NPM package can be found here. More information about this package can be found in the wiki.

npm i data-visualisation-platform --save

or

yarn add data-visualisation-platform

Example usage

import React from 'react';
import { MetApi, SsbBefolkning, VisualiserProvider } from 'data-visualisation-platform';

const App: React.FC = () => {
    return (
        <VisualiserProvider>
            <Charts />
        </VisualiserProvider>
    );
};

const Charts: React.FC = () => {
    return (
        <div>
            <MetApi.Line width={600} height={200 lat={63} lon={10} />
            <SsbBefolkning.Threshold width={600} height={300} thresholdValue={4} municipalities={['K-3024']} />
        </div>
    );
};

License

Copyright 2021 SINTEF AS

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.