Wednesday, 1 May 2019

[Misc] I created a one-click program where you enter the ingredients of two products and it compares the similarities and differences in each formulation.

Beauty Tips For Body Care
Hi all,After reading My Dad The Chemist article on the formulation change of the CeraVe PM Moisturizing Lotion, I had noticed that she wrote a python script that compared the two different formulations. I thought this was a brilliant idea, and with my interest in programming, I wanted to take her script and add my own touch to it.DISCLAIMER: The original idea and initial python script comes from My Dad The Chemist. Absolutely all credit goes to her.With that being said, I wanted to turn her script into an application that only requires one-click! I also wanted to change it so that it could be used universally and no programming experience is needed. I am assuming that her initial script was developed so that it could work on her own computer, simply as a way to produce her results for the aforementioned article. Though, she did provide a link to the script; I am assuming it was so that others could run it on their own or be able to modify it (that is what I am hoping at least). If I am in the wrong in any way, please do not hesitate to tell me, and I will take it down immediately. However, this is the joy of programming, one script can lead to another, and lead to another. They can always be further developed, which is why open-source is such a big thing now. Sorry, I totally went on a tangent!Therefore, with that being said, here is the link to download the program: I call it, Compare Products (how original hahaha).Below I will explain the steps on how to use the program (it is not difficult and I feel anyone will be able to use it, computer-savvy or not).Click this link and download the .zip folder from Google Drive.Once downloaded, locate the .zip folder. (I would personally drag it to your desktop).Unzip the folder. This will make it so that you can access the program.To unzip the folder on Windows, right click on the folder > Extract All > Click Extract.To unzip the folder on Mac, simply double click on the zipped folder.You will see 2 files: Compare Formulas and Ingredients'Compare Formulas.exe' is the application.'Ingredients.csv' is an excel sheet.*Please note that the application and ingredients file must be in the same folder for the program to work.Okay, so you have made it this far! Now comes the exciting part (or so I think it is exciting). Let's focus on the Ingredients.csv file.Go online and find the ingredient list of 2 products you want to compare to one another. Please note that each ingredient must be separated by commas (,). For example: water, glycerin, hyaluronic acid, etc.Now open the the 'Ingredients.csv' file.Within the 'Ingredients.csv' file:Paste the ingredient list of your first product in Cell A1.Go to the Data tab at the top, and click 'Text to Columns'Once the 'Text to Columns' box is open, select 'Delimited'Click NextUncheck 'Tab' and Check 'Comma'Click NextClick FinishThe steps above essentially take your comma separated ingredient list and puts each ingredient in a different column. It will now look like:ABCWaterGlycerinHyaluronic AcidFollow these exact steps with your second product ingredient list, except paste the second ingredient list into Cell A2. Again, go to Data > 'Text to Columns" > Next > Uncheck 'Tab' and Check 'Comma' > Next > Finish.You should now have the ingredient lists of each product in their own separate columns for rows 1 and 2. It should look something like this:ABC1WaterGlycerinHyaluronic Acid2UreaSalicylic acidRetinolOnce you have your excel table, save it (keep it as .csv), and close it. Note: you may get a pop up when trying to save/close excel, simply click yes and it will either close on it's on or you can just close it again. Just make sure the file is saved!Double click 'Compare Formulas' and you are done! A text file will appear on your desktop named: Ingredient Comparison.txt.Within the text file you will see the following:Ingredients in both formulas:This shows the identical ingredients in each of the products formulations / ingredient list.Ingredients in the second formula but not in the first formula:The ingredients in the second product but not the first (this would be Row 2)Ingredients in the first formula but not in the second formula:The ingredients in the first product but not the second (this would be Row 1)These next few lines are used mainly for product formulation changes. For example, in My Dad The Chemist article, she compares the old and new formulation of CeraVe PM Moisturizing Lotion:Comparison: More in first formula (comes earlier in first ingredient list than second ingredient list):This shows whether or not an ingredient has been add higher up in the list in the formula pasted into Row 1. Say the company had Niacinamide in both the new and old formula, however, in the old formula it was listed as the 10th ingredient. If in the new formula Niacinamide is listed higher than the 10th ingredient (ie., 1 - 9), it will be listed here.Comparison: More in second formula (comes earlier in second ingredient list than first ingredient list):This shows whether or not an ingredient has been add higher up in the list in the formula pasted into Row 2. Say the company had Dimethicone in both the new and old formula, however, in the new formula it was listed as the 14th ingredient. If in the old formula Niacinamide is listed higher than the 14th ingredient (ie., 1 - 13), it will be listed here.Ingredients in same order (same placement on both ingredient lists):This will show the ingredients found in the exact same spot on both old and new formulations. Say Fragrance was listed as the 7th ingredient on both formulations, it will be listen here.At that is it! Again, all credit goes to My Dad the Chemist. I do not know if she is a user on reddit, however, if she is, feel free to tag her, thank her, and give props to her! If it was not for her, this would not have been created!If you have any questions, do not hesitate to ask. I am more than happy to help! I think I explained the steps fairly well, however, be patient the first time, it may take a bit of getting used too. If there is anything else, comment down below! I am proud of myself for doing this. I am brand new to programming but love learning it; this taught me a lot! And hey, if people like this, I may be able to add on or change it up based on recommendations, etc. We'll see! I look forward to your trying it out and see how you like it. Hopefully it will help out some of you fellow formulation junkies!TLDR: I created a one click program that compares product ingredients, download here: Compare Products. Enter ingredients into the excel file. Run the program. Get a text file on your desktop comparing the ingredients in each product formula.EDIT:After testing this on my other computer, I noticed a few issues when downloading and/or opening the file for the first time:When you open up the link to the .zip file, you can find the download button in the top right corner.If you are using Chome, it may give you a warning saying "Compare Products.zip is not commonly downloaded and may be dangerious". To by pass this warning, click the arrow beside 'Discard' and Select 'Keep'If you are on Windows, when you go to Extract the .zip folder, Windows Defender (the built in anti-virus windows provides) may give you a warning. Select 'More Options' and click 'Keep anyway'.If you find any other errors, feel free to post and I will add them the the list! Thanks.
Girls Blog 2015
Submitted by JustAnotherPersonOnR

No comments:

Post a Comment