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

Get chirps monthly #1

Merged
merged 2 commits into from
Aug 14, 2024
Merged

Get chirps monthly #1

merged 2 commits into from
Aug 14, 2024

Conversation

zackarno
Copy link
Collaborator

gee script to extract monthly chirps means to adm1 in afg

@zackarno zackarno requested a review from t-downing April 22, 2024 17:40
Copy link
Collaborator

@t-downing t-downing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The output looks sensible! Just had a couple issues running with rgee, maybe these are things you've run into as well?

library(tidyrgee)
library(rhdx)
library(tidyverse)
ee_Initialize()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was having this issue authenticating, so used this workaround, just FYI

Copy link
Collaborator Author

@zackarno zackarno Jul 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting! yeah it seems the {rgee} authentication procedures are in some state of flux at the moment. I personally am not having issues with it, but seems alot are.

A couple questions

  1. Are you using Rstudio?
  2. Also have you followed the {rgee} install/authentication instructions? I think it sets up a conda env w/ miniconda (also downloaded/set up gcloud?). Unfortunately {rgee} has never been a simple install.packages("rgee") situation

It's probably an annoying default set up if you are using pyenv for everything else. But so far has been working for me at least



# zonal means for each year-month at admin 1
df_chirps_monthly <- ee_extract_tidy(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I keep getting Error in value[[3L]](cond) : The ee$FeatureCollection (y) must be not higher than 10 000., even though the feature collection should just be 34 long. Could it be related to your issue here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah seems related, but oddly this is not causing issues for me.
Probably it's calculating length(y) as 34 (provinces) *12 (months) * 43 (years).

Did you download the dev version of {tidyrgee} (devtools::install_github("r-tidy-remote-sensing/tidyrgee")). Maybe I implemented a work-around for the issue there, but I thought it would be on CRAN anyway

@zackarno
Copy link
Collaborator Author

zackarno commented Jul 15, 2024

Thanks for the feedback. The authentication issue w/ rgee is a bit troubling and I am not 100% sure what the plan is for the package. I will try to find out.

Let me know if any of the above comments help. I can either leave this branch hanging or merge it to main. The chirps adm0 data from GEE probably won't be used at the end of the day as I am now aggregating from WFP (HDX) instead, but there is some exploratory analysis that I do later w/ {rgee} to create an rpub doc which would be nice to include in main so would be great if the code can run.

@caldwellst
Copy link
Collaborator

Despite the issues, going to merge to main so I can build off of Zack's work for my additional exploration.

@caldwellst caldwellst merged commit 328e2be into main Aug 14, 2024
@caldwellst caldwellst deleted the get-chirps-monthly branch August 14, 2024 09:24
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.

3 participants