sheilasaia / paper-ndfd-nccoast-study Goto Github PK
View Code? Open in Web Editor NEWAnalysis associated with ndfd shellcast paper.
Analysis associated with ndfd shellcast paper.
check out John's code here: https://github.ncsu.edu/ncsco/corn_web/blob/main/data_functions.php#L409
want data for all applicable stations, for years = 2015 & 2016
checkout the following for data from the SCO API:
Others:
see cloudyR script
county based shape files are incorrect on work pc and need to rerun (see part 4 "county based: classify historic precip as urban/non-urban and coast/non-coast")
includes loop!
(not just cocorahs)
fix percent complete on 04 script line 50!
Hi Sheila,
Could you please calculate the R2 (coefficient of determination) and RMSE for each of the valid periods shown in the plot below?
In the paper, I'm thinking we can have the above plot alongside this one:
Note that, in the figure above, I manually added the R2 and RMSE text boxes in powerpoint. Here's the code I used to create the plot (I pulled code from one of your scripts, but it looks slightly different than the original plot - I must have pulled the code for a different figure).
my_validhrs_colors <- c("#66c2a5", "#fc8d62", "#8da0cb")
ggplot(data = d) +
geom_point(aes(x = precip_test*2.54, y = precip_pred*2.54, fill = as.factor(valid_period)), shape = 21, alpha = 0.50, size = 3) +
geom_abline(slope = 1, intercept = 0, lty = 2) +
facet_wrap(~ as.factor(valid_period)) +
labs(x = "Forecasted (cm)", y = "Observed (cm)", fill = "Valid Period Hours") +
theme_classic() +
scale_fill_manual(values = my_validhrs_colors) +
theme(axis.text = element_text(size = 16),
axis.title = element_text(size = 16),
text = element_text(size = 16),
panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
panel.background = element_blank())
ggsave("sim_obs_ml.pdf", width = 12, height = 4, units = "in")
that is re-run ndfd_convert_raster_to_point_script.R
Currently, the qpf and pop values for the 48h and 72h valid periods are lined up with the 24h observed rainfall values (e.g., a 48h forecast issued on Jan 1 is being compared to actual precip from Jan 1, but should be compared to actual precip from Jan 2). New date columns should be added that correspond to the different ndfd valid periods, and the data should then be reorganized to ensure the observed precip values are aligned with the appropriate forecast valid periods.
To implement this change, edit the roc_wrangle_data_script.R script. From discussion today, it seems like a good approach would be to add columns for date_48h and date_72h when creating temp_ndfd_data_sel (line 307). The data would still need to be realigned so the precip matches the forecast valid periods (maybe done after the completion of the i/j/k loops?).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.