From the course: Data Science on Google Cloud Platform: Exploratory Data Analytics

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Time series analysis with Cloud Storage

Time series analysis with Cloud Storage - Google Cloud Tutorial

From the course: Data Science on Google Cloud Platform: Exploratory Data Analytics

Start my 1-month free trial

Time series analysis with Cloud Storage

- [Instructor] Let's take a look at how we can use data from cloud storage objects to create a TimeSeries chart with a charting API. First, we need to read data from cloud storage into a Python variable. We have already loaded the campaign_data.csv file that comes with the exercise into cloud storage under the exercise-lil bucket under the data data tree. We read that object into a variable called campaign_data. Even though the source data is a CSV file, it is read as one large string into the campaign_data variable. We need to convert this into a Pandas DataFrame before it can be used for charting. We read the string data into a Pandas DataFrame using the CSV reader. Then we perform aggregations. We group the data by OFFER_DATE and find the sum of conversations by OFFER_DATE. We then print the summary data to verify its accuracy. We also need to convert OFFER_DATE into a date data type since the charting API requires date variable for drawing the TimeSeries chart. Finally, we call…

Contents