All Projects → y-bar → mmetrics

y-bar / mmetrics

Licence: other
Easy computation of Marketing Metrics in R

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to mmetrics

ecommercetools
EcommerceTools is a Python data science toolkit for ecommerce, marketing science, and technical SEO analysis and modelling and was created by Matt Clarke.
Stars: ✭ 41 (+57.69%)
Mutual labels:  marketing, marketing-tools, marketing-analytics
django-segments
A segmentation engine for Django user models
Stars: ✭ 24 (-7.69%)
Mutual labels:  marketing-tools, marketing-analytics
Facebook-Auto-Pilot
Automate common Facebook activities such as posting to groups and pages walls. Effortlessly post to multiple groups or pages.
Stars: ✭ 126 (+384.62%)
Mutual labels:  marketing, marketing-tools
Hello Bar
👋 Greet your visitors with a hello bar
Stars: ✭ 57 (+119.23%)
Mutual labels:  marketing
Spam Bot 3000
Social media research and promotion, semi-autonomous CLI bot
Stars: ✭ 79 (+203.85%)
Mutual labels:  marketing
Jquery.fbmessenger
Fake Facebook Messenger interactions on an iPhone with a simple jQuery plugin!
Stars: ✭ 130 (+400%)
Mutual labels:  marketing
Matomo
Liberating Web Analytics. Star us on Github? +1. Matomo is the leading open alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. We love Pull Requests!
Stars: ✭ 15,711 (+60326.92%)
Mutual labels:  marketing
Awesome Mautic
Curated List of Mautic Plugins, Blogs, Repositories and Themes
Stars: ✭ 38 (+46.15%)
Mutual labels:  marketing
Marketing For Engineers
A curated collection of marketing articles & tools to grow your product.
Stars: ✭ 11,856 (+45500%)
Mutual labels:  marketing
Truvisory
This project is meant to provide resources to users who want to access good LinkedIn posts which contains resources to learn any Technology, Design, Self-Branding, Motivation etc. You can visit project by:
Stars: ✭ 116 (+346.15%)
Mutual labels:  marketing
Gatsby Starter Saas Marketing
☁️ A simple one page marketing site starter for SaaS companies and indie hackers
Stars: ✭ 103 (+296.15%)
Mutual labels:  marketing
Machinery Industry Press
本项目预计分享数千册电子书,98%以上为机械工业出版社原版电子书,其余为其它出版社出版的一些经典外文读物的原版译本电子书,每本书都配有当当网一键搜索,可查看书价格和简介。目前共计更新2542册图书
Stars: ✭ 85 (+226.92%)
Mutual labels:  marketing
Erxes
Free and open fair-code licensed all-in-one growth marketing & management software
Stars: ✭ 1,988 (+7546.15%)
Mutual labels:  marketing
Animockup
Create animated mockups in the browser 🔥
Stars: ✭ 1,152 (+4330.77%)
Mutual labels:  marketing
Awesome Startup Tools List
List of all tools (apps, services) that startups should use.
Stars: ✭ 188 (+623.08%)
Mutual labels:  marketing
Flowy
The minimal javascript library to create flowcharts ✨
Stars: ✭ 8,636 (+33115.38%)
Mutual labels:  marketing
Awesome Bootstrappers
👩‍🚀👨‍🚀 Must-read articles, videos and books for coders, marketers and bootstrappers.
Stars: ✭ 143 (+450%)
Mutual labels:  marketing
React Static
⚛️ 🚀 A progressive static site generator for React.
Stars: ✭ 9,946 (+38153.85%)
Mutual labels:  marketing
Landscapeapp
🌄Upstream landscape generation application
Stars: ✭ 96 (+269.23%)
Mutual labels:  marketing
Footprints
🐾 A simple registration attribution tracking solution for Laravel (UTM Parameters and Referrers)
Stars: ✭ 127 (+388.46%)
Mutual labels:  marketing

mmetrics

Travis-CI Build Status Build status CRAN_Status_Badge codecov Licence Lifecycle: experimental

Easy Computation of Marketing Metrics with Different Analysis Axis.

Installation

You can install the released version of {mmetrics} from CRAN with:

install.packages("mmetrics")

Or install the development version from github with:

# install.packages("remotes")
remotes::install_github("y-bar/mmetrics")

Example

Load Dummy data

First, we load dummy data from {mmetrics} package for this example.

df <- mmetrics::dummy_data
df
#>    gender age cost impression click conversion
#> 1       M  10   51        101     0          0
#> 2       F  20   52        102     3          1
#> 3       M  30   53        103     6          2
#> 4       F  40   54        104     9          3
#> 5       M  50   55        105    12          4
#> 6       F  60   56        106    15          5
#> 7       M  70   57        107    18          6
#> 8       F  80   58        108    21          7
#> 9       M  90   59        109    24          8
#> 10      F 100   60        110    27          9

Define metrics

As a next step, we define metrics to evaluate using mmetrics::define.

# Example metrics
metrics <- mmetrics::define(
  cost = sum(cost),
  ctr  = sum(click)/sum(impression) # CTR, Click Through Rate 
)

Just call mmetrics::add() !

Call mmetrics::add() with grouping key (here gender) then we will get new data.frame with defined metrics.

mmetrics::add(df, gender, metrics = metrics)
#> # A tibble: 2 x 3
#>   gender  cost   ctr
#>   <fct>  <int> <dbl>
#> 1 F        280 0.142
#> 2 M        275 0.114

Remove aggregate function from metrics using mmetrics::disaggregate()

It is hassle for users to re-define metrics when you would like to use these for dplyr::mutate(). In this case, you can use mmetrics::disaggregate() to remove the first aggregation function for the argument and return disaggregated metrics.

# Original metrics. sum() is used for this metrics
metrics
#> <list_of<quosure>>
#> 
#> $cost
#> <quosure>
#> expr: ^sum(cost)
#> env:  global
#> 
#> $ctr
#> <quosure>
#> expr: ^sum(click) / sum(impression)
#> env:  global
# Disaggregate metrics!
metrics_disaggregated <- mmetrics::disaggregate(metrics)
# Woo! sum() are removed!!!
metrics_disaggregated
#> $cost
#> <quosure>
#> expr: ^cost
#> env:  global
#> 
#> $ctr
#> <quosure>
#> expr: ^click / impression
#> env:  global

You can use these metrics with dplyr::mutate() for row-wise metrics computation.

dplyr::mutate(df, !!!metrics_disaggregated)
#>    gender age cost impression click conversion        ctr
#> 1       M  10   51        101     0          0 0.00000000
#> 2       F  20   52        102     3          1 0.02941176
#> 3       M  30   53        103     6          2 0.05825243
#> 4       F  40   54        104     9          3 0.08653846
#> 5       M  50   55        105    12          4 0.11428571
#> 6       F  60   56        106    15          5 0.14150943
#> 7       M  70   57        107    18          6 0.16822430
#> 8       F  80   58        108    21          7 0.19444444
#> 9       M  90   59        109    24          8 0.22018349
#> 10      F 100   60        110    27          9 0.24545455

…or, you can do the same compucation using mmetrics::gmutate() defind in our package. In this case, you do not need to write !!! (bang-bang-bang) operator explicitly.

mmetrics::gmutate(df, metrics = metrics_disaggregated)
#> # A tibble: 10 x 7
#>    gender   age  cost impression click conversion    ctr
#>    <fct>  <dbl> <int>      <int> <dbl>      <int>  <dbl>
#>  1 M         10    51        101     0          0 0     
#>  2 F         20    52        102     3          1 0.0294
#>  3 M         30    53        103     6          2 0.0583
#>  4 F         40    54        104     9          3 0.0865
#>  5 M         50    55        105    12          4 0.114 
#>  6 F         60    56        106    15          5 0.142 
#>  7 M         70    57        107    18          6 0.168 
#>  8 F         80    58        108    21          7 0.194 
#>  9 M         90    59        109    24          8 0.220 
#> 10 F        100    60        110    27          9 0.245

More examples

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].