Appreciate your feedback and suggestions on my guided project : Visualizing The Gender Gap In College Degrees

Hi everyone,

I just finished my guided project : Visualizing The Gender Gap In College Degrees. As a newbie, I would like to use these projects to gain more experience and knowledge in my data science journey.
I would really appreciate if any of you can review my project and give me a feedback on my work.
Thank your and Regards
Scylla

Gender-Gap.ipynb (965.9 KB)

Click here to view the jupyter notebook file in a new tab

4 Likes

Hi @Scylla,

Good to see you again. It is an interesting project indeed. I like how you have structured it.

But I was wondering if it would be better if you had deviated from the instructions like you have done for the initial structuring of the project and combined all the plot aetestic imporvement into one code block.

That way you wouldn’t be repeating a bunch of lines again and again just to make a few ticks and lines disappear.

A few things that might be useful to know are.

  ax1.tick_params(bottom="off", top="off", left="off", right="off", labelbottom='off')

Some times depending your version, On/Off might not work. Then you can try True/False

#Removes the spines for the all axis of all plots in first column
    ax1.spines["top"].set_visible(False)
    ax1.spines["right"].set_visible(False)
    ax1.spines["bottom"].set_visible(False)
    ax1.spines["left"].set_visible(False)

The above mentioned code can be changed to

for spine in ax.spines.values():   # Removing all 4 spines of a plot
        spine.set_visible(False)

Since ax.spines is stored as a dictionary, we can access the keys and values. So by using .values() you can select each spine and apply an operation.

You can alternatively use

for key,spine in ax.spines.items():      
        spine.set_visible(False)

I think that’s all from my side.
I have seen a few projects with quite clever loop to create the same results with very less number of lines of codes. I’m just mentioning that here in case you want to check some of the projects.

Anyway, I hope that you will find this useful. Happy learning.

3 Likes

Hi @jithins123,

Thank you very much for reviewing my project and making valuable comments on it.
I always like your reviews as you give some valuable suggestions and advices in every review.
I agree with your point that I could combine all the plot aesthetic improvement into one code block. As well as I will consider all other suggestions that you have made and will revise my project accordingly.

I highly appreciate your feedbacks.
Cheers
Scylla

3 Likes

Thank you so much for your kind and encouraging words Scylla. Glad you appreciate my efforts. I’m just returning all the help that I’m receiving here.

2 Likes

Hi Everyone,

I made few changes to my project by considering the suggestions and advices given by @jithins123. I was able to optimize my cods significantly through nested loop and the spine removal method suggested by @jithins123.
I herewith attached my revised project and kindly request you all to review it and give feedbacks.
Your feedback is highly appreciated.
Cheers
Scylla
Gender-Gap-revised.ipynb (207.2 KB)

Click here to view the jupyter notebook file in a new tab

2 Likes

This looks so much cleaner now. Isn’t it! Nice work.
Just wondering the if statements v/s if elif statement make any difference for the text annotation.

Hi @jithins123,

Yes. In general and standard practice elif would the best option. However, I think that it wont be an issue here of using if instead of elif because I have written that code block in ordered manner. Isn’t it?

Cheers
Scylla

2 Likes

Just wanted to check if it was your conscious decision. Now that I know, all good.

2 Likes