Closed teixeirak closed 7 years ago
I did something similar recently, plotting a database over the CRU climate data to produce this figure: Happy to share code/data if useful.
I'd like to put that in the background of this figure; it would be great if you could share the code.
Here's the relevant code:
read_csv("outputs/crudata_period.csv.gz") %>%
print_dims() %>%
# bin by temp and precip
mutate(tmp_round = round(tmp / 2, 0) * 2,
pre_round = round(pre / 300, 0) * 300) %>%
group_by(tmp_round, pre_round) %>%
summarise(area_km2 = sum(area_km2)) ->
crudata_period
p <- ggplot(crudata_period, aes(tmp_round, pre_round)) +
geom_tile(aes(fill = area_km2)) +
scale_fill_continuous(low = "lightgrey", high = "black", guide = FALSE) +
geom_point(data = srdb, aes(mat_hadcrut4, map_hadcrut4, color = Study_midyear), alpha = I(0.5)) +
scale_color_continuous(guide = FALSE) +
xlab(expression(MAT~(degree*C))) + ylab("MAP (mm)")
print(p)
Here's the data file this code reads, a summary of CRU data for 1990-2014. I can compute another period if you'd prefer.
Thanks! That time period is great. @ValentineHerr, could you please take a stab at this?
@teixeirak where should we store CRU data? If we use it in the code it should be somewhere.
Assuming its okay to make it public (@bpbond ?) , lets add a separate "supplementary resources" folder and put it there.
@teixeirak, is this figure working for you ? (I tried to attach it, let me know if that doesn't work).
It needs some twists probably... @teixeirak, Do you want me to create a new directory to archive the figures ?
(a) looks wonderful! One small change-- let's do the same as in the original version with black symbols for ForC climate values and white/black outline symbols for those pulled from a database.
for (b),
Considering the changes to b, it will probably be best to have them stacked instead of side-by-side. There are no size restrictions, so feel free to make them big.
Yes, please create a figures directory.
For empty symbols, I was using a file called "SITES.missing.map.mat.WorldClim". Should I upload it into "supplementary resources"? I also have the script that creates that file. should I uploaded it too ? If yes, do you want it in "scripts/archive" or "supplementary resources"?
let's put both in a folder called supplementary resources/WorldClim data
Re public data, sure, it's just summarized HadCRUT4 data, and those are public.
Figure looks great!
@teixeirak is this better/good to go?
Perfect! Your idea for the Koppen plot was better than mine.
On Aug 23, 2017, at 5:36 PM, ValentineHerr notifications@github.com<mailto:notifications@github.com> wrote:
[climate_of_forc_sites]https://user-images.githubusercontent.com/19673377/29639622-67bb187a-8829-11e7-922d-e058c36be097.png @teixeirakhttps://github.com/teixeirak is this better/good to go?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/forc-db/ForC/issues/36#issuecomment-324469639, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGD7jnKkBgCDEYop-kHAIo1-mp4qGPK1ks5sbJtrgaJpZM4O_CC9.
Reopening because I think we still need to load the script
done
Please load the script used to create this figure:
Modify as follows: