This repository has been archived by the owner on Jun 16, 2023. It is now read-only.
generated from USGS-R/slim-data-release-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
remake.yml
54 lines (45 loc) · 1.78 KB
/
remake.yml
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
51
52
53
54
packages:
- tidyverse
- meddle # at least v0.0.12
- scipiper
- readr
- sbtools
- sf
sources:
- src/sb_utils.R
- src/file_utils.R
- src/read_spf.R
targets:
all:
depends:
- log/sb_posted_files.csv
# create target of spatial file
# please note that the extract_feature function (below) from the meddle package must be run to create certain pieces of spatial metadata
# if you are not uploading any spatial data files to your data release,
# you will need to find a shapefile that represents the geographic area or your data release
# upload this file to your pipeline repostiory, read it in with the read_spatial_file function below, and extract_feature will pull the necessary metadata
# you do NOT need to upload this file to ScienceBase with the sf_to_zip function if it was not a planned part of your data release
sf_spatial_data:
command: read_sf("in_data/drb_boundary/drb_boundary.shp")
depends:
- in_data/drb_boundary/drb_boundary.dbf
- in_data/drb_boundary/drb_boundary.prj
- in_data/drb_boundary/drb_boundary.shx
#grab metadata from spatial file
spatial_metadata:
command: extract_feature(sf_spatial_data)
# out_data/cars.csv:
# command: file.copy(from = "example_data/example_cars.csv",
# to = target_name, overwrite = TRUE)
# out_data/spatial.zip:
# command: sf_to_zip(zip_filename = target_name,
# sf_object = sf_spatial_data, layer_name = I('spatial_data'))
out_xml/fgdc_metadata.xml:
command: render(filename = target_name,
"in_text/text_data_release.yml",
spatial_metadata)
log/sb_posted_files.csv:
command: sb_replace_files(filename = target_name,
sb_id = I('6421bccdd34e807d39ba9099'),
"out_xml/fgdc_metadata.xml",
sources = "src/sb_utils.R")