Plotting data with d3.js and json – Brighton PHP October 2013

This is an example of a plot of the GA (google analytics) data stored in Json format. The data is plotted using d3.js. Have a look at the gallery. I do not think I have done d3js justice with my line charts.

PHP and Fast Fourier Transform – Brighton PHP October 2013

Using data from google analytics (GA) (see other posts) a Fast Fourier Transform is performed on the time series data. The absolute value is saved for plotting using d3.js

Connecting to Google Analytics – Brighton PHP October 2013

This post briefly covers connecting to Google Anayltics with a service account (Google Api Console).

In order to connect to a Google Analytic (GA) profile, the following are needed

  1. A GA profile ID – the one you want to report on
  2. A service account -email address, client ID and key (download file)
  3. Ensure email address from the service account is permitted to access the google analytics profile

Sample PHP code to get the number of visitors to a site (profile ID)

Once the GA client is set-up then the following code will return hourly GA data for the given profile.

Google Analytics – PHP and FFT – Brighton PHP October 2013 talk

The slides for the talk describe using PHP to access Google Analytics and present it in d3.js

Sample code at:

I am going to cover

Fourier Transforms and Time Series Data

I’m doing a talk at Big Data Brighton on April 25th. I will add the slides after but for now I’ll put up the matlab m file scripts. All at:

Slides for Time Series Data and FFT

This shows a single sinusoid and Fourier Transform
This is the example which takes several sinusoids, sums them and shows their Fourier Transforms

This is the filtering example