Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Weekly Challenges

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語
IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

SUBMIT YOUR IDEA

Challenge #146: SANTALYTICS 2018 - Part 2

OldDogNewTricks
10 - Fireball

 

Attached is my solution.  I used a Python tool to do the website scraping (because why not?).  I navigate the pages if there are more than one (the provided scraping macro will miss data if the page count goes over 10) and I only add the valid solution types to the resulting data frame.  I then get down to a unique record per user in order to not double count solution postings.

 

For the monies distribution, I went with quantity over quality (as the 4+ star criteria is already applied) as well as the largest variety of items.  I also noticed that there were a few records with both the salesprice and msrp as null, I excluded those because I didn't figure anything was really free.

 

Spoiler
challenge_146_completed_screen.jpg

Result summary (before my posting):                             Result summary (after my posting):
challenge_146_completed_screen_summary.jpgchallenge_146_completed_screen_summary_after.jpg

Result detail (before my posting):
challenge_146_completed_screen_detail.jpg

 

Treyson
13 - Pulsar
13 - Pulsar

I thoroughly enjoyed this one. I went through @patrick_digan's idea of circling back with accumulated left over spend so I implemented that. I also split clothes up into boys and girls in order to make sure there was even spend there as well. 

 

I also tried to make a pretty report but I wasn't able to get a report that actually rendered to match what I created in the "visual layout" tool in the laboratory. 

 

Anyway. Here's Wonderwall

 

 

Spoiler
santalytics shopping list.png

 

Treyson Marks
Senior Analytics Engineer
Paul-Evans
9 - Comet

Here's my results:

Shopping summary.JPG Shopping list.JPG

 

Spoiler
For the solution count, I used an iterative macro to go through each page of responses and create a list of all .yxmd and .yxzp attachments. 

To select items to purchase, I
- randomly sorted the items after filtering for the given criteria,
- selected items by type until hitting the spend limit, and 
- matched the remaining spending amount to the item with the price closest to that amount.

Kenda
16 - Nebula
16 - Nebula
Spoiler
I wasn't sure if the 50/50 split meant number of items per category or amount spent in each category. I went with the amount spent per category. Before my post, there was $200 available to spend. I started with the given macro but modified it a bit (in pink).
Capture.PNG
mmenth
11 - Bolide

I like how open-ended this challenge was!

 

Spoiler
For my solution I was given $400 to work with, so I first split that up so that we could spend $200 on clothing and $200 on hygiene. Since there were so few clothing products after filtering out products without enough reviews, with reviews below 4, and unavailable or limited products, I didn't add any filters of my own. However, there were a lot of hygiene products to choose from after applying the filters mentioned above, so I decided to look up the the products that A Precious Child accepts on their website. I found a short list and added that to my workflow. A quick find and replace helped me filter down the original hygiene list to just those products that the nonprofit would accept. I then sorted by customer rating and took the top unique products based on the their acceptable product list.

For my approach I assumed variety is preferred, so for the two product categories I duplicated my narrowed-down lists 10 times each, sorted by the rowcount, and calculated a running total. I kept adding products to my shopping list until the running total met my spending limit. If I had a remainder left over, I grabbed another product that would minimize the overall remainder for that category grouping.

Overall my list has 28 unique products, with 71 products total!

Capture2.PNG
ggruccio
ACE Emeritus
ACE Emeritus

My approach goes after the higher ticket items...so maybe could help one specific family.

 

What a great cause!

egranberry
5 - Atom

This is a great idea! Happy holidays! 

aristiguieta
8 - Asteroid

I do many annotations (in the tool tags and as comments), so this may be helpful if you didn't know how to approach it.

 

I hope we get to the $2,000! 

 

:-)

aristiguieta
8 - Asteroid

By the way, there are not so many clothing items that qualify, so if we get more answers a workflow like this would benefit from making sure we do ten (at least a second) pass on the list of options.

 

Not to elegant but simple: Get 10 threads of the eligible items list, and "union" them into a large list before applying the "running totals".

jssandom
8 - Asteroid

$360 to play with.. decided to spread it out with one of each item.. 37 items purchased in total