Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API List 2 DF: Part 1 - Google Analytics #16

Merged
merged 10 commits into from
Nov 21, 2023
Merged

API List 2 DF: Part 1 - Google Analytics #16

merged 10 commits into from
Nov 21, 2023

Conversation

cansavvy
Copy link
Collaborator

@cansavvy cansavvy commented Nov 16, 2023

Purpose/implementation Section

What changes are being implemented in this Pull Request?

#13 First stop on the road for data to be turned into nice data frames. There will be a series of these types of PRs where I'm trying to make custom functions that turn our API lists into nice dataframes for easy use!

What was your approach?

Made custom functions that pull out the relevant data and put it into a nice data frame format!

Now all_ga_metrics() function that I developed in #11 has an argument that by default is set to "dataframe" which means we attempt to convert the gnarly API list into a nice data.frame. However, if someone wanted the original result they could just change this to "raw".

@cansavvy cansavvy changed the title Google Analytics data wrangling to nice data frame API List 2 DF: Part 1 - Google Analytics Nov 16, 2023
Base automatically changed from cansavvy/google-analytics to main November 19, 2023 19:51
@cansavvy cansavvy marked this pull request as ready for review November 20, 2023 01:06
@cansavvy
Copy link
Collaborator Author

cansavvy commented Nov 20, 2023

@howardbaek This is ready for your review. And if it runs okay for you then the output data for ITCR account for the all_ga_metrics() function is what you will want to start to build the dashboard based on.

Hopefully writing it flexibly enough that the other data sources will be able to be added to it later.

cansavvy added a commit that referenced this pull request Nov 20, 2023
@cansavvy
Copy link
Collaborator Author

@howardbaek can you test if the following works for you on this branch?

authorize("google")

#LOGIN WITH [email protected]

stats_list <- all_ga_metrics(account_id = 209776907)

@howardbaik
Copy link
Contributor

howardbaik commented Nov 21, 2023

stats_list <- all_ga_metrics(account_id = 209776907)

I ran this line of code and got a list of length 3: metrics, dimensions, and link_clicks.

@cansavvy
Copy link
Collaborator Author

stats_list <- all_ga_metrics(account_id = 209776907)

I ran this line of code and got a list of length 3: metrics, dimensions, and link_clicks.

Perfect. That is what we expect.

@cansavvy cansavvy merged commit eeec926 into main Nov 21, 2023
5 checks passed
@cansavvy cansavvy deleted the cansavvy/list-2-df branch November 21, 2023 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants