diff --git a/.gitignore b/.gitignore index 1c316e6..91c8c23 100644 --- a/.gitignore +++ b/.gitignore @@ -26,5 +26,6 @@ Temporary Items # Script diagnostic plots *.pdf -*.png + +README.html diff --git a/R/growth_plot.png b/R/growth_plot.png new file mode 100644 index 0000000..230c5e3 Binary files /dev/null and b/R/growth_plot.png differ diff --git a/README.md b/README.md index 9efcee7..6fa7020 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,19 @@ - **If you want a simple download**, click on the "Releases" tab above. + **If you want a simple download**, click on [Releases](https://github.com/bpbond/srdb/releases). There's also a version on the [ORNL DAAC](https://doi.org/10.3334/ORNLDAAC/1235). -srdb -==== +# srdb Global soil respiration database - Last data update: 09 October 2022 -About srdb ------------------------ -This project is **not code**. Rather, it's a database of published studies -about soil surface CO2 flux (soil respiration) in the field, intended to -serve as a resource for scientific analysis. +## About + +The global soil respiration database (SRDB) is a database of published +studies about the flux of CO2 from the soil surface to the atmosphere ("soil +respiration"") in the field. It's intended to serve as a resource for +scientific analysis. -List of files in this repository ------------------------ +## Files in this repository File | Description ----------------------------|------------------------------------------------ @@ -32,8 +30,7 @@ srdb-equations.csv | Temperature and moisture sensitivity equations srdb-studies_fields.txt | Metadata for the srdb-studies file srdb-studies.csv | Studies database -Major changelog ------------------------ +## Major changelog Date | Change -------- | ------------------------------------------------------------ @@ -62,46 +59,49 @@ Date | Change 20100517 | PY2009 data added. Field reordered to match Biogeosciences ms. 20100222 | `Partition_method` field fixed for many records. Thanks to Myroslava Khomik. -How to use these data ------------------------ -Read the documentation! There are a few fields to be especially careful of, especially "Quality_flag", -"CO2_method" (e.g. many analyses will want to exclude soda lime measurements), "Manipulation" (you may -want to filter to "None" to look at un-manipulated systems), "Ecosystem_state", and "Ecosystem_type". +![A plot of database growth over time](R/growth_plot.png) + +## How to use these data + +Read the documentation! There are a few fields to be especially careful of, +especially "Quality_flag", "CO2_method" (e.g. many analyses will want to +exclude soda lime measurements), "Manipulation" (you may want to filter to +"None" to look at un-manipulated systems), "Ecosystem_state", +and "Ecosystem_type". + +## How to get a publication -How to get a publication ------------------------ -If you'd like to obtain a PDF of one of the database studies, open an issue or email -Ben Bond-Lamberty, the maintainer. In either case please specify the study number. +If you'd like to obtain a PDF of one of the database studies, open an issue +or email Ben Bond-Lamberty, the maintainer. +In either case please specify the study number. -How to cite these data ------------------------ -This data set is **open**, and no co-authorship is required if you make use of it. The relevant citation is: -* Jian, Vargas, Anderson-Teixeira, Stell, Herrmann, Horn, Kholod, Manzon, Marchesi, Paredes, and Bond-Lamberty (2021). A restructured and updated global soil respiration database (SRDB-V5), *Earth Syst. Sci. Data* 13:255–267, 2021, doi: [10.5194/essd-13-255-2021](https://doi.org/10.5194/essd-13-255-2021). +## How to cite these data + +This data set is **open**, and no co-authorship is required if you make +use of it. The relevant citation is: + +* Jian, Vargas, Anderson-Teixeira, Stell, Herrmann, Horn, Kholod, Manzon, Marchesi, Paredes, and Bond-Lamberty (2021). A restructured and updated global soil respiration database (SRDB-V5), _Earth Syst. Sci. Data_ 13:255–267, 2021, doi: [10.5194/essd-13-255-2021](https://doi.org/10.5194/essd-13-255-2021). The older, original citation is: -* Bond-Lamberty and Thomson (2010). A global database of soil respiration measurements, *Biogeosciences* 7:1321-1344, doi: [10.5194/bgd-7-1321-2010](http://dx.doi.org/10.5194/bgd-7-1321-2010). -Analyses using these data should include the database version (i.e. the tag, such as "v20131218a", and ideally the git commit), download date, and URL. (At some point in the future, releases will include a DOI, too.) +* Bond-Lamberty and Thomson (2010). A global database of soil respiration measurements, _Biogeosciences_ 7:1321-1344, doi: [10.5194/bgd-7-1321-2010](http://dx.doi.org/10.5194/bgd-7-1321-2010). + +Analyses using these data should include the database version (i.e. the tag, +such as "v20131218a", and ideally the git commit hash), download date, and URL. +(At some point in the future, releases will include a DOI, too.) -Mailing list ------------------------ -If you'd like to know when these data are updated, a mailing list is available at http://groups.google.com/group/srdb-project-announce. +## How to contribute -How to contribute ------------------------ The goal is for this to be a dynamic, community database, not just an archived blob. Why? Well, these data undoubtedly have mistakes and omissions; the database could be structured more usefully for new analyses; and the dataset should be extended as new studies are -published. Internet-based hosting services like give us the ability to build a 21st-century data set that is -modified by, and grows with, the needs of the scientific community. +published. Internet-based hosting services like give us the ability to +build a 21st-century data set that is modified by, and grows with, +the needs of the scientific community. + There are at least ways to contribute. The **first**, and preferred, way is to fork out (using git) a copy of the data, just as if this were an open-source software project. You can then modify or add data and -send me a pull request. The **second** way -is to use the Excel workbook provided for data entry -and then email the file back to one of the project administrators. The -**third** way to help is to file a bug report on the Issues tab or via email -to one of the admins. For all cases, instructions can be found with the -downloaded material. - +send me a pull request. +The **second** way is to [open an issue](https://github.com/bpbond/srdb/issues). diff --git a/growth_plot.R b/growth_plot.R new file mode 100644 index 0000000..a7b2c0d --- /dev/null +++ b/growth_plot.R @@ -0,0 +1,59 @@ +# Plot database growth over time +# BBL 2024-09-30 + +if(basename(getwd()) != "srdb") stop("Working directory must be srdb/") + +library(ggplot2) +theme_set(theme_bw()) +library(scales) +library(dplyr) +library(tidyr) + +read.csv("srdb-data.csv") %>% + mutate(Y = as.integer(substr(Entry_date, 1, 4))) -> + x + +x %>% + group_by(Y) %>% + summarise(N = n()) %>% + mutate(type = "Total records") -> + x1 + +x %>% + filter(Manipulation == "None", !is.na(Rs_annual)) %>% + group_by(Y) %>% + summarise(N = n()) %>% + mutate(type = "Rs_annual, no manipulation") -> + x2 + +x %>% + filter(Manipulation == "None", !is.na(Rh_annual)) %>% + group_by(Y) %>% + summarise(N = n()) %>% + mutate(type = "Rh_annual, no manipulation") -> + x3 + +x %>% + filter(Manipulation == "None", !is.na(Rs_growingseason)) %>% + group_by(Y) %>% + summarise(N = n()) %>% + mutate(type = "Rs_growingseason, no manipulation") -> + x4 + +bind_rows(x1, x2, x3, x4) %>% + complete(Y = 2008:2024, type, fill = list(N = 0)) %>% + arrange(Y) %>% + group_by(type) %>% + mutate(cum_N = cumsum(N)) -> + x_final + +p <- ggplot(x_final, aes(Y, cum_N, color = type)) + + geom_line(linewidth = 1) + + xlab("Year of entry") + ylab("Database entries") + + scale_color_discrete("") + + scale_y_continuous(labels = comma) + + theme(legend.position = "inside", + legend.position.inside = c(0.3, 0.85), + legend.background = element_blank()) +print(p) +ggsave("R/growth_plot.png", width = 8, height = 5)