From d4f8df8f4bbc7d116e70c007ba0b9c1bb63be8f1 Mon Sep 17 00:00:00 2001 From: nluymesOntario Date: Tue, 27 Feb 2024 19:41:19 -0500 Subject: [PATCH] remove readme files --- README.html | 488 ---------------------------------------------------- README.md | 39 ----- 2 files changed, 527 deletions(-) delete mode 100644 README.html delete mode 100644 README.md diff --git a/README.html b/README.html deleted file mode 100644 index a56a409..0000000 --- a/README.html +++ /dev/null @@ -1,488 +0,0 @@ - - - - - - - - - - - - - -README - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
-

Moose Tag Fill Rates Project

-

The Moose Tag Fill Rates (TFR) project consists of the development of -two models:

-
    -
  1. A hierarchical time-to-event (survival) model evaluating the -influence of environmental factors and management decisions on hunter -success rates in WMUs across Ontario.

  2. -
  3. A structural time series model that has been trained to predict -moose TFRs for upcoming hunting seasons using covariates of the number -of tags issued and hunter reply rates. The structural time series used -for this project is a state space model where the observed values of -TFRs are generated by latent space dynamics.

  4. -
-

The project includes code clean the raw data used for the models -(scripts), as well as code to recreate the hierarchical -models (scripts/hierarchical_model), code to replicate -the training and validation processes used to parameterize the -predictive models (scripts/predictive_model_train) and -code to update the predictive models with the most recent data to -predict deer seen for upcoming hunting seasons -(scripts/predictive_model_update). There is also code -for a shiny app to display the predictions for upcoming hunting seasons -in the output/shiny_app folder.

-

A description of the hierarchical model can be found here (link to -TFR manuscript) and the methods for training and validation of the -predictive model can be found here (link to methods).

-
-

Usage

-
-

Data Preparation

-

To start the process of predicting TFR for the upcoming hunting -season, create a working folder to house the most recent data in -data/raw and name the folder with the year you want -predictions for.

-

Data for moose harvest summaries can be downloaded from here. -Save the “Harvest” tab as a csv file in your working folder.

-

Scripts in scripts/predictive_model_update with the -prefix 01 can be executed to prepare the remaining data:

-
    -
  • 01_tfr_pred_data_update.R - -Consolidates all data into one dataframe and transforms variables into -appropriate format for analysis. Update year_predict variable and data -file name. Consolidated data frame is saved in -data/processed
  • -
-
-
-

Run Model

-

There are two options to refit models with updated data:

-
    -
  1. Fit models using personal/work computer: For this option, execute -02_tfr_pred_model_update.R after updating -the year_predict variable to the year of interest. Model predictions and -parameter estimates will be saved in -output/predictive_model.
  2. -
  3. Fit models using Compute Canada servers: For this option, upload all -files from -scripts/update_model/02_tfr_pred_model_update to a -Compute Canada server (using MobaXterm or a similar -program) and execute the command -sbatch 01_tfr_pred_model_update.sh. Model predictions and -parameter estimates will be saved to the server and can be downloaded to -output/predictive_model. Note: for this method, you -will need to manually install the relevant R packages to the Compute -Canada server.
  4. -
-
-
-

Display Model Output

-

The final step of the process involves updating the Shiny app that -displays the model predictions and trends.

-

First open 03_tfr_pred_shinyapp_prep.R -in scripts/predictive_model_update and update the -year_predict variable to the year of interest. Then execute the script. -This script prepares the predictions and modelled trends for the R Shiny -app code.

-

Next open and run app.R in -output/shiny_app. This file will update the Shiny app -that displays the model predictions and parameter estimates. This app -will need to be housed on a shiny server in order to share with others. -Alternatively the shiny_app folder can be shared with -users that are familiar with R.

-
-
-
- - - - -
- - - - - - - - - - - - - - - diff --git a/README.md b/README.md deleted file mode 100644 index 57fb204..0000000 --- a/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# Moose Tag Fill Rates Project - -The Moose Tag Fill Rates (TFR) project consists of the development of two models: - -1. A hierarchical time-to-event (survival) model evaluating the influence of environmental factors and management decisions on hunter success rates in WMUs across Ontario. - -2. A structural time series model that has been trained to predict moose TFRs for upcoming hunting seasons using covariates of the number of tags issued and hunter reply rates. The structural time series used for this project is a state space model where the observed values of TFRs are generated by latent space dynamics. - -The project includes code clean the raw data used for the models (**scripts**), as well as code to recreate the hierarchical models (**scripts/hierarchical_model**), code to replicate the training and validation processes used to parameterize the predictive models (**scripts/predictive_model_train**) and code to update the predictive models with the most recent data to predict deer seen for upcoming hunting seasons (**scripts/predictive_model_update**). There is also code for a shiny app to display the predictions for upcoming hunting seasons in the **output/shiny_app** folder. - -A description of the hierarchical model can be found here (link to TFR manuscript) and the methods for training and validation of the predictive model can be found here (link to methods). - -## Usage - -### Data Preparation - -To start the process of predicting TFR for the upcoming hunting season, create a working folder to house the most recent data in **data/raw** and name the folder with the year you want predictions for. - -Data for moose harvest summaries can be downloaded from [here](https://ontariogov.sharepoint.com/sites/MNDMNRF-SRB/HunterReporting/Shared%20Documents/Forms/AllItems.aspx). Save the "Harvest" tab as a csv file in your working folder. - -Scripts in **scripts/predictive_model_update** with the prefix 01 can be executed to prepare the remaining data: - -- 01_tfr_pred_data_update.R - Consolidates all data into one dataframe and transforms variables into appropriate format for analysis. Update year_predict variable and data file name. Consolidated data frame is saved in **data/processed** - -### Run Model - -There are two options to refit models with updated data: - -1. Fit models using personal/work computer: For this option, execute 02_tfr_pred_model_update.R after updating the year_predict variable to the year of interest. Model predictions and parameter estimates will be saved in **output/predictive_model**. -2. Fit models using Compute Canada servers: For this option, upload all files from **scripts/update_model/02_tfr_pred_model_update** to a Compute Canada server (using [MobaXterm](https://mobaxterm.mobatek.net/) or a similar program) and execute the command ```sbatch 01_tfr_pred_model_update.sh```. Model predictions and parameter estimates will be saved to the server and can be downloaded to **output/predictive_model**. Note: for this method, you will need to manually install the relevant R packages to the Compute Canada server. - -### Display Model Output - -The final step of the process involves updating the Shiny app that displays the model predictions and trends. - -First open 03_tfr_pred_shinyapp_prep.R in **scripts/predictive_model_update** and update the year_predict variable to the year of interest. Then execute the script. This script prepares the predictions and modelled trends for the R Shiny app code. - -Next open and run app.R in **output/shiny_app**. This file will update the Shiny app that displays the model predictions and parameter estimates. This app will need to be housed on a shiny server in order to share with others. Alternatively the **shiny_app** folder can be shared with users that are familiar with R. -