I did the project, open to feedback

Here is what I came up with for this project: GitHub - iNeedToGitGood/US-Medical-Insurance-Costs: Codecademy portfolio project analyzing US Medical Insurance Costs

Open to feedback.

Some stuff this forum post template suggests I should say:

The project seemed like a good difficulty I guess. I could have tried to use pandas like it recommended but I wasn’t sure what to do with it yet, hopefully I get more experience with that over this course. When I reviewed the example solution after I finished, I realized I could have written a class and applied some other things that I guess I forgot about, hope to get more experience with those as well. The example solution also didn’t use pandas at all, wonder what coulda been done with it.

This took me a few hours I guess, once I got my main smokerCost function figured out I basically just lifted and shifted that function to apply to everything else with slight variations. I’m happy with most of the things I decided to compare.

Thanks for reading!

Hey!

I really like what you did with your project. You asked some great questions and I can see you put time and effort into this. :smiley:

I noticed the output in your BMI of smokers vs. non-smokers does not make sense - the number of someone’s BMI should be roughly between 18 and 30 - ish. Your output says : “The average smoker BMI is 3070.84.
The average non-smoker BMI is 3065.18.” Something must’ve gone wrong there that you might want to look at again?

Perhaps you would like to look at my project too. I didn’t do it as extensively as you though.

Cheers!

1 Like

Haha, I was multiplying the BMI value by 100 because I guess I thought I had to convert it from a decimal to a percent. Good catch!! I’ve fixed that and committed a fix to my main branch.

Your project looks great! A lot cleaner than mine. I probably should have cleaned mine up and not left a stream of my consciousness in the comments.

Nice use of the statistics module, I’d like to get more familiar with modules and utilize them more.

I noticed you used:

    else:
        pass

a couple places(when counting sex) . I don’t think that is necessary? I think you could just delete that and have the loop end on the last elif without issue? Like in the bmi_and_charges loop you just end on an elif.

I actually downloaded your codecademy_tori project to test if removing those lines would have any impact, and it appears it would not!

I did notice an issue with your upload to github when doing this though - you didn’t upload the insurance.csv file to github, so if anyone wanted to play with your project they would have to find the data you used elsewhere. It was easy for me, I already have insurance.csv since I just did this project myself. But it also looks like your codecademy_tori repository contains various projects, so I would recommend organizing this slightly better and ensuring that you upload all files necessary for each project. I plan on creating a new repository for each project I upload, so that all the files necessary for the project are in their own appropriately named repository. :grin:

Heya. Thanks a lot, that is super helpful feedback! You are right it is probably better to create a repository for each project rather than just having a “Codecademy” repository.

I think the else: pass thing is me being a perfectionist thinking I always have to finish the syntax clean with an “else” statement. Perhaps from my MATLAB days where I believe the code is unhappy if you don’t, hahha. Good to know that it worked without this line as well!

Cheers

1 Like