Computing Google Analytics Metrics!
Project description
dscigametrics
dscigametrics
, or Data Science Google Analytics Metrics, is a python package that provides a set of ready-made functions that can help users with minimual coding skills easily digest and analyse advertising data obtained from Google Analytics. While Google Analytics allows users to easily download data as a csv file, the resulting spreadsheet is an intimidating and unituitive block of dense information. Instead of trying to analyse this in excel, users can instead load it into a python script as a pandas dataframe and let this package do the analysis work for them!
Fuctions in the package
compute_metrics
summarises general performance of campaign based on four metrics.stat_summary
summarises variance of campaign performance based on four metrics.daily_plot
visualises performance changes of campaign based on four metrics.find_campaigns
identifies the best and worst performing campaigns based on a selected metric.
Where this package fits in
The popularity and influence of Google Analytics means that there is already a decent number of related python packages, such as googleanalytics, which can be found here on PyPI. However the majority of these packages provide functionality that allows developers to interact with the Google Analytics API, which presupposes a fairly high level of technical skill. Our package is intended to help users with a novice familiarity with python by operating directly on downloaded GA data sets instead.
Installation
Since the package has not uploaded to PyPI, this is not feasible for now. Please see the developer installation instructions to install it.
$ pip install dscigametrics
Developer Installation Instruction
Step 1: Clone the Repository
git clone git@github.com:UBC-MDS/Group_9_GA_Metrics.git
cd Group_9_GA_Metrics # Navigate to the cloned repository directory
Step 2: Create and Activate the Conda Environment
$ conda env create -f environment.yml # Create Conda environment
$ conda activate ga_package # Activate the Conda environment
Step 3: Install the Package Using Poetry
Ensure the Conda environment is activated. You should see Group_9_GA_Metrics in the terminal prompt.
$ poetry install # Install the package using Poetry
Quick Start
Here is a basic example of how to use this package:
import dscigametrics
import pandas as pd
data = pd.read_csv('where/is/your/data/saved.csv')
campaign_id = 123851219
start_date = 20220801
end_date = 20220831
metrics_dictionary = compute_metrics(data, campaign_id, start_date, end_date)
summary = stat_summary(data, campaign_id, start_date, end_date)
plot = daily_plot(data, campaign_id, start_date, end_date, width=300, height=800)
campaign_ids = [219011657, 140569061, 215934049, 123851219]
metric = 'conversion_rate'
best_worst_campaigns = find_campaigns(
data=data,
start_date=start_date,
end_date=end_date,
campaign_ids=campaign_ids,
metric=metric
)
Online Documentation
Documentation for all functions in the package, as well as a demonstration notebook, can be found here on Read the Docs.
Main Contributors
Beth Ou-Yang, Ian MacCarthy, Yili Tang, Weilin Han
Contributing
Contributions are welcome and greatly appreciated! If you're interested in contributing to this project, take a look at the contributor guide.
License
dscigametrics
was created by DSCI524 Cohort8 Group9. It is licensed under the terms of the MIT license.
Credits
dscigametrics
was created with cookiecutter
and the py-pkgs-cookiecutter
template.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file dscigametrics-0.0.0.tar.gz
.
File metadata
- Download URL: dscigametrics-0.0.0.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6610909baa6f20b3e8443ef20affaa3fa38409617ef6376e47dea9d5fab7745c |
|
MD5 | ffbed383d13832d74bf36ebb3d1ca8d7 |
|
BLAKE2b-256 | 0a02a7884c642f12724d4c111318d0957e8ac5f1e4e59a70b0f5fdf802ab68e9 |
File details
Details for the file dscigametrics-0.0.0-py3-none-any.whl
.
File metadata
- Download URL: dscigametrics-0.0.0-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 705235beed5804f537a7e2e77ec7b87491a3c03bcee343dfdbec4acfc4209e8c |
|
MD5 | ac29f5550cad4f2af4540492eb8aff8d |
|
BLAKE2b-256 | eb20ae95201edf78c07c919d54ff9677deaf98add3bab5d1fe0246f503825ab4 |