Skip to content

Instantly share code, notes, and snippets.

View ashiklom's full-sized avatar

Alexey Shiklomanov ashiklom

View GitHub Profile
@ashiklom
ashiklom / md.to.wiki.sh
Last active January 18, 2019 20:21
OneNote to Markdown
#!/bin/bash
# This is an example comment on this issue
# Get arguments
infile=${1}
outdir=${2-"output"}
mkdir -p $outdir
@ashiklom
ashiklom / download.iridl.sh
Last active April 3, 2016 21:44
Convert expert-mode code to a URL and download the corresponding figure from IRIDL
#!/bin/bash
infile=$1
outfile=${infile/code/gif}
if [ `head -n1 $infile` == "auxfig" ]; then
code=`tail -n +2 $infile`
echo "Auxfile"
auxfile=1
else
@ashiklom
ashiklom / ToDo.md
Created June 14, 2016 19:11 — forked from bcow/ToDo.md

Figures

  • Add ellipse instead of data points for observations in pft plots
  • Try with plotted means
  • Read ggplot2 stat_ellipse code
@ashiklom
ashiklom / missing.R
Created June 16, 2016 01:19
Multivariate normal fit with missing values in STAN
library(rstan)
library(MASS)
# Simulate some data
mu <- c(10, 5, -5)
Sig <- matrix(c(1, 0.7, 0.8,
0.7, 2, 0.2,
0.8, 0.2, 1.5),
3, 3)
N <- 100
@ashiklom
ashiklom / pecan.xml
Created July 11, 2016 16:43
PEcAn XML and YAML comparison
<?xml version="1.0"?><pecan>
<info>
<notes/>
<userid>1000000001</userid>
<username>Mike Dietze</username>
<date>2016/07/06 20:00:33 -0400</date>
</info>
<outdir>/fs/data2/output//PEcAn_1000002164</outdir>
<database>
<bety>
@ashiklom
ashiklom / workflow.Rout
Created May 15, 2017 15:45
DALEC issue log
R version 3.4.0 (2017-04-21) -- "You Stupid Darkness"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
@ashiklom
ashiklom / ebifarm.lat40.0lon-88.0.css
Created September 7, 2017 15:11
Fixed EBI Farm CSS and PSS files
year patch cohort dbh hite pft dens bd ba avgRg
2002 1 1 0.2 2 15 100 0 0.1 -999.0
@ashiklom
ashiklom / viz_task.md
Last active March 26, 2018 14:15
PEcAn GSOC 2018 Visualization Task

Create a web-based interactive visualization app of the Earth Surface Temperature Data from Berkeley Earth (https://www.kaggle.com/berkeleyearth/climate-change-earth-surface-temperature-data) in RShiny (https://shiny.rstudio.com/). Your app should include, at a minimum, a separate tab for each of the following:

  • A line plot of temperate by country, selecting the country from a drop-down menu.
    • BONUS: Visualize temperature uncertainty on the same graph
    • BONUS: The option to apply a moving window average or other smoothing algorithm to the data. Extra points if the algorithm's parameters can be customized by the user via sliders and/or drop-down menus
  • A bivariate scatter plot of temperatures for two different countries, selected from a drop-down menu by the user
    • BONUS: Visualize temperature uncertainties on the same graph
  • BONUS: Fit a linear regression through the data. Extra points for additional, related analyses (e.g. correlation coefficient, major axis regression), especially if they can be
@ashiklom
ashiklom / config.xml
Last active January 22, 2019 23:08
Example ED parameter file
<?xml version="1.0"?>
<!DOCTYPE config SYSTEM "ed.dtd">
<config>
<pft>
<num>9</num>
<is_tropical>0</is_tropical>
<is_grass>0</is_grass>
<include_pft>1</include_pft>
<include_pft_ag>0</include_pft_ag>
@ashiklom
ashiklom / load_local.R
Last active January 18, 2019 20:14
Read RData files into an object, rather than the global environment
#' Read an `Rdata` file into a list (rather than into the global
#' environment)
#'
#' @param file Target file name
#' @return Named list containing objects in `file`.
#' @author Alexey Shiklomanov
#' @examples
#' \dontrun{
#' mylist <- load_local("file.RData")
#' }