{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Problem Statement\n", "We asked local Arizona Non-profit Organizations (NPOs) to tell us their most significant problems. The challenge is to match each NPO with their biggest problem, but also distribute NPOs over each problem statement.\n", "\n", "We hope you enjoy the following solution and we welcome any suggestions for next time!\n", "\n", "For more info on Opportunity Hack, please see [opportunity-hack.org](http://opportunity-hack.org)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Results\n", "If you don't want to read through our code, here's what we came up with.\n", "\n", "" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import pandas as pd\n", "import numpy as np\n", "from plotly import __version__\n", "from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot\n", "import collections\n", "import numpy as np\n", "\n", "\n", "import cufflinks as cf\n", "cf.set_config_file(theme='ggplot')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Data Summary\n", "Let's look at the raw data" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
TimestampName of your non-profit or government agencyWhich of these problems does your company face? [Recruiting volunteers]Which of these problems does your company face? [Communication to volunteers]Which of these problems does your company face? [Registration, sign-in, and sign-up forms]Which of these problems does your company face? [Keeping track of a person’s progress]Which of these problems does your company face? [Data analysis]Which of these problems does your company face? [Sending customized emails]Which of these problems does your company face? [Inventory management system]Which of these problems does your company face? [Website or social media marketing]Which of these problems does your company face? [Location finder]Which of these problems does your company face? [Storing data on people]Which of these problems does your company face? [Storing data on animals]Which of these problems does your company face? [Government compliance documentation]Other problems not listed above
03/9/18 8:14CO+HOOTS Foundation1 - Not a problem for us2 - Need help with this2 - Need help with this1 - Not a problem for us1 - Not a problem for us2 - Need help with this1 - Not a problem for us2 - Need help with this3 - A big problem for us2 - Need help with this1 - Not a problem for us1 - Not a problem for usKeeping track of and acknowledging donations
13/9/18 9:39Be A Leader Foundation1 - Not a problem for us2 - Need help with this1 - Not a problem for us2 - Need help with this1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us3 - A big problem for us1 - Not a problem for us3 - A big problem for us1 - Not a problem for us1 - Not a problem for usNaN
23/9/18 20:21Never Again Foundation3 - A big problem for us3 - A big problem for us3 - A big problem for us3 - A big problem for us3 - A big problem for us3 - A big problem for us3 - A big problem for us3 - A big problem for us2 - Need help with this3 - A big problem for us1 - Not a problem for us3 - A big problem for usNaN
33/12/18 20:22Unlimited Potential2 - Need help with this3 - A big problem for us3 - A big problem for us2 - Need help with this3 - A big problem for us3 - A big problem for us1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us2 - Need help with this1 - Not a problem for us2 - Need help with thisNaN
43/13/18 11:01Tempe Community Action Agency1 - Not a problem for us2 - Need help with this3 - A big problem for us3 - A big problem for us3 - A big problem for us1 - Not a problem for us1 - Not a problem for us3 - A big problem for us1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us1 - Not a problem for usOver 19,000 individuals served by TCAA's five ...
53/18/18 14:48Swift youth foundation1 - Not a problem for us2 - Need help with this2 - Need help with this2 - Need help with this3 - A big problem for us1 - Not a problem for us3 - A big problem for us2 - Need help with this1 - Not a problem for us2 - Need help with this1 - Not a problem for us1 - Not a problem for usIn depth volunteer scheduling
63/20/18 10:42Newtown CDC1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us2 - Need help with this2 - Need help with this1 - Not a problem for us1 - Not a problem for us3 - A big problem for us1 - Not a problem for us2 - Need help with this1 - Not a problem for us2 - Need help with thisNaN
73/21/18 22:42Children's Cancer Network1 - Not a problem for us2 - Need help with this3 - A big problem for us2 - Need help with this2 - Need help with this3 - A big problem for us1 - Not a problem for us2 - Need help with this1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us1 - Not a problem for usRegistration platform with customized fundrais...
83/26/18 21:13Tranquility Trail Animal Sanctuary1 - Not a problem for us2 - Need help with this3 - A big problem for us3 - A big problem for us2 - Need help with this2 - Need help with this1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us3 - A big problem for us1 - Not a problem for us1 - Not a problem for usVolunteer Data Management
93/27/18 8:11Matthew's Crossing Food Bank2 - Need help with this2 - Need help with this2 - Need help with this1 - Not a problem for us3 - A big problem for us2 - Need help with this3 - A big problem for us2 - Need help with this1 - Not a problem for us2 - Need help with this1 - Not a problem for us2 - Need help with thisNaN
103/27/18 11:39RESCUE2 - Need help with this1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us3 - A big problem for us1 - Not a problem for us2 - Need help with this1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us1 - Not a problem for ushaving general, ongoing IT person for a small ...
113/27/18 14:29Neurologic Music Therapy Services of Arizona1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us3 - A big problem for us2 - Need help with this2 - Need help with this1 - Not a problem for us3 - A big problem for us1 - Not a problem for us2 - Need help with this1 - Not a problem for us3 - A big problem for usNaN
123/27/18 12:47Sharing Down Syndrome Arizona2 - Need help with this2 - Need help with this3 - A big problem for us2 - Need help with this2 - Need help with this1 - Not a problem for us2 - Need help with this1 - Not a problem for us2 - Need help with this2 - Need help with this1 - Not a problem for us1 - Not a problem for usNaN
133/27/18 22:26Impact One Breast Cancer Foundation1 - Not a problem for us1 - Not a problem for us2 - Need help with this2 - Need help with this3 - A big problem for us3 - A big problem for us2 - Need help with this3 - A big problem for us2 - Need help with this3 - A big problem for us1 - Not a problem for us1 - Not a problem for usNaN
143/28/18 17:46RealTimeSTEAM1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us2 - Need help with this3 - A big problem for us3 - A big problem for us1 - Not a problem for us2 - Need help with this1 - Not a problem for us2 - Need help with this1 - Not a problem for us2 - Need help with thisNaN
155/6/18 11:43Swift youth foundation1 - Not a problem for us2 - Need help with this1 - Not a problem for us2 - Need help with this3 - A big problem for us1 - Not a problem for us3 - A big problem for us2 - Need help with this1 - Not a problem for us2 - Need help with this1 - Not a problem for us1 - Not a problem for usIntricate daily Volunteer scheduling
166/28/18 22:40Arizona Council on Economic Education1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us1 - Not a problem for usWe used to have two issues: registration/sign ...
176/29/18 4:46Arizonans for Children2 - Need help with this1 - Not a problem for us2 - Need help with this1 - Not a problem for us1 - Not a problem for us2 - Need help with this2 - Need help with this1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us1 - Not a problem for usNaN
187/1/18 9:15Cece’s Hope Center2 - Need help with this2 - Need help with this2 - Need help with this2 - Need help with this2 - Need help with this2 - Need help with this2 - Need help with this2 - Need help with this2 - Need help with this2 - Need help with this3 - A big problem for us2 - Need help with thisTracking board member and volunteer connections
197/3/18 17:23Neurologic Music Therapy Services of Arizona2 - Need help with this2 - Need help with this2 - Need help with this3 - A big problem for us3 - A big problem for us1 - Not a problem for us1 - Not a problem for us3 - A big problem for us1 - Not a problem for us3 - A big problem for us1 - Not a problem for us3 - A big problem for uselectronic documentation system
207/5/18 17:11Tranquility Trail Animal Sanctuary1 - Not a problem for us2 - Need help with this3 - A big problem for us3 - A big problem for us3 - A big problem for us2 - Need help with this1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us3 - A big problem for us1 - Not a problem for us1 - Not a problem for usNaN
217/9/18 15:58Lost Our Home Pet Rescue1 - Not a problem for us2 - Need help with this1 - Not a problem for us1 - Not a problem for us3 - A big problem for us2 - Need help with this2 - Need help with this2 - Need help with this1 - Not a problem for us2 - Need help with this2 - Need help with this1 - Not a problem for usLooking for a way to quickly disseminate infor...
227/11/18 10:39Matthew's Crossing Food Bank1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us2 - Need help with this1 - Not a problem for us2 - Need help with this1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us2 - Need help with thisour biggest problem is data systems that don't...
238/2/18 15:19Dog Rescue & Community Project Accelerator3 - A big problem for us3 - A big problem for us1 - Not a problem for us3 - A big problem for us2 - Need help with this3 - A big problem for us3 - A big problem for us3 - A big problem for us1 - Not a problem for us3 - A big problem for us3 - A big problem for us1 - Not a problem for usWe need help solving a very big problem that w...
248/2/18 16:48Pan de Vida Foundation2 - Need help with this3 - A big problem for us2 - Need help with this3 - A big problem for us3 - A big problem for us3 - A big problem for us3 - A big problem for us3 - A big problem for us2 - Need help with this3 - A big problem for us1 - Not a problem for us3 - A big problem for uson line grant writing help.
258/2/18 18:53LETI Foundation3 - A big problem for us3 - A big problem for us3 - A big problem for us3 - A big problem for us3 - A big problem for us3 - A big problem for us3 - A big problem for us3 - A big problem for us1 - Not a problem for us3 - A big problem for us1 - Not a problem for us1 - Not a problem for usI would like a way for families to register th...
268/3/18 6:45Animals (and Humans) in Disaster, Inc (state...2 - Need help with this2 - Need help with this2 - Need help with this3 - A big problem for us3 - A big problem for us1 - Not a problem for us3 - A big problem for us2 - Need help with this2 - Need help with this2 - Need help with this2 - Need help with this2 - Need help with thisa huge problem is a place to keep track of a...
278/3/18 10:24Paz de Cristo Community Center1 - Not a problem for us2 - Need help with this1 - Not a problem for us1 - Not a problem for us2 - Need help with this2 - Need help with this3 - A big problem for us3 - A big problem for us1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us1 - Not a problem for usNaN
288/27/18 11:57House of Refuge1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us2 - Need help with this1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us1 - Not a problem for usNaN
298/30/18 13:27ICM Food & Clothing Bank2 - Need help with this3 - A big problem for us3 - A big problem for us3 - A big problem for us3 - A big problem for us2 - Need help with this2 - Need help with this2 - Need help with this1 - Not a problem for us3 - A big problem for us1 - Not a problem for us2 - Need help with thisNaN
\n", "
" ], "text/plain": [ " Timestamp Name of your non-profit or government agency \\\n", "0 3/9/18 8:14 CO+HOOTS Foundation \n", "1 3/9/18 9:39 Be A Leader Foundation \n", "2 3/9/18 20:21 Never Again Foundation \n", "3 3/12/18 20:22 Unlimited Potential \n", "4 3/13/18 11:01 Tempe Community Action Agency \n", "5 3/18/18 14:48 Swift youth foundation \n", "6 3/20/18 10:42 Newtown CDC \n", "7 3/21/18 22:42 Children's Cancer Network \n", "8 3/26/18 21:13 Tranquility Trail Animal Sanctuary \n", "9 3/27/18 8:11 Matthew's Crossing Food Bank \n", "10 3/27/18 11:39 RESCUE \n", "11 3/27/18 14:29 Neurologic Music Therapy Services of Arizona \n", "12 3/27/18 12:47 Sharing Down Syndrome Arizona \n", "13 3/27/18 22:26 Impact One Breast Cancer Foundation \n", "14 3/28/18 17:46 RealTimeSTEAM \n", "15 5/6/18 11:43 Swift youth foundation \n", "16 6/28/18 22:40 Arizona Council on Economic Education \n", "17 6/29/18 4:46 Arizonans for Children \n", "18 7/1/18 9:15 Cece’s Hope Center \n", "19 7/3/18 17:23 Neurologic Music Therapy Services of Arizona \n", "20 7/5/18 17:11 Tranquility Trail Animal Sanctuary \n", "21 7/9/18 15:58 Lost Our Home Pet Rescue \n", "22 7/11/18 10:39 Matthew's Crossing Food Bank \n", "23 8/2/18 15:19 Dog Rescue & Community Project Accelerator \n", "24 8/2/18 16:48 Pan de Vida Foundation \n", "25 8/2/18 18:53 LETI Foundation \n", "26 8/3/18 6:45 Animals (and Humans) in Disaster, Inc (state... \n", "27 8/3/18 10:24 Paz de Cristo Community Center \n", "28 8/27/18 11:57 House of Refuge \n", "29 8/30/18 13:27 ICM Food & Clothing Bank \n", "\n", " Which of these problems does your company face? [Recruiting volunteers] \\\n", "0 1 - Not a problem for us \n", "1 1 - Not a problem for us \n", "2 3 - A big problem for us \n", "3 2 - Need help with this \n", "4 1 - Not a problem for us \n", "5 1 - Not a problem for us \n", "6 1 - Not a problem for us \n", "7 1 - Not a problem for us \n", "8 1 - Not a problem for us \n", "9 2 - Need help with this \n", "10 2 - Need help with this \n", "11 1 - Not a problem for us \n", "12 2 - Need help with this \n", "13 1 - Not a problem for us \n", "14 1 - Not a problem for us \n", "15 1 - Not a problem for us \n", "16 1 - Not a problem for us \n", "17 2 - Need help with this \n", "18 2 - Need help with this \n", "19 2 - Need help with this \n", "20 1 - Not a problem for us \n", "21 1 - Not a problem for us \n", "22 1 - Not a problem for us \n", "23 3 - A big problem for us \n", "24 2 - Need help with this \n", "25 3 - A big problem for us \n", "26 2 - Need help with this \n", "27 1 - Not a problem for us \n", "28 1 - Not a problem for us \n", "29 2 - Need help with this \n", "\n", " Which of these problems does your company face? [Communication to volunteers] \\\n", "0 2 - Need help with this \n", "1 2 - Need help with this \n", "2 3 - A big problem for us \n", "3 3 - A big problem for us \n", "4 2 - Need help with this \n", "5 2 - Need help with this \n", "6 1 - Not a problem for us \n", "7 2 - Need help with this \n", "8 2 - Need help with this \n", "9 2 - Need help with this \n", "10 1 - Not a problem for us \n", "11 1 - Not a problem for us \n", "12 2 - Need help with this \n", "13 1 - Not a problem for us \n", "14 1 - Not a problem for us \n", "15 2 - Need help with this \n", "16 1 - Not a problem for us \n", "17 1 - Not a problem for us \n", "18 2 - Need help with this \n", "19 2 - Need help with this \n", "20 2 - Need help with this \n", "21 2 - Need help with this \n", "22 1 - Not a problem for us \n", "23 3 - A big problem for us \n", "24 3 - A big problem for us \n", "25 3 - A big problem for us \n", "26 2 - Need help with this \n", "27 2 - Need help with this \n", "28 1 - Not a problem for us \n", "29 3 - A big problem for us \n", "\n", " Which of these problems does your company face? [Registration, sign-in, and sign-up forms] \\\n", "0 2 - Need help with this \n", "1 1 - Not a problem for us \n", "2 3 - A big problem for us \n", "3 3 - A big problem for us \n", "4 3 - A big problem for us \n", "5 2 - Need help with this \n", "6 1 - Not a problem for us \n", "7 3 - A big problem for us \n", "8 3 - A big problem for us \n", "9 2 - Need help with this \n", "10 1 - Not a problem for us \n", "11 1 - Not a problem for us \n", "12 3 - A big problem for us \n", "13 2 - Need help with this \n", "14 1 - Not a problem for us \n", "15 1 - Not a problem for us \n", "16 1 - Not a problem for us \n", "17 2 - Need help with this \n", "18 2 - Need help with this \n", "19 2 - Need help with this \n", "20 3 - A big problem for us \n", "21 1 - Not a problem for us \n", "22 1 - Not a problem for us \n", "23 1 - Not a problem for us \n", "24 2 - Need help with this \n", "25 3 - A big problem for us \n", "26 2 - Need help with this \n", "27 1 - Not a problem for us \n", "28 1 - Not a problem for us \n", "29 3 - A big problem for us \n", "\n", " Which of these problems does your company face? [Keeping track of a person’s progress] \\\n", "0 1 - Not a problem for us \n", "1 2 - Need help with this \n", "2 3 - A big problem for us \n", "3 2 - Need help with this \n", "4 3 - A big problem for us \n", "5 2 - Need help with this \n", "6 2 - Need help with this \n", "7 2 - Need help with this \n", "8 3 - A big problem for us \n", "9 1 - Not a problem for us \n", "10 1 - Not a problem for us \n", "11 3 - A big problem for us \n", "12 2 - Need help with this \n", "13 2 - Need help with this \n", "14 2 - Need help with this \n", "15 2 - Need help with this \n", "16 1 - Not a problem for us \n", "17 1 - Not a problem for us \n", "18 2 - Need help with this \n", "19 3 - A big problem for us \n", "20 3 - A big problem for us \n", "21 1 - Not a problem for us \n", "22 1 - Not a problem for us \n", "23 3 - A big problem for us \n", "24 3 - A big problem for us \n", "25 3 - A big problem for us \n", "26 3 - A big problem for us \n", "27 1 - Not a problem for us \n", "28 2 - Need help with this \n", "29 3 - A big problem for us \n", "\n", " Which of these problems does your company face? [Data analysis] \\\n", "0 1 - Not a problem for us \n", "1 1 - Not a problem for us \n", "2 3 - A big problem for us \n", "3 3 - A big problem for us \n", "4 3 - A big problem for us \n", "5 3 - A big problem for us \n", "6 2 - Need help with this \n", "7 2 - Need help with this \n", "8 2 - Need help with this \n", "9 3 - A big problem for us \n", "10 1 - Not a problem for us \n", "11 2 - Need help with this \n", "12 2 - Need help with this \n", "13 3 - A big problem for us \n", "14 3 - A big problem for us \n", "15 3 - A big problem for us \n", "16 1 - Not a problem for us \n", "17 1 - Not a problem for us \n", "18 2 - Need help with this \n", "19 3 - A big problem for us \n", "20 3 - A big problem for us \n", "21 3 - A big problem for us \n", "22 2 - Need help with this \n", "23 2 - Need help with this \n", "24 3 - A big problem for us \n", "25 3 - A big problem for us \n", "26 3 - A big problem for us \n", "27 2 - Need help with this \n", "28 1 - Not a problem for us \n", "29 3 - A big problem for us \n", "\n", " Which of these problems does your company face? [Sending customized emails] \\\n", "0 2 - Need help with this \n", "1 1 - Not a problem for us \n", "2 3 - A big problem for us \n", "3 3 - A big problem for us \n", "4 1 - Not a problem for us \n", "5 1 - Not a problem for us \n", "6 1 - Not a problem for us \n", "7 3 - A big problem for us \n", "8 2 - Need help with this \n", "9 2 - Need help with this \n", "10 3 - A big problem for us \n", "11 2 - Need help with this \n", "12 1 - Not a problem for us \n", "13 3 - A big problem for us \n", "14 3 - A big problem for us \n", "15 1 - Not a problem for us \n", "16 1 - Not a problem for us \n", "17 2 - Need help with this \n", "18 2 - Need help with this \n", "19 1 - Not a problem for us \n", "20 2 - Need help with this \n", "21 2 - Need help with this \n", "22 1 - Not a problem for us \n", "23 3 - A big problem for us \n", "24 3 - A big problem for us \n", "25 3 - A big problem for us \n", "26 1 - Not a problem for us \n", "27 2 - Need help with this \n", "28 1 - Not a problem for us \n", "29 2 - Need help with this \n", "\n", " Which of these problems does your company face? [Inventory management system] \\\n", "0 1 - Not a problem for us \n", "1 1 - Not a problem for us \n", "2 3 - A big problem for us \n", "3 1 - Not a problem for us \n", "4 1 - Not a problem for us \n", "5 3 - A big problem for us \n", "6 1 - Not a problem for us \n", "7 1 - Not a problem for us \n", "8 1 - Not a problem for us \n", "9 3 - A big problem for us \n", "10 1 - Not a problem for us \n", "11 1 - Not a problem for us \n", "12 2 - Need help with this \n", "13 2 - Need help with this \n", "14 1 - Not a problem for us \n", "15 3 - A big problem for us \n", "16 1 - Not a problem for us \n", "17 2 - Need help with this \n", "18 2 - Need help with this \n", "19 1 - Not a problem for us \n", "20 1 - Not a problem for us \n", "21 2 - Need help with this \n", "22 2 - Need help with this \n", "23 3 - A big problem for us \n", "24 3 - A big problem for us \n", "25 3 - A big problem for us \n", "26 3 - A big problem for us \n", "27 3 - A big problem for us \n", "28 1 - Not a problem for us \n", "29 2 - Need help with this \n", "\n", " Which of these problems does your company face? [Website or social media marketing] \\\n", "0 2 - Need help with this \n", "1 3 - A big problem for us \n", "2 3 - A big problem for us \n", "3 1 - Not a problem for us \n", "4 3 - A big problem for us \n", "5 2 - Need help with this \n", "6 3 - A big problem for us \n", "7 2 - Need help with this \n", "8 1 - Not a problem for us \n", "9 2 - Need help with this \n", "10 2 - Need help with this \n", "11 3 - A big problem for us \n", "12 1 - Not a problem for us \n", "13 3 - A big problem for us \n", "14 2 - Need help with this \n", "15 2 - Need help with this \n", "16 1 - Not a problem for us \n", "17 1 - Not a problem for us \n", "18 2 - Need help with this \n", "19 3 - A big problem for us \n", "20 1 - Not a problem for us \n", "21 2 - Need help with this \n", "22 1 - Not a problem for us \n", "23 3 - A big problem for us \n", "24 3 - A big problem for us \n", "25 3 - A big problem for us \n", "26 2 - Need help with this \n", "27 3 - A big problem for us \n", "28 1 - Not a problem for us \n", "29 2 - Need help with this \n", "\n", " Which of these problems does your company face? [Location finder] \\\n", "0 3 - A big problem for us \n", "1 1 - Not a problem for us \n", "2 2 - Need help with this \n", "3 1 - Not a problem for us \n", "4 1 - Not a problem for us \n", "5 1 - Not a problem for us \n", "6 1 - Not a problem for us \n", "7 1 - Not a problem for us \n", "8 1 - Not a problem for us \n", "9 1 - Not a problem for us \n", "10 1 - Not a problem for us \n", "11 1 - Not a problem for us \n", "12 2 - Need help with this \n", "13 2 - Need help with this \n", "14 1 - Not a problem for us \n", "15 1 - Not a problem for us \n", "16 1 - Not a problem for us \n", "17 1 - Not a problem for us \n", "18 2 - Need help with this \n", "19 1 - Not a problem for us \n", "20 1 - Not a problem for us \n", "21 1 - Not a problem for us \n", "22 1 - Not a problem for us \n", "23 1 - Not a problem for us \n", "24 2 - Need help with this \n", "25 1 - Not a problem for us \n", "26 2 - Need help with this \n", "27 1 - Not a problem for us \n", "28 1 - Not a problem for us \n", "29 1 - Not a problem for us \n", "\n", " Which of these problems does your company face? [Storing data on people] \\\n", "0 2 - Need help with this \n", "1 3 - A big problem for us \n", "2 3 - A big problem for us \n", "3 2 - Need help with this \n", "4 1 - Not a problem for us \n", "5 2 - Need help with this \n", "6 2 - Need help with this \n", "7 1 - Not a problem for us \n", "8 3 - A big problem for us \n", "9 2 - Need help with this \n", "10 1 - Not a problem for us \n", "11 2 - Need help with this \n", "12 2 - Need help with this \n", "13 3 - A big problem for us \n", "14 2 - Need help with this \n", "15 2 - Need help with this \n", "16 1 - Not a problem for us \n", "17 1 - Not a problem for us \n", "18 2 - Need help with this \n", "19 3 - A big problem for us \n", "20 3 - A big problem for us \n", "21 2 - Need help with this \n", "22 1 - Not a problem for us \n", "23 3 - A big problem for us \n", "24 3 - A big problem for us \n", "25 3 - A big problem for us \n", "26 2 - Need help with this \n", "27 1 - Not a problem for us \n", "28 1 - Not a problem for us \n", "29 3 - A big problem for us \n", "\n", " Which of these problems does your company face? [Storing data on animals] \\\n", "0 1 - Not a problem for us \n", "1 1 - Not a problem for us \n", "2 1 - Not a problem for us \n", "3 1 - Not a problem for us \n", "4 1 - Not a problem for us \n", "5 1 - Not a problem for us \n", "6 1 - Not a problem for us \n", "7 1 - Not a problem for us \n", "8 1 - Not a problem for us \n", "9 1 - Not a problem for us \n", "10 1 - Not a problem for us \n", "11 1 - Not a problem for us \n", "12 1 - Not a problem for us \n", "13 1 - Not a problem for us \n", "14 1 - Not a problem for us \n", "15 1 - Not a problem for us \n", "16 1 - Not a problem for us \n", "17 1 - Not a problem for us \n", "18 3 - A big problem for us \n", "19 1 - Not a problem for us \n", "20 1 - Not a problem for us \n", "21 2 - Need help with this \n", "22 1 - Not a problem for us \n", "23 3 - A big problem for us \n", "24 1 - Not a problem for us \n", "25 1 - Not a problem for us \n", "26 2 - Need help with this \n", "27 1 - Not a problem for us \n", "28 1 - Not a problem for us \n", "29 1 - Not a problem for us \n", "\n", " Which of these problems does your company face? [Government compliance documentation] \\\n", "0 1 - Not a problem for us \n", "1 1 - Not a problem for us \n", "2 3 - A big problem for us \n", "3 2 - Need help with this \n", "4 1 - Not a problem for us \n", "5 1 - Not a problem for us \n", "6 2 - Need help with this \n", "7 1 - Not a problem for us \n", "8 1 - Not a problem for us \n", "9 2 - Need help with this \n", "10 1 - Not a problem for us \n", "11 3 - A big problem for us \n", "12 1 - Not a problem for us \n", "13 1 - Not a problem for us \n", "14 2 - Need help with this \n", "15 1 - Not a problem for us \n", "16 1 - Not a problem for us \n", "17 1 - Not a problem for us \n", "18 2 - Need help with this \n", "19 3 - A big problem for us \n", "20 1 - Not a problem for us \n", "21 1 - Not a problem for us \n", "22 2 - Need help with this \n", "23 1 - Not a problem for us \n", "24 3 - A big problem for us \n", "25 1 - Not a problem for us \n", "26 2 - Need help with this \n", "27 1 - Not a problem for us \n", "28 1 - Not a problem for us \n", "29 2 - Need help with this \n", "\n", " Other problems not listed above \n", "0 Keeping track of and acknowledging donations \n", "1 NaN \n", "2 NaN \n", "3 NaN \n", "4 Over 19,000 individuals served by TCAA's five ... \n", "5 In depth volunteer scheduling \n", "6 NaN \n", "7 Registration platform with customized fundrais... \n", "8 Volunteer Data Management \n", "9 NaN \n", "10 having general, ongoing IT person for a small ... \n", "11 NaN \n", "12 NaN \n", "13 NaN \n", "14 NaN \n", "15 Intricate daily Volunteer scheduling \n", "16 We used to have two issues: registration/sign ... \n", "17 NaN \n", "18 Tracking board member and volunteer connections \n", "19 electronic documentation system \n", "20 NaN \n", "21 Looking for a way to quickly disseminate infor... \n", "22 our biggest problem is data systems that don't... \n", "23 We need help solving a very big problem that w... \n", "24 on line grant writing help. \n", "25 I would like a way for families to register th... \n", "26 a huge problem is a place to keep track of a... \n", "27 NaN \n", "28 NaN \n", "29 NaN " ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# This file was directly exported from Google Forms, but names and email addresses were removed.\n", "file = \"../data/Arizona Opportunity Hack 2018 - Non-profit Survey (Responses) - Form Responses.csv\"\n", "df = pd.read_csv(file)\n", "df" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Submissions over time\n", "Can you spot where we did our email campaigns?" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "df_time = df\n", "df_time[\"timestamp_obj\"] = pd.to_datetime(df_time['Timestamp'])\n", "df_time[\"week\"] = df_time[\"timestamp_obj\"].dt.strftime('Week %U (%b)') # Group by week\n", "\n", "import plotly.graph_objs as go\n", "init_notebook_mode(connected=True)\n", "iplot([go.Scatter(x=df_time[\"timestamp_obj\"])] )" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Look for duplicate submissions\n", "There were a couple of NPOs that submitted twice" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Name of your non-profit or government agencycount
13Matthew's Crossing Food Bank2
24Tranquility Trail Animal Sanctuary2
22Swift youth foundation2
14Neurologic Music Therapy Services of Arizona2
1Arizona Council on Economic Education1
23Tempe Community Action Agency1
\n", "
" ], "text/plain": [ " Name of your non-profit or government agency count\n", "13 Matthew's Crossing Food Bank 2\n", "24 Tranquility Trail Animal Sanctuary 2\n", "22 Swift youth foundation 2\n", "14 Neurologic Music Therapy Services of Arizona 2\n", "1 Arizona Council on Economic Education 1\n", "23 Tempe Community Action Agency 1" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df.groupby(['Name of your non-profit or government agency'])[\"Name of your non-profit or government agency\"].count().reset_index(name='count').sort_values(['count'], ascending=False).head(6)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Keep the last submission of the duplicates\n", "If we had a duplicate submission from an NPO, keep the last one" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Name of your non-profit or government agencycount
0Animals (and Humans) in Disaster, Inc (state...1
1Arizona Council on Economic Education1
24Tranquility Trail Animal Sanctuary1
23Tempe Community Action Agency1
22Swift youth foundation1
21Sharing Down Syndrome Arizona1
20RealTimeSTEAM1
19RESCUE1
18Paz de Cristo Community Center1
17Pan de Vida Foundation1
16Newtown CDC1
15Never Again Foundation1
14Neurologic Music Therapy Services of Arizona1
13Matthew's Crossing Food Bank1
12Lost Our Home Pet Rescue1
11LETI Foundation1
10Impact One Breast Cancer Foundation1
9ICM Food & Clothing Bank1
8House of Refuge1
7Dog Rescue & Community Project Accelerator1
6Children's Cancer Network1
5Cece’s Hope Center1
4CO+HOOTS Foundation1
3Be A Leader Foundation1
2Arizonans for Children1
25Unlimited Potential1
\n", "
" ], "text/plain": [ " Name of your non-profit or government agency count\n", "0 Animals (and Humans) in Disaster, Inc (state... 1\n", "1 Arizona Council on Economic Education 1\n", "24 Tranquility Trail Animal Sanctuary 1\n", "23 Tempe Community Action Agency 1\n", "22 Swift youth foundation 1\n", "21 Sharing Down Syndrome Arizona 1\n", "20 RealTimeSTEAM 1\n", "19 RESCUE 1\n", "18 Paz de Cristo Community Center 1\n", "17 Pan de Vida Foundation 1\n", "16 Newtown CDC 1\n", "15 Never Again Foundation 1\n", "14 Neurologic Music Therapy Services of Arizona 1\n", "13 Matthew's Crossing Food Bank 1\n", "12 Lost Our Home Pet Rescue 1\n", "11 LETI Foundation 1\n", "10 Impact One Breast Cancer Foundation 1\n", "9 ICM Food & Clothing Bank 1\n", "8 House of Refuge 1\n", "7 Dog Rescue & Community Project Accelerator 1\n", "6 Children's Cancer Network 1\n", "5 Cece’s Hope Center 1\n", "4 CO+HOOTS Foundation 1\n", "3 Be A Leader Foundation 1\n", "2 Arizonans for Children 1\n", "25 Unlimited Potential 1" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df.drop_duplicates([\"Name of your non-profit or government agency\"], keep=\"last\", inplace=True)\n", "df.groupby(['Name of your non-profit or government agency'])[\"Name of your non-profit or government agency\"].count().reset_index(name='count').sort_values(['count'], ascending=False)" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Total number of submissions: 26\n" ] } ], "source": [ "print(\"Total number of submissions:\", len(df))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## More detail on the \"other\"\n", "We also want to consider the free-text \"other\" problems to see if we can find a home for them. Most of these will give us ideas for future Opportunity Hacks." ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Name of your non-profit or government agencyOther problems not listed above
0CO+HOOTS FoundationKeeping track of and acknowledging donations
4Tempe Community Action AgencyOver 19,000 individuals served by TCAA's five departments are tracked separately using a variety of software programs (primarily funder-prescribed/administered systems). TCAA lacks the ability to consolidate this data into a single reporting system to identify and track all individuals served (unduplicated).
7Children's Cancer NetworkRegistration platform with customized fundraising platform for participants (2300 participants)
10RESCUEhaving general, ongoing IT person for a small non-profit is difficult to find.
15Swift youth foundationIntricate daily Volunteer scheduling
16Arizona Council on Economic EducationWe used to have two issues: registration/sign in and data analysis but the last hackathon helped us solve them!
18Cece’s Hope CenterTracking board member and volunteer connections
19Neurologic Music Therapy Services of Arizonaelectronic documentation system
21Lost Our Home Pet RescueLooking for a way to quickly disseminate information to rescue partners. Perhaps, through an internet forum with text message notifications based on user preference.
22Matthew's Crossing Food Bankour biggest problem is data systems that don't talk to each other
23Dog Rescue & Community Project AcceleratorWe need help solving a very big problem that will help all small nonprofits get the donated items they need. I have interviewed over 300 nonprofit organizations and this is one of the top 4 needs for all nonprofits, especially smaller nonprofits. We need a system that curates all of the nonprofits' needs and alerts them when a donation is available from a business or individual donor. All small nonprofits are dying on the vine because they cannot get the items they need. Meanwhile, businesses and individuals are throwing perfectly good food & items into the landfill. This destroys our beautiful desert landscape and pollutes our groundwater. We all need a Donate Item Alert System Project. Here is the problem we are trying to solve:\\n\\n1. We need to create an alert system that lets us know when a business or individual has a donation to pick up. It needs to be quick & easy.\\n\\n2. We have to alert transportation volunteers that a donation needs to be picked up. A system like Uber would be great so that we know which volunteer took the request and assure that the donation was picked up.\\n\\n3. We need to track which primary sorting location the item went to.\\n\\n4. We need to track which nonprofit or school needs the item and where they are located.\\n\\n5. We need to create efficient systems for tracking which storage locations the donations are stored in.\\n\\n6. We need to track how many of each items are at each storage space.\\n\\n7. We need an efficient way of tracking what items need to be moved to different parts of the valley and we need a fuel efficient way of deciding the route for drop off of items to the final nonprofit destination.\\n\\n8. We need to track who got the donated items for tax write offs and thank yous to donors.
24Pan de Vida Foundationon line grant writing help.
25LETI FoundationI would like a way for families to register themselves with a picture of them and their children, be able to also upload DNA /Diagnosis test results
26Animals (and Humans) in Disaster, Inc (state-wide)a huge problem is a place to keep track of a system for donated items (in-kind)
" ], "text/plain": [ "" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "pd.options.display.max_colwidth = 15500\n", "from pandas import DataFrame\n", "from IPython.display import HTML\n", "HTML(DataFrame(df[[\"Name of your non-profit or government agency\",\"Other problems not listed above\"]].dropna()).to_html())" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Make the column headers more readable" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Recruiting volunteersCommunication to volunteersRegistration, sign-in, and sign-up formsKeeping track of a person’s progressData analysisSending customized emailsInventory management systemWebsite or social media marketingLocation finderStoring data on peopleStoring data on animalsGovernment compliance documentation
01 - Not a problem for us2 - Need help with this2 - Need help with this1 - Not a problem for us1 - Not a problem for us2 - Need help with this1 - Not a problem for us2 - Need help with this3 - A big problem for us2 - Need help with this1 - Not a problem for us1 - Not a problem for us
11 - Not a problem for us2 - Need help with this1 - Not a problem for us2 - Need help with this1 - Not a problem for us1 - Not a problem for us1 - Not a problem for us3 - A big problem for us1 - Not a problem for us3 - A big problem for us1 - Not a problem for us1 - Not a problem for us
\n", "
" ], "text/plain": [ " Recruiting volunteers Communication to volunteers \\\n", "0 1 - Not a problem for us 2 - Need help with this \n", "1 1 - Not a problem for us 2 - Need help with this \n", "\n", " Registration, sign-in, and sign-up forms \\\n", "0 2 - Need help with this \n", "1 1 - Not a problem for us \n", "\n", " Keeping track of a person’s progress Data analysis \\\n", "0 1 - Not a problem for us 1 - Not a problem for us \n", "1 2 - Need help with this 1 - Not a problem for us \n", "\n", " Sending customized emails Inventory management system \\\n", "0 2 - Need help with this 1 - Not a problem for us \n", "1 1 - Not a problem for us 1 - Not a problem for us \n", "\n", " Website or social media marketing Location finder \\\n", "0 2 - Need help with this 3 - A big problem for us \n", "1 3 - A big problem for us 1 - Not a problem for us \n", "\n", " Storing data on people Storing data on animals \\\n", "0 2 - Need help with this 1 - Not a problem for us \n", "1 3 - A big problem for us 1 - Not a problem for us \n", "\n", " Government compliance documentation \n", "0 1 - Not a problem for us \n", "1 1 - Not a problem for us " ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import re\n", "df = df.rename(columns=lambda x: re.sub('Which of these problems does your company face\\?','',x))\n", "df = df.rename(columns=lambda x: re.sub('[\\[\\]]','',x))\n", "df = df.rename(columns=lambda x: re.sub('^\\s','',x))\n", "\n", "df_results = df[[\"Recruiting volunteers\",\"Communication to volunteers\",\"Registration, sign-in, and sign-up forms\",\"Keeping track of a person’s progress\",\"Data analysis\",\"Sending customized emails\",\"Inventory management system\",\"Website or social media marketing\",\"Location finder\",\"Storing data on people\",\"Storing data on animals\",\"Government compliance documentation\"]]\n", "df_results.head(2)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Summarize the rankings" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Recruiting volunteersCommunication to volunteersRegistration, sign-in, and sign-up formsKeeping track of a person’s progressData analysisSending customized emailsInventory management systemWebsite or social media marketingLocation finderStoring data on peopleStoring data on animalsGovernment compliance documentation
1 - Not a problem for us1481176101271982216
2 - Need help with this91271077796927
3 - A big problem for us36891397101923
\n", "
" ], "text/plain": [ " Recruiting volunteers Communication to volunteers \\\n", "1 - Not a problem for us 14 8 \n", "2 - Need help with this 9 12 \n", "3 - A big problem for us 3 6 \n", "\n", " Registration, sign-in, and sign-up forms \\\n", "1 - Not a problem for us 11 \n", "2 - Need help with this 7 \n", "3 - A big problem for us 8 \n", "\n", " Keeping track of a person’s progress Data analysis \\\n", "1 - Not a problem for us 7 6 \n", "2 - Need help with this 10 7 \n", "3 - A big problem for us 9 13 \n", "\n", " Sending customized emails \\\n", "1 - Not a problem for us 10 \n", "2 - Need help with this 7 \n", "3 - A big problem for us 9 \n", "\n", " Inventory management system \\\n", "1 - Not a problem for us 12 \n", "2 - Need help with this 7 \n", "3 - A big problem for us 7 \n", "\n", " Website or social media marketing Location finder \\\n", "1 - Not a problem for us 7 19 \n", "2 - Need help with this 9 6 \n", "3 - A big problem for us 10 1 \n", "\n", " Storing data on people Storing data on animals \\\n", "1 - Not a problem for us 8 22 \n", "2 - Need help with this 9 2 \n", "3 - A big problem for us 9 2 \n", "\n", " Government compliance documentation \n", "1 - Not a problem for us 16 \n", "2 - Need help with this 7 \n", "3 - A big problem for us 3 " ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_counts = df_results.apply(pd.value_counts)\n", "df_counts" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Charting the data\n", "* Data analysis is the largest \"big problem\"\n", "* Communication to volunteers is the largest \"need help with this\"\n", "* Storing data on animals is the largest \"not a problem for us\"" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "df_counts.iplot(kind=\"bar\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Sort the data by severity" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "df_counts.transpose().sort_values(by=[\"1 - Not a problem for us\", \"2 - Need help with this\", \"3 - A big problem for us\"]).iplot(kind=\"bar\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Scoring\n", "* Not a problem: 10%\n", "* Need help with this: 30%\n", "* A big problem for us: 60%" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
index1 - Not a problem for us2 - Need help with this3 - A big problem for usscorecumulative_sumcumulative_perc
0Data analysis671310.510.511.7
1Website or social media marketing79109.419.922.2
2Keeping track of a person’s progress71099.129.032.4
3Storing data on people8998.937.942.3
4Sending customized emails10798.546.451.8
5Registration, sign-in, and sign-up forms11788.054.460.7
6Communication to volunteers81268.062.469.6
7Inventory management system12777.569.978.0
8Recruiting volunteers14935.975.884.6
9Government compliance documentation16735.581.390.7
10Location finder19614.385.695.5
11Storing data on animals22224.089.6100.0
\n", "
" ], "text/plain": [ " index 1 - Not a problem for us \\\n", "0 Data analysis 6 \n", "1 Website or social media marketing 7 \n", "2 Keeping track of a person’s progress 7 \n", "3 Storing data on people 8 \n", "4 Sending customized emails 10 \n", "5 Registration, sign-in, and sign-up forms 11 \n", "6 Communication to volunteers 8 \n", "7 Inventory management system 12 \n", "8 Recruiting volunteers 14 \n", "9 Government compliance documentation 16 \n", "10 Location finder 19 \n", "11 Storing data on animals 22 \n", "\n", " 2 - Need help with this 3 - A big problem for us score cumulative_sum \\\n", "0 7 13 10.5 10.5 \n", "1 9 10 9.4 19.9 \n", "2 10 9 9.1 29.0 \n", "3 9 9 8.9 37.9 \n", "4 7 9 8.5 46.4 \n", "5 7 8 8.0 54.4 \n", "6 12 6 8.0 62.4 \n", "7 7 7 7.5 69.9 \n", "8 9 3 5.9 75.8 \n", "9 7 3 5.5 81.3 \n", "10 6 1 4.3 85.6 \n", "11 2 2 4.0 89.6 \n", "\n", " cumulative_perc \n", "0 11.7 \n", "1 22.2 \n", "2 32.4 \n", "3 42.3 \n", "4 51.8 \n", "5 60.7 \n", "6 69.6 \n", "7 78.0 \n", "8 84.6 \n", "9 90.7 \n", "10 95.5 \n", "11 100.0 " ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_score = df_counts.transpose()\n", "df_score[\"score\"] = df_score[\"1 - Not a problem for us\"]*.1 + df_score[\"2 - Need help with this\"]*0.3 + df_score[\"3 - A big problem for us\"]*.6\n", "df_score = df_score.sort_values(by=\"score\", ascending=False)\n", "\n", "df_score[\"cumulative_sum\"] = df_score.score.cumsum()\n", "df_score['cumulative_perc'] = round(100*df_score.cumulative_sum/df_score.score.sum(),1)\n", "df_score = df_score.reset_index()\n", "df_score" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Visualize the problem scores" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "df_score.sort_values(by=\"score\", ascending=False)[\"score\"].iplot(kind=\"bar\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### There is a significant drop-off after a score of 7, so let's limit problem statements to scores greater than 7" ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0 Data analysis\n", "1 Website or social media marketing\n", "2 Keeping track of a person’s progress\n", "3 Storing data on people\n", "4 Sending customized emails\n", "5 Registration, sign-in, and sign-up forms\n", "6 Communication to volunteers\n", "7 Inventory management system\n", "Name: index, dtype: object" ] }, "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ "target_areas = df_score[df_score[\"score\"] >= 7.0][\"index\"]\n", "\n", "# Remove some text from the original column names to make it easier to read\n", "df = df.rename(columns=lambda x: re.sub('Which of these problems does your company face\\?','',x))\n", "df = df.rename(columns=lambda x: re.sub('[\\[\\]]','',x))\n", "df = df.rename(columns=lambda x: re.sub('^\\s','',x))\n", "\n", "target_areas" ] }, { "cell_type": "code", "execution_count": 22, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Data analysisWebsite or social media marketingKeeping track of a person’s progressStoring data on peopleSending customized emailsRegistration, sign-in, and sign-up formsCommunication to volunteersInventory management systemName of your non-profit or government agency
01 - Not a problem for us2 - Need help with this1 - Not a problem for us2 - Need help with this2 - Need help with this2 - Need help with this2 - Need help with this1 - Not a problem for usCO+HOOTS Foundation
11 - Not a problem for us3 - A big problem for us2 - Need help with this3 - A big problem for us1 - Not a problem for us1 - Not a problem for us2 - Need help with this1 - Not a problem for usBe A Leader Foundation
\n", "
" ], "text/plain": [ " Data analysis Website or social media marketing \\\n", "0 1 - Not a problem for us 2 - Need help with this \n", "1 1 - Not a problem for us 3 - A big problem for us \n", "\n", " Keeping track of a person’s progress Storing data on people \\\n", "0 1 - Not a problem for us 2 - Need help with this \n", "1 2 - Need help with this 3 - A big problem for us \n", "\n", " Sending customized emails Registration, sign-in, and sign-up forms \\\n", "0 2 - Need help with this 2 - Need help with this \n", "1 1 - Not a problem for us 1 - Not a problem for us \n", "\n", " Communication to volunteers Inventory management system \\\n", "0 2 - Need help with this 1 - Not a problem for us \n", "1 2 - Need help with this 1 - Not a problem for us \n", "\n", " Name of your non-profit or government agency \n", "0 CO+HOOTS Foundation \n", "1 Be A Leader Foundation " ] }, "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Grab the list of categories that made the cut\n", "target_categories = target_areas.tolist()\n", "\n", "# Add the columns for the other info we want to grab\n", "target_categories.append(\"Name of your non-profit or government agency\")\n", "\n", "# Define our list by passing in the columns we want from the original data\n", "target_npos = df[target_categories]\n", "target_npos.head(2)" ] }, { "cell_type": "code", "execution_count": 24, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
NPOProblem StatementScore
119Animals (and Humans) in Disaster, Inc (state...Data analysis0.6
76Neurologic Music Therapy Services of ArizonaData analysis0.6
113LETI FoundationKeeping track of a person’s progress0.6
114LETI FoundationStoring data on people0.6
54RealTimeSTEAMData analysis0.6
115LETI FoundationSending customized emails0.6
116LETI FoundationRegistration, sign-in, and sign-up forms0.6
\n", "
" ], "text/plain": [ " NPO \\\n", "119 Animals (and Humans) in Disaster, Inc (state... \n", "76 Neurologic Music Therapy Services of Arizona \n", "113 LETI Foundation \n", "114 LETI Foundation \n", "54 RealTimeSTEAM \n", "115 LETI Foundation \n", "116 LETI Foundation \n", "\n", " Problem Statement Score \n", "119 Data analysis 0.6 \n", "76 Data analysis 0.6 \n", "113 Keeping track of a person’s progress 0.6 \n", "114 Storing data on people 0.6 \n", "54 Data analysis 0.6 \n", "115 Sending customized emails 0.6 \n", "116 Registration, sign-in, and sign-up forms 0.6 " ] }, "execution_count": 24, "metadata": {}, "output_type": "execute_result" } ], "source": [ "b = []\n", "for index, row in target_npos.iterrows():\n", " # Check all of the winning problem statements (e.g. Data analysis)\n", " for c in target_areas:\n", "\n", " # Ignore things that are not problems for an NPO\n", " if row[c] != \"1 - Not a problem for us\":\n", " score = .3 if row[c] == \"2 - Need help with this\" else .6\n", " \n", " d = { \n", " \"Problem Statement\" : c,\n", " \"NPO\" : row[\"Name of your non-profit or government agency\"],\n", " \"Score\" : score\n", " }\n", " s = pd.Series(d)\n", " b.append(s)\n", "\n", "basket = pd.DataFrame(b)\n", "basket.index = np.arange(1, len(basket) + 1) # Make the table below start at 1 instead of 0\n", "\n", "# Give priority to the people who said things were big problems\n", "basket = basket.sort_values(by=\"Score\", ascending=False)\n", "basket.head(7)" ] }, { "cell_type": "code", "execution_count": 25, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
10.5 Data analysis9.4 Website or social media marketing9.1 Keeping track of a person’s progress8.9 Storing data on people8.5 Sending customized emails8.0 Registration, sign-in, and sign-up forms8.0 Communication to volunteers7.5 Inventory management system
0Animals (and Humans) in Disaster, Inc (state...Impact One Breast Cancer FoundationDog Rescue & Community Project AcceleratorBe A Leader FoundationRESCUESharing Down Syndrome ArizonaPaz de Cristo Community CenterMatthew's Crossing Food Bank
1Neurologic Music Therapy Services of ArizonaLETI FoundationNever Again FoundationTranquility Trail Animal SanctuaryUnlimited PotentialTempe Community Action AgencyCece’s Hope CenterArizonans for Children
2RealTimeSTEAMPan de Vida FoundationICM Food & Clothing BankLost Our Home Pet RescueChildren's Cancer NetworkCO+HOOTS FoundationSwift youth foundationNone
3NoneNewtown CDCHouse of RefugeNoneNoneNoneNoneNone
\n", "
" ], "text/plain": [ " 10.5 Data analysis \\\n", "0 Animals (and Humans) in Disaster, Inc (state... \n", "1 Neurologic Music Therapy Services of Arizona \n", "2 RealTimeSTEAM \n", "3 None \n", "\n", " 9.4 Website or social media marketing \\\n", "0 Impact One Breast Cancer Foundation \n", "1 LETI Foundation \n", "2 Pan de Vida Foundation \n", "3 Newtown CDC \n", "\n", " 9.1 Keeping track of a person’s progress \\\n", "0 Dog Rescue & Community Project Accelerator \n", "1 Never Again Foundation \n", "2 ICM Food & Clothing Bank \n", "3 House of Refuge \n", "\n", " 8.9 Storing data on people 8.5 Sending customized emails \\\n", "0 Be A Leader Foundation RESCUE \n", "1 Tranquility Trail Animal Sanctuary Unlimited Potential \n", "2 Lost Our Home Pet Rescue Children's Cancer Network \n", "3 None None \n", "\n", " 8.0 Registration, sign-in, and sign-up forms \\\n", "0 Sharing Down Syndrome Arizona \n", "1 Tempe Community Action Agency \n", "2 CO+HOOTS Foundation \n", "3 None \n", "\n", " 8.0 Communication to volunteers 7.5 Inventory management system \n", "0 Paz de Cristo Community Center Matthew's Crossing Food Bank \n", "1 Cece’s Hope Center Arizonans for Children \n", "2 Swift youth foundation None \n", "3 None None " ] }, "execution_count": 25, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# We're going to maintain a counter of how many times an NPO gets selected\n", "df_counter = pd.DataFrame(columns=[\"NPO\", \"count\"])\n", "\n", "# Get the unique set of NPOs\n", "df_counter[\"NPO\"] = basket['NPO'].unique() \n", "\n", "# Initialize all to 0\n", "df_counter[\"count\"] = 0\n", "\n", "# Use this to keep track of how the problems are mapped to NPOs\n", "selection = {}\n", "\n", "def all_npos_accounted_for():\n", " min_count = min(df_counter[\"count\"])\n", " \n", " # If everyone is accounted for 1 time, then all NPOs are accounted for\n", " if min_count == 1:\n", " return True\n", " else:\n", " return False\n", " \n", "\n", "def npo_maxed_out(npo, max_times = 1):\n", " # Look through all problem statements and ensure that the NPO is not in more than 2 \n", " items = [v for key, v in selection.items()]\n", "\n", " counter = 0 \n", " for it in items:\n", " for i in it:\n", " \n", " # Increase counter if we get a hit\n", " if npo == i:\n", " counter = counter + 1 \n", " \n", " if counter == max_times:\n", " #print(\"Not adding since NPO: \" + npo + \" already at max capacity (\" + str(max_times) + \")\")\n", " return True\n", " return False\n", "\n", "def max_npos_per_problem(problem_statement, max_npos_per_problem = 3):\n", " return len(selection[problem_statement]) < max_npos_per_problem\n", "\n", "\n", "def add_to_selection(problem_statement, npo): \n", " # Handle the first time we add an NPO\n", " if problem_statement not in selection:\n", " selection[problem_statement] = []\n", "\n", " if max_npos_per_problem(problem_statement) and not npo_maxed_out(npo):\n", " selection[problem_statement].append(npo)\n", " df_counter.loc[df_counter[\"NPO\"] == npo, \"count\"] = df_counter[df_counter[\"NPO\"] == npo][\"count\"] + 1\n", " \n", " \n", "\n", "# Start with the most import problem statement first\n", "done = False\n", "counter = 0\n", "while not done:\n", " done = all_npos_accounted_for()\n", " counter = counter + 1\n", " done = True if counter == 100 else done #Super-hacky, but if we don't have all NPOs by now, break\n", " \n", " # Get the NPOs with this problem sorted by impact\n", " for index, score_row in df_score.iterrows():\n", " problem = score_row[\"index\"]\n", "\n", " # Get all NPOs for this problem\n", " for idx, row in basket[basket[\"Problem Statement\"] == problem].iterrows():\n", " add_to_selection(row[\"Problem Statement\"], row[\"NPO\"])\n", "\n", "\n", " \n", "# Make the output readable \n", "f_selection = pd.DataFrame.from_dict(selection, orient='index').transpose()\n", "f_selection.index = np.arange(1, len(f_selection) + 1) # Print out starting at index of 1 instead of 0\n", "\n", "# Add scores to each column\n", "for c in f_selection.columns:\n", " if len(df_score[df_score[\"index\"].str.contains(c)]) > 0:\n", " score = str(round(df_score[df_score[\"index\"] == c][\"score\"].values[0],1)).zfill(5)\n", " f_selection = f_selection.rename(index=str, columns={c: score + \" \" + c})\n", "\n", "\n", "# Sort by scores\n", "f_selection = f_selection.reindex(sorted(f_selection.columns, reverse=True), axis=1)\n", "\n", "# Remove leading zeros that are needed for sorting\n", "f_selection = f_selection.rename(columns=lambda x: re.sub(r'\\b0+(.*)', r'\\1', x))\n", "\n", "# Manually add NPOs that didn't get placed\n", "d = {\n", " \"9.4 Website or social media marketing\":\"Newtown CDC\",\n", " \"9.1 Keeping track of a person’s progress\":\"House of Refuge\"\n", "}\n", "f_selection = f_selection.append(pd.Series(d), ignore_index=True ).replace(np.nan, \"None\", regex=True)\n", "f_selection" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Data Check - did we get all NPOs?\n", "Arizona Council on Economic Education (ACEE) didn't have any problems, so this data looks right" ] }, { "cell_type": "code", "execution_count": 28, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The table above includes 26 non-profits\n", "\n", "We are missing these non-profits from the table:\n", "Arizona Council on Economic Education\n" ] } ], "source": [ "print(\"The table above includes\",len(collections.Counter(f_selection.values.flatten())),\"non-profits\")\n", "\n", "print(\"\\nWe are missing these non-profits from the table:\")\n", "print(\"\\n\".join(df[~df[\"Name of your non-profit or government agency\"].isin(f_selection.values.flatten())][\"Name of your non-profit or government agency\"].values))" ] }, { "cell_type": "code", "execution_count": 30, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[('None', 7),\n", " ('ICM Food & Clothing Bank', 1),\n", " ('Swift youth foundation ', 1),\n", " ('Tempe Community Action Agency', 1),\n", " ('LETI Foundation', 1),\n", " ('Lost Our Home Pet Rescue', 1),\n", " (\"Children's Cancer Network\", 1),\n", " ('CO+HOOTS Foundation', 1),\n", " ('RESCUE', 1),\n", " ('RealTimeSTEAM', 1),\n", " ('Sharing Down Syndrome Arizona', 1),\n", " ('Pan de Vida Foundation', 1),\n", " ('Newtown CDC', 1),\n", " ('Dog Rescue & Community Project Accelerator', 1),\n", " ('Never Again Foundation', 1),\n", " ('Be A Leader Foundation', 1),\n", " ('House of Refuge', 1),\n", " ('Paz de Cristo Community Center', 1),\n", " ('Cece’s Hope Center', 1),\n", " (\"Matthew's Crossing Food Bank\", 1),\n", " ('Tranquility Trail Animal Sanctuary ', 1),\n", " ('Arizonans for Children', 1),\n", " ('Neurologic Music Therapy Services of Arizona', 1),\n", " ('Unlimited Potential ', 1),\n", " ('Impact One Breast Cancer Foundation', 1),\n", " ('Animals (and Humans) in Disaster, Inc (state-wide)', 1)]" ] }, "execution_count": 30, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# How many times does each NPO show up? - Should only be once\n", "collections.Counter(f_selection.values.flatten()).most_common()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Data check - validate results\n", "Make sure that the NPOs actually ranked their matched problem as problem" ] }, { "cell_type": "code", "execution_count": 33, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "10.5 Data analysis\n", "\tAnimals (and Humans) in Disaster, Inc (state-wide): 3 - A big problem for us\n", "\tNeurologic Music Therapy Services of Arizona: 3 - A big problem for us\n", "\tRealTimeSTEAM: 3 - A big problem for us\n", "9.4 Website or social media marketing\n", "\tImpact One Breast Cancer Foundation: 3 - A big problem for us\n", "\tLETI Foundation: 3 - A big problem for us\n", "\tPan de Vida Foundation: 3 - A big problem for us\n", "\tNewtown CDC: 3 - A big problem for us\n", "9.1 Keeping track of a person’s progress\n", "\tDog Rescue & Community Project Accelerator: 3 - A big problem for us\n", "\tNever Again Foundation: 3 - A big problem for us\n", "\tICM Food & Clothing Bank: 3 - A big problem for us\n", "\tHouse of Refuge: 2 - Need help with this\n", "8.9 Storing data on people\n", "\tBe A Leader Foundation: 3 - A big problem for us\n", "\tTranquility Trail Animal Sanctuary : 3 - A big problem for us\n", "\tLost Our Home Pet Rescue: 2 - Need help with this\n", "8.5 Sending customized emails\n", "\tRESCUE: 3 - A big problem for us\n", "\tUnlimited Potential : 3 - A big problem for us\n", "\tChildren's Cancer Network: 3 - A big problem for us\n", "8.0 Registration, sign-in, and sign-up forms\n", "\tSharing Down Syndrome Arizona: 3 - A big problem for us\n", "\tTempe Community Action Agency: 3 - A big problem for us\n", "\tCO+HOOTS Foundation: 2 - Need help with this\n", "8.0 Communication to volunteers\n", "\tPaz de Cristo Community Center: 2 - Need help with this\n", "\tCece’s Hope Center: 2 - Need help with this\n", "\tSwift youth foundation : 2 - Need help with this\n", "7.5 Inventory management system\n", "\tMatthew's Crossing Food Bank: 2 - Need help with this\n", "\tArizonans for Children: 2 - Need help with this\n" ] } ], "source": [ "for r in f_selection:\n", " print(r)\n", " # Remove all numbers so we can use this as the index \n", " problem = re.sub('[\\d\\.]+','',r).strip()\n", " \n", " npos = f_selection[r]\n", " s = pd.Series()\n", " for n in npos:\n", " if n != None and n != \"None\":\n", " survey_submission = df[df[\"Name of your non-profit or government agency\"] == n][problem].values[0]\n", " print(\"\\t%s: %s\" % (n,survey_submission))\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "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.5.5" } }, "nbformat": 4, "nbformat_minor": 2 }