ScientiaFelis/sebmsR

abundance_per_year_compare() have 1 week offset

Closed this issue · 6 comments

There seem to be a week offset in the data or presentation of weeks in figure.
See issue #23 for figures

This could be because excel and R count weeknr and start of week differently.

  • check what week 2022-01-02 or 2022-04-10 is (sunday) in week() and isoweek()
  • check how weeks count in R, week() and isoweek()

isoweek() starts the week on Monday and follow ISO8601 standard.

week just count the first seven days from 1 of januari as the first week and so on.

@larspett should we change the week setting from isoweek()?

what do we currently use? isoweek? What does that give for April 1 2022 and September 30 2022? 13 & 39? Same for same dates in 2011?

We use isoweek

2022-04-01 = W 13
2022-09-30 = W 39

2011-04-01 = W 13
2011-09-30 = W 39

looks fine