forked from BirdsCanada/naturecounts-community-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOpenDoorScience_naturecounts_intro.R
50 lines (36 loc) · 1.37 KB
/
OpenDoorScience_naturecounts_intro.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Open Door Science Code
# October 4 2024
# How to access your data using the NatureCounts R Package
# Step 1: Create a NatureCounts account, ask Catherine to give you access to your programs data
# Step 2: Review the Intro Tutorial
#https://birdscanada.github.io/NatureCounts_IntroTutorial/
#If you have never used NatureCounts R, please install the package using the following script
#install.packages("remotes")
#remotes::install_github("BirdsCanada/naturecounts")
# Step 3: Explore your data download option
library(naturecounts)
library(tidyverse)
#view Access Levels for NatureCounts collections
dat<-nc_count() #what libraries do you have access to? Level 5 = Open Access
view(dat)
#explore the meta files
collections<-meta_collections()
view(collections)
#Region and Species filtering
dat<-nc_count(region=list(statprov="ON"))
view(dat)
dat<-nc_count(species=2510)
search_species("chickadee")
search_species_code("BCCH")
# 14280
search_species("Least bittern")
# 2510
#BMDE Data Download
?nc_data_dl()
#filter options (set up the three maximum)
#field_set = "extended" #Gives you all the BMDE columns (including species common name)
#Other Data Download
nc_query_table()
nc_query_table(username="dethier")
BCCWS_ex<-nc_query_table(table="BmdeExtendBCCWS" , username="dethier")
#Zero-filling requires you download all the data for the time period you are interested in analyzing.