SimonDedman / MarSpatAuto

Automating marine spatial date acquisition & analysis
GNU General Public License v3.0
2 stars 0 forks source link

TimeofDay, (Day, Night, or Crepuscular) #20

Open BonnieAhr opened 3 years ago

BonnieAhr commented 3 years ago

As a different option to solar irradiance sometimes you want a categorical variable for day/night/or crepuscular periods. The function I currently use pulls down sunrise/sunset times using package suncalc (for the local time) and then adds a column to the data "TimeofDay" with either a "Day" or "night" distinction. It also has an option to add another category of crepuscular. The user can choose if crepuscular means 1 hour before/after sunrise and sunset or can change it to be 2 hours etc and it will include a "dawn" or "dusk" category.

SimonDedman commented 3 years ago

Hi Bonnie. I have a similar thing that uses suncalc to pull "sunrise", "sunset", "dawn", "dusk" but day/night would be a useful addition. LMK where your function lives for future reference. Cheers!

SimonDedman commented 6 days ago

DawnDusk from blocklab