Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • c867f21
  • /
  • README.md
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge Iframe embedding
swh:1:cnt:bba34fc183db56277530fd64a83a62fd82b936cc
directory badge Iframe embedding
swh:1:dir:c867f21d61d39183e60ea5a6a8a595e8285b55d8

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
README.md
# Combining HMMs and SSFs code

Repository containing code for paper <i>Combining habitat selection, behavioural states, and individual variation to predict fish spatial usage near a barrier</i>

<h> Rough breakdown of code

<b>Code to filter raw data</b> contains code to go from raw positions to the approach tracks used in the paper (https://doi.org/10.5281/zenodo.14313343). This is python code and includes some purpose written functions. The hydraulic data (rasters for flow velocity, water depth, spatial velocity gradient, flow velocity angle and spatial velocity angle) are located at https://doi.org/10.5281/zenodo.14318807

<b>scripts</b> contains R code for various purposes - applying crawl to interpolate the tracks, adding standardised columns for modelling, filtering to keep good quality tracks (x 2 scripts), a code to perform model selection (as in-built R functions didn't work with the fit_issf function used), creating SSF dataframes. Scripts that have to run in a specific order are numbered.

It is important to note that for the SSF only and the HMM-SSFs that the same code is used to process the data. As I did the SSF only analyses first (in Mawer et al. (2023)). The dataframes made in Mawer et al. then had HMMs applied, states assigned and the analyses repeated per state. The code here is therefore altered as needed for which dataset (SSF only or HMM-SSF).


<b>Cross validating codes</b> contain the codes to simulate tracks to cross validate the SSFs. This involves code written in C++ by James Campbell (code by James Campbell in folder cpp).


<b>Prediction code</b> contains the code used to predict spatial usage of the two species from the SSF outputs, and to plot the results.

<b>Results code</b> - The file "hmm_+_ssf_explore.Rmd" does the data exploration for all model results (i.e. both the combined states SSFs and the HMM-SSFs).

back to top

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API