Skip to content

Instantly share code, notes, and snippets.

@CleverProgrammer
Last active July 17, 2016 22:14
Show Gist options
  • Save CleverProgrammer/bca9741853302ae75e1b to your computer and use it in GitHub Desktop.
Save CleverProgrammer/bca9741853302ae75e1b to your computer and use it in GitHub Desktop.
Galvanize Technical Assessment: Rafeh Qazi
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 106,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"application/javascript": [
"IPython.notebook.set_autosave_interval(120000)"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Autosaving every 120 seconds\n"
]
}
],
"source": [
"%autosave 120\n",
"import pandas as pd\n",
"import numpy as np\n",
"\n",
"# For visualization\n",
"import seaborn as sns\n",
"import matplotlib.pyplot as plt\n",
"%matplotlib inline\n",
"\n",
"galvanizeData = pd.read_csv('downloads/galvanizeData.csv')"
]
},
{
"cell_type": "code",
"execution_count": 90,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Buckets</th>\n",
" <th>Quotes</th>\n",
" <th>Views</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>Baseline</td>\n",
" <td>32</td>\n",
" <td>595</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>Variation 1</td>\n",
" <td>30</td>\n",
" <td>599</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>Variation 2</td>\n",
" <td>18</td>\n",
" <td>622</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>Variation 3</td>\n",
" <td>51</td>\n",
" <td>606</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>Variation 4</td>\n",
" <td>38</td>\n",
" <td>578</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Buckets Quotes Views\n",
"0 Baseline 32 595\n",
"1 Variation 1 30 599\n",
"2 Variation 2 18 622\n",
"3 Variation 3 51 606\n",
"4 Variation 4 38 578"
]
},
"execution_count": 90,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"galvanizeData.head()"
]
},
{
"cell_type": "code",
"execution_count": 91,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"5.378151260504202\n",
"5.008347245409015\n",
"2.8938906752411575\n",
"8.415841584158416\n",
"6.5743944636678195\n"
]
}
],
"source": [
"print ((32/595) * 100)\n",
"print ((30/599) * 100)\n",
"print ((18/622) * 100)\n",
"print ((51/606) * 100)\n",
"print ((38/578) * 100)\n"
]
},
{
"cell_type": "code",
"execution_count": 92,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Buckets</th>\n",
" <th>Quotes</th>\n",
" <th>Views</th>\n",
" <th>Conversion Rates</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>Baseline</td>\n",
" <td>32</td>\n",
" <td>595</td>\n",
" <td>5.378151</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>Variation 1</td>\n",
" <td>30</td>\n",
" <td>599</td>\n",
" <td>5.008347</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>Variation 2</td>\n",
" <td>18</td>\n",
" <td>622</td>\n",
" <td>2.893891</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>Variation 3</td>\n",
" <td>51</td>\n",
" <td>606</td>\n",
" <td>8.415842</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>Variation 4</td>\n",
" <td>38</td>\n",
" <td>578</td>\n",
" <td>6.574394</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Buckets Quotes Views Conversion Rates\n",
"0 Baseline 32 595 5.378151\n",
"1 Variation 1 30 599 5.008347\n",
"2 Variation 2 18 622 2.893891\n",
"3 Variation 3 51 606 8.415842\n",
"4 Variation 4 38 578 6.574394"
]
},
"execution_count": 92,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"galvanizeData['Conversion Rates'] = (galvanizeData['Quotes']/galvanizeData['Views']) * 100\n",
"galvanizeData.head()"
]
},
{
"cell_type": "code",
"execution_count": 93,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Buckets</th>\n",
" <th>Quotes</th>\n",
" <th>Views</th>\n",
" <th>Conversion Rates</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>Variation 2</td>\n",
" <td>18</td>\n",
" <td>622</td>\n",
" <td>2.893891</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>Variation 1</td>\n",
" <td>30</td>\n",
" <td>599</td>\n",
" <td>5.008347</td>\n",
" </tr>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>Baseline</td>\n",
" <td>32</td>\n",
" <td>595</td>\n",
" <td>5.378151</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>Variation 4</td>\n",
" <td>38</td>\n",
" <td>578</td>\n",
" <td>6.574394</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>Variation 3</td>\n",
" <td>51</td>\n",
" <td>606</td>\n",
" <td>8.415842</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Buckets Quotes Views Conversion Rates\n",
"2 Variation 2 18 622 2.893891\n",
"1 Variation 1 30 599 5.008347\n",
"0 Baseline 32 595 5.378151\n",
"4 Variation 4 38 578 6.574394\n",
"3 Variation 3 51 606 8.415842"
]
},
"execution_count": 93,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"galvanizeData.sort(columns='Conversion Rates')"
]
},
{
"cell_type": "code",
"execution_count": 100,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x10bc10da0>"
]
},
"execution_count": 100,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXgAAAERCAYAAABxZrw0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGvlJREFUeJzt3XmYXGWZ/vFvkiZg0iHTDc1qiBDgZsQFBEEZBxK2QQVZ\nRB1kV4H85PrBoDMouzKIjCgKwkBkEwVBUQyQcUCRVWFwBAUFfMAwhB7WDl2SNCGGJD1/nNN0E7qr\nTy2nquvk/lxXrnSdOstTb6rvevPWOe8Z19/fj5mZFc/4ZhdgZmb5cMCbmRWUA97MrKAc8GZmBeWA\nNzMrKAe8mVlBteW1Y0kTgcuAzYHXgOMi4qG8jmdmZm+UZw/+KGBJROyU/nxFjscyM7NV5Bnwbwdu\nAYiIx4GNJa2d4/HMzGyIPAP+98DeAJLeB3QBk3M8npmZDZFnwF8BLJJ0D7Af8DjQm+PxzMxsiNy+\nZAV2AG6PiM9J2h7YISL+OtLKy5ev6G9rm5BjOWZmhTRupCfyDPgAfijpZGApyRetIyqVluRYiplZ\nMXV1TRnxuXFjZTbJnp7FY6MQM7MW0tU1ZcQevC90MjMrKAe8mVlBOeDNzArKAW9mVlAOeDOzgnLA\nm5kVlAPezKygHPBmZgXlgDczKygHvJlZQeU5F42ZWUMtW7aM7u4FzS6j7qZNm87EiRMr3s4Bb2aF\n0d29gF/9/Dw2XL+j2aXUzXMvlPjAnp9jxowtKt7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A09IOjjd9+7pc5BM9dqWLr+XZBri84FvkcxJ\nb9YQHqKxIusnHYNPH08G7gfOIZki9tuSziC50cRAr/sQ4GJJ5wI9wKEkN3EYeP5fgEfSmz8cDFwi\n6USSL1c/nq5zN8nUr8+T3OHnu5KWk3wROzuvF2u2Kk8XbGZWUB6iMTMrKAe8mVlBOeDNzArKAW9m\nVlAOeDOzgnLAm5kVlAPezKygHPBmZgX1f/pBnQyhJKQZAAAAAElFTkSuQmCC\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x10bd8e208>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"sns.barplot(x = 'Buckets', y = 'Conversion Rates', data=galvanizeData.sort(columns='Conversion Rates'))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"I would ask you how did you control for time (time of day, which weekday, etc), and did you account for the fact that maybe the companies were just more desperate due to some lurking/extraneous factor? Since the goal is to have a variation which outputs the highest conversion rate, here are the analysis of my results: version 3 is the best, version 4 is second, baseline is third, version 1 is fourth, and version 2 is the worst.\n",
"\n",
"If I were to run it again, I would consider removing variations that offered a conversion rate below the baseline, so leaving us with baseline, variation 3, and variation 4. Baseline and version 1 have very close results so I would run some more tests with that because as of now it is not easy to tell. \n",
"\n",
"\n",
"## Potential problems with collecting data from forms\n",
"- The result might have to do with the time of day. \n",
"- The day might matter as well\n",
"- Maybe they just needed it as an emergency\n",
"\n",
"## Possible suggestions for improvement\n",
"- Controlling for time (time of day, weekday vs weekend)\n",
"- Obtain data on similar days (ex: Every Saturday)\n",
"\n",
"## Potential Lurking Factors\n",
"- Internet disconnection being disabled while filling out a quote\n",
"- Website acting glitchy at moments of quote purchasing"
]
},
{
"cell_type": "code",
"execution_count": 107,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"# Program for python text content analyzer\n",
"\n",
"# Requirements\n",
"# 1. total word count\n",
"# 2. total unique word count\n",
"# 3. total sentence count\n",
"\n",
"# Brownie Points\n",
"# 1. The ability to find often used phrases (a phrase of 3 or more words used over 3 times)\n",
"\n",
"#f = open('downloads/workfile.txt', 'r')\n",
"\n",
"def text_content_analyzer(f):\n",
" words = []\n",
" nbOfSentences = 0\n",
" punctuation = []\n",
" wordsCount = {}\n",
"\n",
" for line in f:\n",
" nbOfSentences += len(re.split(r'[.!?]+', line.strip()))-1\n",
" lineWords = line.split()\n",
"\n",
" words = words + lineWords\n",
" for word in lineWords:\n",
" if word in wordsCount:\n",
" wordsCount[word] += 1\n",
" else:\n",
" wordsCount[word] = 1\n",
" \n",
" print(\"Total word count: %1.0f\" %len(words))\n",
" print(wordsCount)\n",
" print(\"Unique words: \" , len(wordsCount.keys()))\n",
" print(nbOfSentences)\n",
" return len(words), wordsCount, len(wordsCount.keys()), nbOfSentences\n",
"\n",
"#text_content_analyzer(f)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.4.3"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment