Code Monkey home page Code Monkey logo

gcam-dashboard's Introduction

GCAM Dashboard: An Interactive Dashboard for Exploring GCAM Scenario Data

The GCAM Dashboard is a scenario explorer for GCAM. Its purpose is to provide a way to give users a quick view of the data in a collection of scenarios. You can get a listing of the scenarios in a data set and the queries available for each scenario, or available jointly for a collection of scenarios. You can plot the queries for a single scenario in a map view or over time, or you can plot the difference in output values between two scenarios in either of the same two views.

Installation

The easiest way to run the GCAM Dashboard is using the R Studio IDE. Download and install R Studio. Start a new session in R Studio, and install the devtools package, if you don't have it already. You can do that by entering:

install.packages('devtools')

Next, install the GCAMdashboard package:

devtools::install_github('JGCRI/GCAM-dashboard')

This should install all of the required packages that the GCAM Dashboard needs to operate for you automatically.

Usage

To run the GCAM Dashboard, from the R command console enter GCAMdashboard::run().

Uploading data

The GCAM Dashboard gets its data from the project data files created by the rgcam package. Add one or more GCAM scenarios to a project data file using that package. In the panel at the left of the app's display you will see a widget for uploading your project file. Select your project file using the file explorer, and it will be uploaded into the app. The Project Info tab will show the name of the data file and the scenarios contained in it. You can also select one or more scenarios to see a list of all of the queries common to those scenarios.

Plotting maps

Switch to the Map View tab. The control panel at the left of the display has widgets for selecting a scenario to plot and a query to plot. Select the scenario and query you wish to plot, and the map will be updated. You can also choose to show a difference plot using the check box. If you do, then a selector for the difference scenario will appear.

At the bottom of the map there are controls for the display. The slider bar selects the year to plot. There is also a selector box for choosing what part of the map to display (global, or several regions of interest).

Plotting data over time

The Time View tab provides a view of the query variable over time. It uses the same controls on the left panel to select the scenario and query to display. As before, you can display either a single scenario or a difference between two scenarios.

Below the plot you will find controls for additional plot options. The selector box labeled "Break totals into subcategories by:" allows you to change the bar plot into a stacked bar plot, with the elements making up the stack coming from the variable you select. There is also a check box for filtering the data to certain regions. Selecting it will cause a list of regions to appear, and you can select the ones you want to include in the plot. Note, however, that if no regions are selected, the plot will instead display all regions, the same as if the filter regions check box were not selected.

gcam-dashboard's People

Contributors

calebbraun avatar rplzzz avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

calebbraun mit-jp

gcam-dashboard's Issues

Test basic functionality using RSelenium

Test goals

  • Load a test data set
  • Display a map of a query without a difference scenario
  • Display a map with a difference scenario
  • Display a bar plot with all regions
  • Display a bar plot filtered to several randomly selected regions
  • Load a new data set
  • Display a map of the new data set

Resources

Desired feature- scale time to match data

It would be better if the maps did not show years beyond what the data contains. If this is a complicated change, is there a way to hard code a different time limit for this specific project?

Fix console errors due to transient UI state

Example: When you are in the time view and you have the bars colored by, say, sector, if you switch to a query that does not have a sector column, you will get some transient errors. They don't show up in the UI, but they are printed to the console.

Desired feature list

  • Selector buttons for aggregation method.
  • Map display for gridded as well as tabular data
  • Selector for color map
  • Clean up spurious errors that occur during transient UI states
  • Export figures as graphics.

Error fetching GCAMdashboard source when publishing to shinyapps.io

I tried publishing this shiny app to shinyapps.io via RStudio, and got

Warning in FUN(X[[i]], ...) :
  Unable to find repository URL for package GCAMdashboard
DONE
Deploying bundle: 2924546 for application: 1996158 ...
Waiting for task: 707789369
  building: Parsing manifest
  building: Building image: 3243711
  building: Installing system dependencies
  building: Fetching packages
  error: Building package: GCAMdashboard
Error: Unhandled Exception: Child Task 707789370 failed: Error building image: Error fetching GCAMdashboard (0.2.0) source. <CRANPackageSource repo='http://cran.rstudio.org'> unable to satisfy package: GCAMdashboard (0.2.0)
In addition: Warning message:
In FUN(X[[i]], ...) :
  Package 'GCAMdashboard 0.2.0' was installed from sources; Packrat will assume this package is available from a CRAN-like repository during future restores
Execution halted

There might be something obvious I'm missing here because I'm new to R, but should there be a configuration file that tells the deployer where to find the code?

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.