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

Refactor mbon stats #81

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

ocefpaf
Copy link
Member

@ocefpaf ocefpaf commented May 29, 2024

Start addressing #79

@ocefpaf ocefpaf force-pushed the refactor_mbon_stats branch from 4593d43 to 6721f42 Compare May 30, 2024 07:48
@ocefpaf
Copy link
Member Author

ocefpaf commented May 30, 2024

@MathewBiddle we need to merge #80 first and I'd like to ask you a few clarifications before moving forward with this one. So far all I did was to reduce the amount for for-loops but the data changed in subtle ways that I'm not sure they are related to the code change. I believe it may due too the time of the query.

@ocefpaf ocefpaf force-pushed the refactor_mbon_stats branch from 6721f42 to 8c15d10 Compare May 30, 2024 07:53
@ocefpaf ocefpaf force-pushed the refactor_mbon_stats branch from 8c15d10 to 807f140 Compare May 30, 2024 14:44
@ocefpaf ocefpaf marked this pull request as ready for review May 30, 2024 14:47
@MathewBiddle
Copy link
Contributor

Where does this stand? Is there more work to be done before a review?

@ocefpaf
Copy link
Member Author

ocefpaf commented Jul 18, 2024

Let's close and reopen to toggle the CIs. If it still pass, I'd like to check if the changed data is expected, due to a later run, or if my changes are responsible for it. Hard for me to say b/c I'm not familiar with MBON.

@ocefpaf ocefpaf closed this Jul 18, 2024
@ocefpaf ocefpaf reopened this Jul 18, 2024
@MathewBiddle MathewBiddle reopened this Jan 29, 2025
@MathewBiddle
Copy link
Contributor

closed and reopened to trigger checks

@MathewBiddle
Copy link
Contributor

@ocefpaf this now passes all checks. Are we good to merge?

@ocefpaf
Copy link
Member Author

ocefpaf commented Jan 29, 2025

@ocefpaf this now passes all checks. Are we good to merge?

IMO, yes. It would be nice if you, or someone more familiar with mbon, could run it and comment if the results make sense. At the time I recall we had almost 100% comparison, with the exception of https://github.com/ioos/ioos_metrics/pull/81/files#diff-c1e3298f59885519b1b10f023299eae49fedc0616aaf818f2155ed5a11a5371bR607

@MathewBiddle
Copy link
Contributor

Something isn't right with the dates, the data only goes back to 2023-04.

image

I'm testing using the code in https://github.com/ioos/ioos_metrics/blob/main/notebooks/mbon_citation_visualizations.ipynb

@MathewBiddle
Copy link
Contributor

The yearly totals plots match:

image

But, the total citations via GBIF don't match:

df = mbon_stats()
print(f"{len(df.drop_duplicates(subset='doi',keep='first')[['doi']])} dataset DOI's at GBIF")
print(f"{len(df)} total citations via GBIF")
41 dataset DOI's at GBIF
41 total citations via GBIF

@ocefpaf
Copy link
Member Author

ocefpaf commented Jan 30, 2025

Thanks! Now I know were to start looking for code differences and try to fix this.

@MathewBiddle
Copy link
Contributor

Here's what the numbers should be:

41 dataset DOI's at GBIF
2920 total citations via GBIF

OBIS downloads:

      downloads
year           
2018         27
2019       7312
2020      87692
2021     457248
2022     213969
2023     221396
2024     430666
2025      16494

OBIS: 1434804 downloads

GBIF Downloads:

      number_downloads
year                  
2016              3369
2017             30080
2018             48361
2019             29966
2020             41590
2021             51336
2022             76654
2023             97296
2024            110224

GBIF: 488876 downloads

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

Successfully merging this pull request may close these issues.

2 participants