This is the R code to compute power analysis for the user defined location of PAM devices to understand statistical power to detect changes in distribution and detections of baleen whales during construction of offshore windfarms along the East Coast of the US. The work is built on the larger power analysis funded by BOEM by Chudzinska and Thomas 2023, available here https://espis.boem.gov/final%20reports/BOEM_2023-041.pdf All the input data necessary to run the analysis as well as the final report of the work are in this folder https://smrumarine.box.com/s/dlnqz2a5pj4gm391v85cnrbg3viuk5y1. Please ignore any request to login to Box if appears and procceed to download. Any questions contact Magda Chudzinska (mc@smruconsulting.com) or Len Thomas (len.thomas@st-andrews.ac.uk)