-
Task
-
Resolution: Unresolved
-
Major
-
None
-
0.7.2
-
None
-
Production
Assess the changes requested by WI for the upload packages. This file contains some small modifications to the # eMammal batch upload templates. Some are corrections to correctly validate the data. Others are a remapping # of columns because the templates sent by eMammal had an issue.
library(tidyverse)
library(jsonlite)
library(googlesheets)
library(lubridate)
library(editData)
Read images.csv
image_bu = read_csv("images.csv", show_col_types = FALSE, lazy = FALSE )
Taxonomy corrections for Blank class.
image_bu = mutate(image_bu, common_name = replace(common_name, common_name == "None", "Blank"))
image_bu$wi_taxon_id[image_bu$common_name == 'Blank'] = 'f1856211-cfb7-4a5b-9158-c0f72fd09ee6'
image_bu = mutate(image_bu, class = replace(class, class == "None", ""))
image_bu = mutate(image_bu, order = replace(order, order == "None", ""))
image_bu = mutate(image_bu, family = replace(family, family == "None", ""))
image_bu = mutate(image_bu, genus = replace(genus, genus == "None", ""))
image_bu = mutate(image_bu, species = replace(species, species == "None", ""))
Removing space from the age column.
image_bu$age = str_trim(image_bu$age, "both")
Parsing timestamp to WI format.
image_bu$timestamp = paste(as.character(parse_date_time(image_bu$timestamp, '%Y-%m-%d %H:%M:%S')))
image_bu$sequence_start_time = paste(as.character(parse_date_time(image_bu$sequence_start_time, '%Y-%m-%d %H:%M:%S')))
Mapping placename to deployment_id as requested by Haydee.
dep_bu = read_csv(paste(project, "deployments.csv", sep="/"), show_col_types = FALSE, lazy = FALSE, )
dep_bu$deployment_id = dep_bu$placename
Mapping project_name to project_short_name as requested by Haydee.
prj_bu = read_csv(paste(project, "projects.csv", sep="/"), show_col_types = FALSE, lazy = FALSE, )
prj_bu$project_short_name = prj_bu$project_name
print(prj_bu$project_short_name)
- mentioned in
-
Page Loading...