Go to https://www.nabatmonitoring.org/ and click partner portal.Login to your account and proceed to the project that matches project_id (projects tab). Click on your project and navigate there. Once inside the project page, click the 'Bulk Upload Status' tab and view the data that this script just processed. If there are errors, make changes and try again with either this R code or the Website.
All of uploads through nabatr use the 'Full Metadata' option. To view more information, go to your project, select the 'Upload Survey Data' button at the top, and click any of the types to popup a box with more information. (Capture records are currently unavailable through nabatr. Go to Website to upload.)
library(nabatr) # Enter your NABat username here username = 'NABat_Username' token = get_nabat_gql_token(username) token # Note: if you leave run token = get_nabat_gql_token(), # it will prompt you for a username and then a password
# Refresh token token = get_refresh_token(token) # Get your projects lookup table project_df = get_projects(token) # Display your projects lookup table project_df
### Change this value to the project ID you want to upload data to project_id = 000
user_id = get_user_id_by_email(username, token)
# Type of data to be uploading ex: ## 'bulk_sae' = Stationary Acoustic data ## 'bulk_mae' = Mobile Acoustic Data ## 'bulk_hib' = Hibernacula Colony Count Data ## 'bulk_mat' = Maternity Colony Count Data ## 'bulk_ee' = Emergence Count Data survey_type = 'bulk_sae' # Location of file to be uploaded and processed into NABat Database/Website ## Don't end in "/" ## valid Ex: (mac) /users/johndoe/downloads/example.csv or (windows) C:/path/to/example.csv ## * Windows users * - Be sure to switch backward slashes '\' to forward slashes '/' file_path = '/users/johndoe/downloads/example.csv'
# Refresh token token = get_refresh_token(token) # Uploads file_path csv into the NABat database ## Double check project_id, survey_type, and project_id! upload_data(token = token, user_id = user_id, file_path = file_path, project_id = project_id, survey_type = survey_type)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.