Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 205399

Store dataframe to Google Cloud Plateform (GCP) in R

$
0
0

I am learning programming in R language and want to learn storage basics. I have created an R script that gets data from Google Analytics API and stores it in a local dataframe (on my own computer) to be able to apply new treatments to data. Now I'm looking for the right way to store this data on Google Cloud Storage to be able to access this data when I want.

These are the steps I imagine :

THE FIRST TIME I RUN THE SCRIPT

  1. Get data from Google Analytics API and put it to a dataframe in R
  2. Save this dataframe in .csv format (my_df.csv)
  3. Send this csv to Google Cloud Storage

THE SECOND TIME (AND NEXTS) WHEN I WILL RUN THE SCRIPT

  1. Get my_df.csv from Google Cloud Storage
  2. Get data from Google Analytics API and put it to a dataframe in R (new_df.csv)
  3. Merge new_df.csv and my_df.csv
  4. Save this merged dataset as my_df.csv
  5. Send my_df.csv to Google Cloud Storage (this way, it will replace the my_df.csv current version)

Is there a better way to do this?

Thanks in advance for your advices!


Viewing all articles
Browse latest Browse all 205399

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>