Guided Project_ Visualizing The Gender Gap In College Degrees

Hi everyone,

Here is my new guided project. This time it was less challenging than usual, I was even surprised :blush:

Please have a look at the link below and let me know your thoughts about it. What can be corrected, or improved, or made in a more elegant way, whether you agree or not with my conclusions. Any your feedback will be really precious for me.

Thanks a lot!

https://app.dataquest.io/m/149/guided-project%3A-visualizing-the-gender-gap-in-college-degrees/6/exporting-to-a-file

Visualizing The Gender Gap In College Degrees.ipynb (902.4 KB)

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

3 Likes

Hi @Elena_Kosourova

I agree with you that this was less challenging than usual.
I think you already know how you could have shortened the number of codes by combining all the cosmetic changes and everything in one code cell.

I have found in one of the community discussions that the below code

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

This can be used with one iterating variable

key in ax.spines.values():

I think this way the code is easier to understand than with 2 variables. Both works fine though.

Also in the below code

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

I had to use False instead of off. I think it was because of the version changes. Maybe next time if you are working on a latest/old version and if it
didn’t work try boolean values instead of ON/OFF.

I feel that our conclusions can vary depending on how we interpret certain things based on our perspectives, philosophies and life lessons. So I think your conclusions are quite good. They are strictly based on the data, that is what I felt.
Anyway good to see yet another great project from you. Looking forward for more.

1 Like

Hi @jithins123,

Thanks a lot for your attention to my project and valuable suggestions. In fact, in this way the code looks much more concise, and I don’t understand why in the pre-written version it occupied 4 lines, and especially why I didn’t change it with at least the code with 2 variables :slightly_smiling_face: Good advice also about off / False. This time I was doing the project directly on DQ jupyter, but when doing on my local machine the version can be different, so it was good to know.

Thanks again and happy coding!

1 Like

Yea, pre-written code didn’t talk about the alternate way. I always do on my jupyter notebook and it didn’t work. So I had to find out about the boolean update.

Also, while sharing the project I have seen a few people previously used only one block of code instead of the 3 blocks that we’ve used. So maybe that could be an improvement we both can look forward to work in the future.

Hi everyone,

After almost a year, I finally adjusted this project, already when it doesn’t exist anymore on DQ! :joy: Better late then never :slightly_smiling_face:

Now it definitely looks much more laconic and easy-to-follow. More surprising: after one year it doesn’t seem to me so simple as before. When it comes to optimize the code, the things are actually not always so straightforward.

Hope my code will be useful.

Visualizing The Gender Gap In College Degrees.ipynb (437.0 KB)

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