Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dates and documentation #41

Open
msh855 opened this issue Jun 27, 2023 · 2 comments
Open

Dates and documentation #41

msh855 opened this issue Jun 27, 2023 · 2 comments

Comments

@msh855
Copy link

msh855 commented Jun 27, 2023

Hi,

I think the documentation (v5) on dates is not very clear, especially with high frequency dates.

Most users, most likely have dates that look like this 01/01/2023, which corresponds to a dd/mm/yyyy format.

I think it would be more clear to show the correspondence of such conventional formatting to BEAR's dated formats.

For example. In the documentation there is no clarification how to format dates from 01/01/2023 is it 2023d0101 or 2023d101
Or should assume that 1999d208 corresponds to the 208th day of the year 1999, which makes it very time consuming and user unfriendly such way of input data (assuming that most raw data follow conventional date formatting)

I think a lot of new users will struggle on the same issue.

From the development point of view, I would recommend to have a separate functionally that convert conventional dates formats - as is standard in R and Python - to BEAR date formats. Currently, the date formatting is not the most user friendly, and I am sure many new uses like me are struggling with this.

Thank you and appreciate your clarifications on this

@sabaNdanladi
Copy link

sabaNdanladi commented Jun 27, 2023 via email

@msh855 msh855 changed the title Dates formats and documentation Dates and documentation Jun 27, 2023
@msh855
Copy link
Author

msh855 commented Jun 28, 2023

Here is a Python script to convert dates. It worked in my case.


start_sample_date = '2000-01-04'
end_sample_date = '2023-06-26'
full_dates = pd.date_range(start=start_sample_date, end=end_sample_date)
df_dummy = pd.DataFrame(index=full_dates, columns=['Dates_Fill'])

dates_BEAR_full = []
for date in df_dummy.index:
    d = date.strftime("%j")
    d_new = d.lstrip('0')
    year = str(date.year)
    date_final = year + 'd' + d_new
    dates_BEAR_full.append(date_final)

df_dummy['Dates_Fill'] = dates_BEAR_full



Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants