Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created December 22, 2020 08:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/899244ba0b798afbf17353c52b350af1 to your computer and use it in GitHub Desktop.
Save amankharwal/899244ba0b798afbf17353c52b350af1 to your computer and use it in GitHub Desktop.
housing = strat_train_set.copy()
print(housing.head())
# visualizing geographical data
housing.plot(kind='scatter', x='longitude', y='latitude', alpha=0.4, s=housing['population']/100, label='population',
figsize=(12, 8), c='median_house_value', cmap=plt.get_cmap('jet'), colorbar=True)
plt.legend()
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment