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

added upscale_droop folder #21

Merged
merged 2 commits into from
Mar 21, 2024
Merged

added upscale_droop folder #21

merged 2 commits into from
Mar 21, 2024

Conversation

michael-trollip-AEMO
Copy link
Collaborator

added upscale droop scripts which take in CER data and underlying data to upscaled droop response curves.

It outputs a timeseries CSV where each column corresponds to the upscaled MW response for each droop response category per Standard

Copy link
Collaborator

@phoebeheywood phoebeheywood left a comment

Choose a reason for hiding this comment

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

Hey Mikey, looks pretty good to me. Just a few small things you could change before merging :)

upscale_droop/upscale_droop_script.R Outdated Show resolved Hide resolved
upscale_droop/upscale_droop_script.R Outdated Show resolved Hide resolved
upscale_droop/upscale_droop_script.R Outdated Show resolved Hide resolved
"AS4777.2:2015", Standard_Version))

# write in 2020 standard into the droop compliance column if standard is 2020
UD <- mutate(UD, compliance_status = ifelse(Standard_Version == "AS4777.2:2020", compliance_status_2020, compliance_status))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would be better to do this before filtering "bad data"

######################## Get proportion (by count) of each droop response per standard and OEM ###############################

Proportions <- group_by(UD, Standard_Version, c_id, compliance_status, manufacturer) %>% summarise()
Proportions <- mutate(Proportions, StdComplianceCombined = paste(Standard_Version, compliance_status))
Copy link
Collaborator

Choose a reason for hiding this comment

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

This column already exists in UD so can just be added as a grouping column above


pivot_upscaled_MW_profile <- pivot_wider(select(upscale_MW_profile, c("ts","StdComplianceCombined", "upscale_MW")), names_from = StdComplianceCombined,
values_from =upscale_MW)
write.csv(pivot_upscaled_MW_profile, paste(output_directory,"droop_compliance_upscale_by_OEM_site_normalisation.csv",sep=""), row.names = FALSE)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Might be nice to have the filename defined at the top so if you're doing multiple runs it's easier to rename it

@phoebeheywood phoebeheywood merged commit 7456c39 into master Mar 21, 2024
4 checks passed
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