fhdsl / metricminer

R package that digs up data that matters from APIs, making it dashboard-ready
https://hutchdatascience.org/metricminer/
MIT License
2 stars 0 forks source link

Google Forms Data Extraction #29

Closed cansavvy closed 11 months ago

cansavvy commented 11 months ago

Purpose/implementation Section

What changes are being implemented in this Pull Request?

This is a set of functions that retrieve and get data from google forms.

Usage

Here's how these work. You can pass in a single URL or form id to a form and retrieve info:

authorize("google")
form_info <- get_google_form("https://docs.google.com/forms/d/1Z-lMMdUyubUqIvaSXeDu1tlB7_QpNTzOk3kfzjP2Uuo/edit")

### OR You can give it a direct form id
form_info <- get_google_form("1Z-lMMdUyubUqIvaSXeDu1tlB7_QpNTzOk3kfzjP2Uuo")

You can extract multiple forms using get_multiple_forms() function

authorize("google")
form_list <- googledrive::drive_find(shared_drive = googledrive::as_id("0AJb5Zemj0AAkUk9PVA"), type = "form")
 multiple_forms <- get_multiple_forms(form_ids = form_list$id)
cansavvy commented 11 months ago

get_google_form() may need to be examined as form_info$title contains NULL.

get_multiple_forms() looks good to me.

This is a more universal problem that I want to address for all these functions #32

I'm thinking the solution should be 1) Make a specialized data class type to handle these data as well as a 2) set of handler functions. But this will be a much bigger set of work than will be done in this PR.

cansavvy commented 11 months ago

I agree that these are issues but I think they will take more to address than is the scope of this PR. For ease of addressing this I'm going to merge this and move on.