Skip to content

Instantly share code, notes, and snippets.

@akbertram
Created September 27, 2018 11:36
Show Gist options
  • Save akbertram/d200811e42e0792319d411a22c2107ca to your computer and use it in GitHub Desktop.
Save akbertram/d200811e42e0792319d411a22c2107ca to your computer and use it in GitHub Desktop.
query.R
# 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