Presentation is loading. Please wait.

Presentation is loading. Please wait.

Abigail Sydnes, Dmitriy Yarmaliuk, Dawson Allen, Shawn Billy

Similar presentations


Presentation on theme: "Abigail Sydnes, Dmitriy Yarmaliuk, Dawson Allen, Shawn Billy"— Presentation transcript:

1 Abigail Sydnes, Dmitriy Yarmaliuk, Dawson Allen, Shawn Billy
Temple Analytics Abigail Sydnes, Dmitriy Yarmaliuk, Dawson Allen, Shawn Billy

2 Can small independent pharmacies compete with the big chains?
Are there specific products that a pharmacy should always have in stock? How do we identify those products? Are there certain products or product categories that are not generating sufficient revenue and therefore should not be carried? Approach: Obtained the top/bottom 10 products sold for each season Used Pandas for parsing data Utilized Tableau to create graphical representation of the data

3 Reading in data from CSV file
# headers that exist in the given csv file headers = ['BSKT_ID', 'PHRMCY_NBR', 'PROD_NBR', 'SLS_DTE_NBR', 'POS_AMT' , 'SLS_QTY'] # reads the csv file using the specified headers while then converting it to a data-frame assigned to a variable yang yang = pd.read_csv( 'AlexionPOSTrans(Big).csv' , sep=',' , header=0 , names=headers)

4 Creating a dictionary of data frames corresponding to each month
# iterating through total range of dates and total entries # converts the read in csv file to dictionary from pandas dataframe for n in range(date,tot_entries): # steps through each data-frame looking for a change in date if yang.iloc[n, 3] != unique_dates[date]: dictionary[index] = pd.DataFrame(columns=headers) # makes dictionary entry data-frame dictionary[index]= yang.iloc[i:n] # adds data-frames to dictionary when date changes date = date + 1 # increments to the next unique date i = n # sets location of date change index = index + 1 # increments the current index dictionary[index] = yang.iloc[i:tot_entries] # adds last month of data-frames to dictionary

5 Counting the number of times a given product is sold
for n in range(0,tot_entries): # loops through number of entries # if current data-frame matches current product number if x.iloc[n, 2] == unique_prod[prod]: num_sold = num_sold + x.iloc[n, 5] #sum number sold #tot_profit = tot_profit + x.iloc[n, 4] #increment total profit storage = [x.iloc[n, 2], num_sold] #store results in a list # if current data-frame does not match the current product number if x.iloc[n, 2] != unique_prod[prod]: list_storage.append(storage) # append temp storage to permanent list prod = prod + 1 # increment product index num_sold = x.iloc[n, 5] # reset num_sold with first new product #tot_profit = x.iloc[n, 4] # index of total profit storage = [x.iloc[n, 2], num_sold] # store first entry list_storage.sort(key = lambda x: x[1]) #sort list of lists by prod_number

6 Tableau separates data into dimensions, discrete categorical information, or measurements, numerical information. Allows a multitude of ways to describe the data from scatter plots to box and whiskers plots depending on the need. Columns and rows can be dictated by what factors are used. Example: A Pie Chart where the Product subcategory (color) is broken down by season. Each angle slice is based on the sum of quantity sold

7

8

9

10 Can small independent pharmacies compete with the big chains?
Are there product categories not being carried that should be? How do geographic or economic variables factor into the products a pharmacy should carry? Approach: Used Excel to parse the data Utilized Tableau to create graphical representation of the data

11 From the Excel file the following sheets were used:
Pharmacy Master - Pharmacy Number, State Code Product Master - Product Number, Product Description Product Transaction - Product Number , Pharmacy Number, In order to easily import the excel data to Tableau all the State Codes and Product Descriptions were added to the Product Transaction sheet using VLOOKUP

12 =VLOOKUP uses the following inputs:
Value you want to look up Range where you want to lookup the value Column number in the range containing the return value Exact Match or Approximate Match – indicated as 0/FALSE or 1/TRUE

13 Example: =VLOOKUP(D26,'PROD MASTER'!$A$2:$B$189053,2, FALSE) Takes in the value contained in cell D26 Looks in the Product Master sheet containing all the Product numbers and Descriptions that exist from A2 to B189053 Dollar signs used so that the lookup table is fixed throughout Return the the value in column 2 that corresponds to the found value It has to be an exact match to return a value

14

15


Download ppt "Abigail Sydnes, Dmitriy Yarmaliuk, Dawson Allen, Shawn Billy"

Similar presentations


Ads by Google