This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # This is a Shiny web application. You can run the application by clicking | |
| # the 'Run App' button above. | |
| # | |
| # Find out more about building applications with Shiny here: | |
| # | |
| # http://shiny.rstudio.com/ | |
| # | |
| library(shiny) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Get_tidy_prebust_losses <- function(lat, lon){ | |
| require(RCurl) | |
| require(stringr) | |
| require(tidyverse) | |
| require(glue) | |
| # Functions_____________________________________________________________________________ | |
| # Function to get the text file from the data hub for a latitude and longitude |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # # Exampe usage | |
| # lat = -33.87 | |
| # lon = 151.206 | |
| # | |
| # Get_losses(lat = lat, lon = lon) | |
| # $ILs | |
| # [1] 28 | |
| # | |
| # $CL | |
| # [1] 1.6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Get_tidy_prebust <- function(lat, lon){ | |
| require(RCurl) | |
| require(stringr) | |
| require(tidyverse) | |
| require(glue) | |
| # Functions_____________________________________________________________________________ | |
| # Function to get the text file from the data hub for a latitude and longitude |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # lat and lon must be latitude and longitude of some point on Australia, latitude must be negative | |
| Get_preburst <- function(percentile = c(50, 10, 25, 75, 90), type = c("depth", "ratio"), lat, lon){ | |
| require(tidyverse) | |
| require(stringr) | |
| require(glue) | |
| require(RCurl) | |
| # Check inputs-------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(treemap) | |
| library(tidyverse) | |
| wp <- tribble(~catchment, ~sub_catchment, ~area, | |
| 'Bunyip', 'Gauged', 697, | |
| 'Bunyip', 'Ungauged', 479, | |
| 'Lang Lang', 'Gauged', 272, | |
| 'Lang Lang', 'Ungauged', 151, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Burst initial loss = storm initial loss - preburst rainfall | |
| # Storm initial loss ------------------------------------------------------ | |
| # emprical distribution of initial loss | |
| # From ARR Table Table 5.3.13 | |
| # http://book.arr.org.au.s3-website-ap-southeast-2.amazonaws.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Data from the ARR data hub for Toomuc Creek | |
| pre_burst <- tribble(~perc, ~depth, ~ ratio, | |
| 10,0,0, | |
| 25,0,0, | |
| 50,1.5, 0.029, | |
| 75,13.3, 0.256, | |
| 90,38.4, 0.739) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(tidyverse) | |
| library(pracma) | |
| library(here) | |
| loss_std <- structure(list(Percentile = c(100, 90, 80, 70, 60, 50, 40, 30, | |
| 20, 10, 0), IL = c(0.14, 0.39, 0.53, 0.68, 0.85, 1, 1.2, 1.4, | |
| 1.71, 2.26, 3.19), CL = c(0.15, 0.35, 0.48, 0.61, 0.79, 1, 1.24, | |
| 1.5, 1.88, 2.48, 3.85), prob = c(0, 0.1, 0.2, 0.3, 0.4, 0.5, | |
| 0.6, 0.7, 0.8, 0.9, 1)), class = c("tbl_df", "tbl", "data.frame" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Generating initial loss values from the standardised initial losses from ARR | |
| # Book 5 | |
| # Chapter 3.6.1 | |
| # Table 5.3.13 | |
| # The original source of this is Nathan et al. (2003) | |
| # Nathan, R.J., Weinmann, P.E. and Hill, P.I. (2003), Use of a Monte-Carlo Simulation to | |
| # estimate the Expected Probability of large to extreme floods, Proceedings of the 28th | |
| # International Hydrology and Water Resources Symposium, pp: 1105-1112, 10-14 November, | |
| # Wollongong. |