rng = np.random.RandomState(0)
x = df['population']
y = df['Area']
colors = {'North America':'red', 'Europe':'green', 'Asia':'blue', 'Australia':'yellow'}
plt.scatter(x, y, s=100*df['population'], alpha=0.3,
c= df['continent'].map(colors),
cmap='viridis')
plt.colorbar();
# Get Unique continents
color_labels = df['continent'].unique()
# List of colors in the color palettes
rgb_values = sns.color_palette("Set2", 4)
# Map continents to the colors
color_map = dict(zip(color_labels, rgb_values))
# Finally use the mapped values
plt.scatter(df['population'], df['Area'], c=df['continent'].map(color_map))