Understanding Data Access
All downloads in naturecounts
require a free
NatureCounts account (sign up
here).
Not all data hosted by NatureCounts is immediately available to
users. Different data sets have different access levels (also called
akn_levels
). A full description of these different levels
is available from the NatureCounts
site.
Briefly, there are five levels and the R package
naturecounts
can potentially access three of these levels
(for most users).
Data at access level 5 are considered public data and are available to all users. Data at access levels 4 and 3 are private/semi-public projects/collections. To access this data you must request access (see Requesting Access, below).
Data at access level 2 are visible in counts
returned by nc_count()
and in metadata returned by
meta_collections()
, etc., but are not downloadable through
nc_data_dl()
in the naturecounts
R package
without special permissions.
Data at access level 1 are not visible through the
naturecounts
R package without special permissions.
Requesting Access
You can request access to full or partial datasets at levels 3 and 4 through the NatureCounts data request page. To request partial access, choose the filters and walk through the steps. To request full access, choose the collection and check the “Full access?” box in Step 2.
Once a request has been submitted it has to be approved by the appropriate data custodian.
What Do I Have Access To?
To see what you have access to you can use three functions:
nc_permissions()
, nc_count()
and
nc_requests()
.
Full Access - nc_permissions()
or
nc_count()
You can see which data you have full access to
(i.e. you have access to all data within a specific collection) with
either the nc_permissions()
or nc_count()
functions.
To get a list of collections to which you have access, use the
nc_permissions()
function.
nc_permissions(username = "sample")
## [1] "SAMPLE1" "SAMPLE2"
To additionally get the amount of data in each of these collections,
user the nc_count()
function.
nc_count(username = "sample")
## # A tibble: 2 × 4
## collection akn_level access nrecords
## <chr> <int> <chr> <int>
## 1 SAMPLE1 0 full 991
## 2 SAMPLE2 0 full 995
To see which data you do not (currently) have access to, use the
show = "all"
argument.
nc_count(username = "sample", show = "all")
## # A tibble: 2 × 4
## collection akn_level access nrecords
## <chr> <int> <chr> <int>
## 1 SAMPLE1 0 full 991
## 2 SAMPLE2 0 full 995
Data where access
is “by request” is available through
the online request portal. Data where access
is “no access”
may be available as counts, but is not generally accessible as a
download of raw data.
Partial Access - nc_requests()
You can see which data you have partial access to
(i.e. you have requested access to part of a collection or part of a
series of collections through the online portal) with the
nc_requests()
function.
nc_requests(username = "USER")
An example of the output you might see:
request_id requestOrigin requestLabel collection status nrecords
1 155882 web steffi's test QCOWLS pending 12640
2 155886 web steffi's test SK SKATLAS1BE_DO approved 99872
3 155886 web steffi's test SK SKATLAS1BE_SUMM approved 42203
4 155886 web steffi's test SK SKATLAS1PC approved 27916
5 155888 web steffi's test partial projects 1 PFW-US-EAST pending 368672
6 155888 web steffi's test partial projects 1 PFW-US-WEST pending 282745
7 155889 web steffi's test partial projects 2 PFW-US-EAST pending 1269
8 155889 web steffi's test partial projects 2 PFW-US-WEST pending 4080
filters
1 date_type (s); project ('QCOWLS')
2 date_type (s); project ('SKATLAS1BE_DO','SKATLAS1BE_SUMM','SKATLAS1PC')
3 date_type (s); project ('SKATLAS1BE_DO','SKATLAS1BE_SUMM','SKATLAS1PC')
4 date_type (s); project ('SKATLAS1BE_DO','SKATLAS1BE_SUMM','SKATLAS1PC')
5 date_type (s); project ('PFW-US-EAST','PFW-US-WEST'); species (14280)
6 date_type (s); project ('PFW-US-EAST','PFW-US-WEST'); species (14280)
7 date_type (s); project ('PFW-US-EAST','PFW-US-WEST'); species (14320)
8 date_type (s); project ('PFW-US-EAST','PFW-US-WEST'); species (14320)
The status
field/column shows which requests have been
approved
, are pending
or have been
declined
.
How Do I Download Accessible Data?
Full Access
Data to which you have full access can be directly downloaded via the
nc_data_dl()
function.
bittern <- nc_data_dl(species = 2490, username = "sample", info = "nc_example")
Note that request_id
s are created for web
requests (above) and are also created for api
requests:
data downloaded via the nc_data_dl()
function if a
request_id
was not provided.
The following examples use the “testuser” user which is not available to you. You can quickly sign up for a free account of your own to access and play around with these examples. Simply replace
testuser
with your own username.
For example, the previous download created an api
request_id
. To see request_id
s created through
this R package, use the argument type = "api"
in
nc_requests()
.
nc_requests(username = "testuser", type = "api")[1,]
## request_id request_origin request_label collection status nrecords
## 1 155885 api API Request RCBIOTABASE approved 2
## filter
## 1 project ('RCBIOTABASE'); species (133990)
This data can be re-downloaded (more quickly) by using this stored
request_id
.
old <- nc_data_dl(request_id = 185663, username = "testuser")
How Do I Download Specially Requested Data?
Approved requests can either be downloaded by hand from the website,
or the request_id
can be used to download data with the
nc_data_dl()
function.
nc_requests(username = "USER")
request_id requestOrigin requestLabel collection status nrecords
2 155886 web steffi's test SK SKATLAS1BE_DO approved 99872
3 155886 web steffi's test SK SKATLAS1BE_SUMM approved 42203
4 155886 web steffi's test SK SKATLAS1PC approved 27916
filters
2 date_type (s); project ('SKATLAS1BE_DO','SKATLAS1BE_SUMM','SKATLAS1PC')
3 date_type (s); project ('SKATLAS1BE_DO','SKATLAS1BE_SUMM','SKATLAS1PC')
4 date_type (s); project ('SKATLAS1BE_DO','SKATLAS1BE_SUMM','SKATLAS1PC')
sask <- nc_data_dl(request_id = 155886, username = "USER")