Making a scatterplot in Data Studio

The following steps show how to make a scatterplot in Data Studio with the data from BigQuery:

  1. Update the original query by adding the transaction metric. In the edit screen of your report, click on the bar chart to bring up the chart options on the right-hand-side navigation. Click on the pencil icon next to the data source titled BigQuery to edit the data source.
  2. Click on the left-hand-side arrow icon titled Edit Connection:
  1. In the dialog titled Enter Custom Query, add this query:
SELECT trafficsource.medium as Medium, 
COUNT(visitId) as Visits,
SUM(totals.transactions) AS Transactions
FROM `google.com:analytics-bigquery.LondonCycleHelmet.ga_sessions_20130910`
GROUP BY Medium
  1. Click on the button titled Reconnect in order to reprocess the query. A prompt should emerge, asking whether you'd like to add a new field titled Transactions. Click on Apply.
  2. Click on Done.
  3. Once you return to the report edit screen, click on the Scatter Chart button () and use your mouse to draw a square in the report space:

The report should autoselect the two metrics you've created.

  1. Click on the chart to bring up the chart edit screen on the right-hand-side navigation; then click on the Style tab.
  1. Click on the dropdown under the Trendline option and select Linear to add a linear trend line, also known as linear regression line. The graph will default to blue, so use the pencil icon on the right to select red as the line color:


You'll then be left with a scatterplot showing the correlation of visits to transactions for each medium in the BigQuery query data, as well as a regression line.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.136.142