Created
September 27, 2018 11:36
-
-
Save akbertram/d200811e42e0792319d411a22c2107ca to your computer and use it in GitHub Desktop.
query.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Needs to be done once | |
install.packages("devtools") | |
library(devtools) | |
install_github( "bedatadriven/activityinfo-R", ref = "release") | |
library(activityinfo) | |
activityInfoLogin(userEmail = "api+training@bedatadriven.com", | |
password = "testing123") | |
schools <- queryTable("a2145507918", columns = | |
c(id = "_id", | |
name = "Name", | |
camp = "Camp.Name", | |
governorate = "Governorate.Name", | |
students = "Students")) | |
write.csv(schools, "schools.csv") | |
values <- getDatabaseValueTable(database.id=9907) | |
write.csv(values, "values.csv") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment