Git Product home page Git Product logo

thermopic's Introduction

Predicting and Visualizing Thermal Habitat: thermopic

The thermopic R package provides functionality for predicting and visualizing the seasonal availability of thermal habitat in lakes.

Installation

Installation is easiest from an R commandline using the devtools package.

devtools::install_github('stevencarlislewalker/thermopic')

It might be necessary to preceed this first step by installing devtools.

install.packages('devtools')

Once the package is installed, it may be loaded using the library function.

library(thermopic)

Quick tour

The thermopic package runs within a project directory, which we create using the optional temporary_thermopic_directory function.

root = temporary_thermopic_directory()

We now use thermopic's setup_directory function to create the required directory structure for our project. For this quick tour we use sample input data contained within the package, which is the default behaviour of setup_directory.

setup_directory(root, overwrite = TRUE)

To inspect the resulting directory structure one may use thermopics print_directory_tree function.

print_directory_tree(root)
## thermopic_project           
##  ¦--DataIn                  
##  ¦   ¦--0_User_Options.csv  
##  ¦   ¦--1_Lake.csv          
##  ¦   °--2_Climate.csv       
##  ¦--DataOut                 
##  ¦   °--ThermoPics          
##  ¦--ThermoPic_Dictionary.csv
##  ¦--ThermoPic_Guide.pdf     
##  °--ThermoPic_TechReport.pdf

Now that the structure is in place one may fit the thermopic model.

fitted_thermopic_model = thermopic_model(
  path = root,
  Lake = '1_Lake.csv',
  Climate = '2_Climate.csv'
)

And create the report as well as the thermopic images themselves.

thermopic_report_data = thermopic_report(
  path = root,
  STM_Parameters = '4_STM_Parameters.csv',
  Nlakes_test = 5,
  show_progress_bar = FALSE
)

Here we see the resulting outputs including the images in jpeg format files.

## thermopic_project                                          
##  ¦--DataIn                                                 
##  ¦   ¦--0_User_Options.csv                                 
##  ¦   ¦--1_Lake.csv                                         
##  ¦   °--2_Climate.csv                                      
##  ¦--DataOut                                                
##  ¦   ¦--3_Model_Inputs.csv                                 
##  ¦   ¦--4_STM_Parameters.csv                               
##  ¦   ¦--5_ThermalSpace4D.csv                               
##  ¦   ¦--ThermoPics                                         
##  ¦   ¦   ¦--4_Wingiskus Lake_15-3543-56122_P2001-2010.jpeg 
##  ¦   ¦   ¦--5_Cygnet Lake_15-3653-55394_P2001-2010.jpeg    
##  ¦   ¦   ¦--5_Malachi Lake_15-3559-55281_P2001-2010.jpeg   
##  ¦   ¦   ¦--5_South Scot Lake_15-3523-55336_P2001-2010.jpeg
##  ¦   ¦   °--5_Whitefish Lake_15-3532-55170_P2001-2010.jpeg 
##  ¦   ¦--tmp_ClimMetrics.csv                                
##  ¦   °--tmp_IceClimMetrics.csv                             
##  ¦--ThermoPic_Dictionary.csv                               
##  ¦--ThermoPic_Guide.pdf                                    
##  °--ThermoPic_TechReport.pdf

Further information

For a more detailed introduction see this tutorial.

thermopic's People

Contributors

danielpgillis avatar stevencarlislewalker avatar

Watchers

 avatar  avatar

Forkers

nyglester

thermopic's Issues

Testing use of issues

This is NOT an issue. I added an issue so I could send a message to steve. I found the R code - making progress here

Update the existing pdf documentation or decide who will do that.

What needs to change:

  1. The original file organization presented in section C2 is different for R packages, and so this must be updated (DONE)
  2. The method of running of the software presented in section C3 now needs to be updated, given the more functional (as opposed to script-based) approach
  3. The list of package dependencies is different (e.g. XLConnect is no longer required) -- full list of current dependencies in the package DESCRIPTION file (DONE)
  4. It is now possible to specify user options both as the csv file format on page 5, and via standard R function arguments

How should we handle versioning?

I would prefer to use the versioning system recommended here: http://r-pkgs.had.co.nz/description.html

However, I respect that there is an existing system in place.

One thing I would really like to get rid of is the versioning of the file names. These versions should be implied by the version of the package in which the files live. It is less error-prone to have a single place for the version of package contents.

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.