Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assignment 7: Last question seaborn plot #867

Open
sagniksom opened this issue Oct 25, 2024 · 2 comments
Open

Assignment 7: Last question seaborn plot #867

sagniksom opened this issue Oct 25, 2024 · 2 comments

Comments

@sagniksom
Copy link

sagniksom commented Oct 25, 2024

I am having an issue where my plot in the last question seems to have more data points than the example shown.

Example shown:
image

My plots:
image

Here is the snippet of code that filters from world data:

world_data_2014 = world_data[world_data['year'] >= 2014]
ax = sns.relplot(x='children_per_woman', y='years_in_school_women', data=world_data_2014, kind='scatter', hue='income_group', col='region', col_wrap=3)
ax.set_axis_labels('children_per_woman', 'years_in_school_women')
plt.savefig('som_sagnik_plot.png')

You will notice that there are fewer data points in the example than in mine. I printed the dataframe and noticed that there are many values close together. Am I doing something wrong or this is just a newer dataset?

@RayNele
Copy link

RayNele commented Oct 25, 2024

I can't tell for sure without looking at the rest of the code, but I think the question wants all data from 2014, but you've done all data from 2014 and later (>=)

@sagniksom
Copy link
Author

Ah I think that was the mistake, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants