Skip to content

Commit

Permalink
add demonstration of updating structural metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
collinschwantes committed Sep 5, 2024
1 parent efae05c commit 373929c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
20 changes: 10 additions & 10 deletions vignettes/data_examples/my_data.csv
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
"date","measurement","measured_by","site_name","key"
2024-08-26,20,"Johana","b",1
2024-08-27,13,"Johana","c",2
2024-08-28,51,"Collin","b",3
2024-08-29,14,"Collin","b",4
2024-08-30,19,"Collin","c",5
2024-08-31,29,"Johana","d",6
2024-09-01,2,"Johana","d",7
2024-09-02,88,"Collin","a",8
2024-09-03,21,"Johana","d",9
2024-09-04,25,"Johana","c",10
2024-08-26,43,"Johana","c",1
2024-08-27,9,"Johana","c",2
2024-08-28,79,"Johana","c",3
2024-08-29,17,"Collin","a",4
2024-08-30,61,"Johana","e",5
2024-08-31,30,"Collin","b",6
2024-09-01,58,"Collin","a",7
2024-09-02,27,"Johana","d",8
2024-09-03,52,"Johana","d",9
2024-09-04,82,"Collin","e",10
12 changes: 9 additions & 3 deletions vignettes/metadata.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,6 @@ expand_frictionless_metadata(structural_metadata = structural_metadata,
data_package_path = "data_examples/datapackage.json")
# update the deposit the new structural metadata
cli$deposit_update()
## OOPs actually I need to add more to the description
Expand All @@ -209,6 +206,15 @@ cli$deposit_fill_metadata(descriptive_metadata)
# upload to zenodo - this creates a **draft** deposit in Zenodo
cli$deposit_upload_file(path = "data_examples/")
## update structural metadata
structural_metadata[1,2] <- "New description"
expand_frictionless_metadata(structural_metadata = structural_metadata,
resource_name = "my_data", # name of the file with no extension
resource_path = "data_examples/my_data.csv",
data_package_path = "data_examples/datapackage.json")
# there are methods for embargoing or restricting deposits in {deposits}
Expand Down

0 comments on commit 373929c

Please sign in to comment.