Coder Social home page Coder Social logo

charlie-becker / doa_web_viewer Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 2.61 MB

Shiny Application to interactively explore 30 years of climate data in the Snake River Valley AVA

Home Page: http://bwc.boisestate.edu/climate-viewer/

R 91.80% CSS 8.20%

doa_web_viewer's Introduction

Snake River Valley AVA Climate Explorer

The Snake River Valley AVA Climate Explorer is an R Shiny application to interactively explore 30 years of climate data in the Snake River Valley AVA. It features tools to explore data generated by the Weather and Research Forecasting Model for water years 1988-2017.

Contact

Head Developer - Charlie Becker ([email protected]; [email protected])

Developer - Kendra Kaiser ([email protected])

Developer - Elizabeth Padian ([email protected])

Primary PI - Lejo Flores ([email protected])

Server Hosting

This tool is currently hosted by Boise State University. Those with permissions can access the server using their Boise State login credentials via ssh. Login procedure would look like:

ssh [email protected]

Directory stucture:

opt/
├── chef/
└── shiny-server/
     ├── bwc/
     │    ├── welcome.html
     │    └── hello/
     │        ├── server.R
     │        └── ui.R
     │    └── climate-viewer
     │        ├── app.R
     │        ├── busyIndicator.R
     │        ├── buttonIndicator.R
     │        └── data/
     │            └── ...
     │        └── www/
     │            └── ...
     └── [other labs applications...]
     
    

cd /opt/shiny-server/bwc/climate-viewer will take you directly to the application directory.

Note: The public domain address will be bwc.boisestate.edu/{nameofdirectorywithapplication}

In this case, the directory is named /climate-viewer which would have a full domain address of bwc.boisestate.edu/climate-explorer and will change if the directory is renamed. Additionally, other Shiny apps can be created and hosted in other directories located in /opt/shiny-server/bwc/

This repository mimics the structure within the ./climate-viewer directory, however, the data is far too large to host on github and is not present.

General Notes

  • An additional example application 'hello' has been setup as an example of the ease to host various applications if needed/wanted. Each directory here is an open port and can be viewed by directory name (http://bwc.boisestate.edu/hello)

  • Shiny applications can be setup two distinct ways - everything included in an app.R file (climate-viewer) or split between ui.R and server.R files (hello). Either is fine, however, the names of them MUST be app.R or ui.R/server.R

  • busyIndicator.R and buttonIndicator.R are supplimental scripts used to display an animation after the 'create map' button is pressed on the explore page to signal to the user that the app is processing the request.

  • the www/ folder contains various style elements (such as a .css file) and all graphics/logos/videos to be used on the site. Shiny directly looks for a /www folder, thus this folder cannot be renamed.

Data

A brief overview of the types of data files:


File Name Description
SR_AVA_simplified_pointRemove50m.json GeoJSON boundary of the Snake River AVA
Yearly_Anomalies_d02.nc Difference between mean and annual mean - domain 02
AVA_Yearly_Anomalies_d02.nc Difference between mean and annual mean - masked by AVA
<month>_Anomalies_d02.nc Difference between monthly 30YR mean and selected month of each year
<month>_AVA_Anomalies_d02.nc Difference between monthly 30YR mean and selected month of each year - masked by AVA
d01_30YR_NoLeap917.csv Daily aggregated values (Domain 01) for all 30 years (not including september 2017)
d02_30YR_NoLeap917.csv Daily aggregated values (Domain 02) for all 30 years (not including september 2017)
AVA_30YR_NoLeap917.csv Daily aggregated values (Domain 02 - AVA) for all 30 years (not including september 2017)
SS_30YR_NoLeap917.csv Daily aggregated values (Point within Sunny Slope) for all 30 years (not including september 2017)
WY<year>_yearly_stats_d02.nc Daily values (Domain 02)
AVA_WY<year>_yearly_stats_d02.nc Daily values (Domain 02 - AVA)
AVA_30YR_df_all_vars.csv Annual values for each grid point within the AVA

Testing/Development

If you choose to develop and test on an IDE such as Rstudio on your local machine, here's the recommended procedure:

  1. Make sure you have these libraries installed on your local machine:

    • Git
    • netcdf
    • GDAL
  2. Clone the github repository via git clone https://github.com/LEAF-BoiseState/DOA_web_viewer

  3. Copy a portion of data to your local machine (you don't need all of it) with secure copy:

    • Recommended files to copy to provide most functionality (total ~1.75 GB):

      • SR_AVA_simplified_pointRemove50m.json (1.3 MB) - (don't need to copy, should be provided in the data directory when cloned)
      • Yearly_Anomalies_d02.nc (108 MB)
      • Apr_Anomalies_d02.nc (108 MB)
      • d02_30YR_NoLeap917.csv (1.2 MB)
      • AVA_WY1988_yearly_stats_d02.nc (1.3 GB)
      • AVA_30YR_df_all_vars.csv (155 MB)
    • scp <username>@bwc.boisestate.edu://opt/shiny-server/bwc/climate-viewer/data/Yearly_Anomalies_d02.nc <path>/DOA_web_viewer/data/ is an example of how to copy data from the server to your machine.

  4. Once you have the data copied into the data directory of the cloned repository, open app.R and change line 22 to the path where you cloned the repository.

  5. Run the application - it should pop up immeadiately in your local browser.

doa_web_viewer's People

Contributors

charlie-becker avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

leaf-boisestate

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.