Step 1 - Smartabase (Teamworks AMS) Access
Before you can install and use smartabaseR you will need the following:
- R and Studio downloaded - If you haven't done this do a quick youtube/google search.
- A Smartabase (Teamworks AMS) site
- Site credentials - ensure you have the appropriate Coach access and data permissions.
- If you are a site builder or admin and plan on exporting data for multiple groups make yourself a direct "Coach" of all groups, not just parent groups.
- You will need all data permissions to export data from a specific event form
Step 2 - Download the devtools package
Open R Studio and run the following command:
install.packages(devtools)
Wait for the download then proceed to step 3.
Step 3 - Install smartabaseR from Github
Run the following commands:
library(devtools)
install_github("Teamworksapp/smartabaseR")
Wait for the download then proceed to step 4.
Step 4 - Load the package and test
For your test export, select a small form with limited data, and/or a short date range. You want to make sure it works, not download everything in the site.
library(smartabaseR)
df -> sb_get_event(
url = " ", # site URL
form = " ", # event form name
date_range = c("01/01/2024", "01/03/2024"), # date format = dd/mm/yyyy
username = " ", # your site username, case sensitive
password = " ", # your site password
sb_get_event_filter(
user_key = "group", # this allows you to specify a group
user_value = " ", # group name from smartabase (teamworks AMS) site
)
)
Code Summary
Here is the complete code:
Additional Resources
Here is a link to the smartabaseR GitHub page and a link to additional documentation.
Need Help?
Reach out via our contact page. PRT can assist with developing advanced Smartabase workflows and answer general questions.