Tutorial
Longer test for code tabs
Last Updated: Aug 7, 2024
Authors:
Last Updated: Aug 7, 2024
library(neonUtilities)
import neonutilities as nu
import matplotlib.pyplot as plt
Here is some text explaining what it is we’re doing here.
Let’s download some data!
veg <- loadByProduct(dpID='DP1.10098.001', site='WREF',
startdate='2022-01', include.provisional=T,
check.size=F)
veg = nu.load_by_product(dpid='DP1.10098.001', site='WREF',
startdate='2022-01', include_provisional=True,
check_size=False)
Verify the table names in the downloaded data.
names(veg)
## [1] "categoricalCodes_10098" "citation_10098_PROVISIONAL"
## [3] "citation_10098_RELEASE-2024" "issueLog_10098"
## [5] "readme_10098" "validation_10098"
## [7] "variables_10098" "vst_apparentindividual"
## [9] "vst_mappingandtagging" "vst_perplotperyear"
veg.keys()
## dict_keys(['variables_10098', 'validation_10098', 'categoricalCodes_10098', 'readme_10098', 'vst_perplotperyear', 'vst_apparentindividual', 'vst_mappingandtagging', 'issueLog_10098', 'citation_10098_PROVISIONAL', 'citation_10098_RELEASE-2024'])
Now let’s plot the frequency distribution of tree species.
vegspp <- table(veg$vst_mappingandtagging$taxonID)
vegspp <- vegspp[order(vegspp, decreasing=T)]
barplot(vegspp, names.arg=names(vegspp),
ylab="Total", las=2)
vegspp = veg['vst_mappingandtagging']['taxonID'].value_counts()
plt.bar(vegspp.keys(), vegspp)
plt.xticks(rotation=90)