Git Product home page Git Product logo

decc_dashboard's Introduction

DECC Network Dashboard

A data dashboard for the DECC network, based on the OpenGHG data dashboard.

Run locally

To run the app locally please make sure you have node installed. Then you can clone this repo and run

$ npm install

This will install all of the dependencies required to run the app. You can then start the app using

$ npm start

You should then be able to access the app at http://localhost:3000.

##s Testing

If you'd like to make changes and/or add components to this project please make sure each component is tested. We make use of the React Testing Library to test the application as a user would interact with it. Please refer to their documentation for instructions on how to get started.

You can run the tests using

$ npm run test

Code Quality

Code quality is checked using ESLint, this can be run using

$ npm run lint

Live Data

decc_dashboard's People

Contributors

gareth-j avatar mrghg avatar rt17603 avatar sutarprasad avatar

Watchers

 avatar  avatar

Forkers

openghg

decc_dashboard's Issues

Caching strategy

What kind of caching setup should we have? Can we use localStorage to store the data for each source and then invalidate the cached data based on information in the metadata lookup file?

Updated dashboard

This issue is for discussion of the layout of the dashboard and the processing pipeline OpenGHG -> web -> Dashboard.

Questions:

  • What layout changes do we want?
  • How do we want to store the data, a git repo?
  • Are there other types of plots we want to add?

Requirements:

  • export to dashboard readable JSON file
  • easily automated, cron job to push updated data every X hours/days/weeks

Fix colours for sites, inlets etc

Currently the colours are just assigned by creating an array and shuffling it. Fixed colours should be used and the colours used improving.

`extraStyling` warnings in dev tools

We're getting an error in devtools:

Warning: React does not recognize the extraStylingprop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercaseextrastyling instead.

We're passing in this styling to the TextButton component. Maybe we can avoid this by using separate CSS classes.

Add styling to sidebar and Plot

  • Add gradient styles and shadows to the sidebar
  • Highlight the plot
  • Y label is currently stuck to the edge of the plot shift it inside
  • Shift the Openghg logo to the centre of the sidebar

Implement multi-file data retrieval

As we'll have larger amounts of data with the newer dashboards we could do with being able to retrieve data depending on what the user wants to look at. Having run some tests it looks like writing the data out to a separate file for each ObsData object returned by OpenGHG works quite well. These are standard JSON files that are accompanied by a separate JSON file that provides a lookup table for them and all the metadata required to build the interface for the site.

NOTE: I'll use the term source here to mean an inlet at a site for a specific species

My idea is to:

  • build the interface from the exported metadata file (containing filenames and metadata)
  • implement dynamic retrieval of data based on source selection on the dashboard
  • retrieve some data on first load so an initial plot is created
  • retrieve the data each time they click on a new source
  • look at gzip compression, this seems to perform favourably when compared with parquet, reducing the data to around 1/4 of the size of the exported JSON.

Read compressed JSON files

Compressing the exported JSON using gzip results in a ~ 75% reduction in size.

  1. Do we need to compress these ourselves, or are they compressed between GitHub and the client?
  2. How best to decompress, maybe using the Compression Streams API?

Simplify data read

At the moment we restructure the data that's read in from JSON, I don't think we need to be doing this as the data that's exported from OpenGHG should be in the correct format/shape. See openghg/openghg#721

Allow selection of source level control

It'd be good if the dashboard could be setup to customise itself based on the data read in. If we want users to just be able to select data by site then we just have markers and a popup detailing the site. If we want users to select by inlet then we create the buttons in the popup, if we want by instrument we have a couple of rows of buttons etc.

NOTE: I'll use source selection level here to mean selecting data by site or by inlet at a site etc

I've created a preliminary dashboard_config.json that can be read in by the dashboard that could control the setup of the markers / popups. See openghg/openghg#772 for the work on exporting this config file.

To implement this we'll need to

  • read in the dashboard_config.json file
  • update the createSourceKey function to create keys depending on the source selection level
  • pass through the setting to the LeafletMap component
  • modify the onClick so it's passed to inlet TextButton for inlet selection or the CircleMarker for site selection
  • add some tests to cover this dynamic change of UI

Unable to select different emissions in `EmissionsBox`

I can't select different emission types on the explainer page, I get the following error:

$(name) not in images 2 EmissionsBox.js:58
    setImage EmissionsBox.js:58
    React 14
    unstable_runWithPriority scheduler.development.js:468
    React 4

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.