Skip to content

Releases: bcgov/fasstr

fasstr 0.5.2

28 Mar 20:15
Compare
Choose a tag to compare

Updated: 27 Mar 2024
Bug fixes:

  • added workaround for issue with scales::cut_short_scale() bug caused by scales 1.3.0. r-lib/scales#413. Fix works with previous and new versions of scales.

fasstr 0.5.1

22 Mar 20:37
Compare
Choose a tag to compare

Updated: 20 Mar 2023

Bug fixes:

  • fixed date_validate bug (issue#93) where functions could not assign date class when data frame was all NA (eg. Calc_annual_lowflows() for a seasonal station with no complete years).
  • fixed add_seasons bug (issue#94) where left_join was not working properly
  • updated some dplyr and ggplot2 coding with recent updates in those dependencies

fasstr 0.5.0

21 Oct 20:18
Compare
Choose a tag to compare

Updated: 19 Oct 2022

  • This release is a major new update with additional functions and changes to existing functions to present data and plots in different ways and more consistency across functions, updating various colours to viridis scales for accessibility, as well as updating some internal processes and fixing some minor bugs. Some functions have been superseded by others, but all functions will still be available within the package.

New functions:

  • plot_flow_data_symbols() - plots daily data with coloured points designating symbol categories from symbols column
  • plot_annual_symbols() - plots symbols by day of year or annual counts or percent of days with symbols from symbols column
  • plot_annual_stats2() - plotting annual stats in ribbons (similar to plot_daily_stats)
  • plot_monthly_stats2() - plotting faceted monthly stats in ribbons (similar to plot_daily_stats)
  • plot_monthly_means() - plotting long-term monthly means with percents of long-term MADs
  • calc_annual_highflows() and plot_annual_highflows() - calcs/plots annual high flow data, similar to _annual_lowflow() functions
  • calc_annual_extremes() - plots the values and dates from annual minimums and maximums for each year, replacing calc_annual_peaks()
  • plot_annual_extremes() - plots the values and dates from annual minimums and maximums for each year, from calc_annual_extremes()
  • plot_annual_extremes_year() - plots the values and dates from annual minimums and maximums fora given year
  • calc_annual_normal_days() and plot_annual_normal_days() - counts number of normal and above/below normal days - replaced superseded _annual_outside_normal() functions
  • plot_annual_normal_days_year() - plot days above normal, below normal and normal for a specific year
  • plot_annual_flow_timing_year() - plot annual timing of flows for a specific year

Function updates:

  • plot_missing_data() - new default plot type in tile format. Can change to original bar plot using plot_type = "bar".
  • plot_data_screening() - now changes the geom_point style based on if data is complete or has missing data (plot_availability argument) and now allows choice of annual summary statistics (include_stats argument)
  • screen_flow_data() - now add columns of counts of symbol categories provided by symbol column (HYDAT Symbol column). Can remove columns by using include_symbols = FALSE.
  • plot_annual_means() - added 2 percentile (of annual means) lines to plot, added legend
  • calc_annual_peaks() - superseded, replaced with calc_annual_extremes()
  • plot_annual_cumulative_stats() - new default plot type in bar format. Can change to original line plot using plot_type = "line".
  • calc_annual_outside_normal() and plot_annual_outside_normal() - superseded, replaced with calc_annual_normal_days() and plot_annual_normal_days()
  • compute_frequency_analysis() - added logical 'compute_fitting' argument to fit plotting positions (TRUE, default) or don't and just return plotting position results (first 3 objects of output) (FALSE); add custom plot y-axis title

Other updates:

  • Plot legends now centered on right, not top
  • Changed colour scales on many plots to the viridis palette
  • Can now choose 0 and 100 percentiles (was previously between 1 and 99)
  • Added args plot_inner_percentiles, plot_outer_percentiles, and changed include_extreme to plot_extreme in various functions
  • Added 'complete_years' argument to several functions for cross-package consistency. Doesn't change functionality, but sets/overrides ignore_missing to FALSE and allowed_missing to 0.
  • "Year" axes now labeled "Water Year" if water_year_start != 1
  • Some appropriate "Day of Year" axes now labeled "Day of Water Year" if water_year_start != 1
  • Changed y-axis labels on plots using scales::cut_short_scale() to remove exponents on large numbers
  • Annual plots with leading empty years (gaps, missing dates, etc) will now shift plot to first year of data
  • Updated vignettes with new functions and updates
  • Added complete_years and allowed_missing arguments to write_full_analysis outputs on the fasstr functions tab

Bug fixes:

  • complete_years function now applied to all functions in compute_ and write_full_analysis functions
  • Removed HYDAT.sqlite file check in compute_HYDAT_peak_frequencies() - leaves check to tidyhydat
  • fixed fill_missing_dates water year bug

fasstr 0.4.1

11 Dec 02:31
Compare
Choose a tag to compare

Updated: 10 Dec 2021

Updates:

  • Fixed major bug: Seasons identifiers were mislabeled when water_year_start > 1 for add_seasons() and various functions use seasonal cumulative totals
  • Updated documentation - 'months' and other param descriptions
  • plot_flow_duration() - removed annotation ticks when not in log-scale
  • added 'log_ticks' argument to customize adding annotation_ticks or not when log scale
  • removed 'log_discharge' from plot_annual_lowflows()

fasstr 0.4.0

04 Dec 20:23
Compare
Choose a tag to compare

Updated: 3 Dec 2021

Updates:

  • added flexible 'allowed_missing' argument to applicable functions, that allows users to choose the percentage of missing dates, rather than binary ignore_missing. ignore_missing argument still functions as it should (to maintain historical and future use), and is only superseded when allowed_missing argument is utilized. This argument is currently applied to functions that make most logical sense (annual and monthly functions) and are appropriate for calculations, i.e. basin summary statistics (means, percentiles, minimums, maximums). Versions of this, allowed_missing_annual and allowed_missing_monthly, exists for some functions that have both annual and monthly statistics and may have different allowances; only applied to summary statistics. The new argument is applied to the following functions:

    • allowed_missing argument: calc_annual_lowflows(), calc_annual_peaks(), calc_annual_stats(), calc_monthly_stats(),
      compute_annual_frequencies(), compute_frequency_quantile(), plot_annual_stats(), plot_annual_lowflows(),
      plot_annual_means(), plot_monthly_stats()
    • allowed_missing_annual and allowed_missing_monthly: calc_all_annual_stats(), compute_annual_trends(),
      compute_full_analysis(), write_full_analysis()
  • added 'months' argument to following functions (covers all screen_, calc_, plot_, and compute_ functions now):

    • plot_flow_data() - will plot only data from selected months
    • add_cumulative_yield() and add_cumulative_volume() - will accumulate flows just in selected months
    • plot_longterm_daily_stats() - no ribbons where data gaps
    • plot_longterm_monthly_stats() - no ribbons where data gaps
    • calc_ and plot_daily_cumulative_stats() - will accumulate flows just in selected months
    • calc_ and plot_monthly_cumulative_stats() - will accumulate flows just in selected months
    • calc_ and plot_annual_cumulative_stats() - will only use months select, won't calc seasonal totals if not all months
    • calc_ and plot_annual_flow_timing() - will use timing from just selected months
    • calc_all_annual_stats() - will only use months select, won't calc seasonal totals if not all months
    • compute_annual_trends() - will only use months select, won't calc seasonal totals if not all months
    • compute_ and write_full_analysis() - will only use months select, won't calc seasonal totals if not all months
  • Updated 'Users Guide' vignette and Cheat Sheet with new argument updates

  • New vignette for GitHub Page: Using USGS dataRetrieval R package with fasstr

  • fixed bug: multiple custom groups/STATION_NUMBER's appropriately match to data when using a named vector

  • fixed bug: plot_daily_cumulative_stats() now plots accurate custom years

  • fixed bug: removed unnecessary legend items from plot_flow_duration()

  • fixed bug: corrected 'months' argument in calc_ and plot_annual_outside_normal() to properly filter

  • fixed bug: removed unnecessary NA warning in plot_longterm_daily and plot_longterm_monthly_stats

  • renamed GitHub branches from 'master' to 'main' and updated web links

fasstr 0.3.3

21 Oct 16:23
Compare
Choose a tag to compare

Updated: 20 Oct 2021

Updates:

  • For trending, changed default/recommended method to 'zhang' over 'yuelipon' (pacificclimate/zyp#6)
  • Removed check for a hydat.sqlite3 file; tidyhydatstop error catches error
  • Removed lubridate package dependency
  • Fixed ggplot2::guides deprecated arguments warning
  • Simplified some internal coding for efficiency
  • Removed some function examples to reduce timing; examples of usage in vignettes
  • Removed TravisCI, added Github Action R-CMD-check using usethis::use_github_action_check_standard()

fasstr 0.3.2

09 Nov 20:10
Compare
Choose a tag to compare

Updated: 06 Nov 2020

Updates:

  • Added calc_annual_peaks() function to calculate both annual n-day min. and max. flows with dates of occurrence.
  • Added error in volume frequency analysis when providing zero or negative flow values to the logPIII dist.
  • Updated volume frequency analysis documentation.
  • Updated all vignettes for package updates, corrections, and issues.
  • Added new 'Get Started' vignette
  • Updated Cheatsheet
  • changed yield terminology to water yield from runoff yield
  • changed plot axis titles with expression()'s (i.e. m3/s --> cms)

fasstr 0.3.1

28 May 18:48
Compare
Choose a tag to compare

fasstr 0.3.1

Updated: 08 Jan 2020

Updates:

  • Initial CRAN release
  • added/modified files in prep for CRAN submission
  • fixed vignette coding errors
  • renamed function calc_longterm_mad to calc_longterm_mean
  • updated vignettes and README files
  • removed calc_longterm_stats and plot_longterm_stats
  • updated Examples in all documentation (replaced \dontrun{} with a function checking for a HYDAT, left for writing functions and larger analyses)
  • fixed multiple typos
  • updated DESCRIPTION file

Previous fasstr versions

  • see NEWS file for previous versions notes