Created
May 16, 2018 14:45
-
-
Save WillKoehrsen/287b7f8fcf5c2b4bab755d79cebcec11 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a list of buildings with more than 100 measurements | |
types = data.dropna(subset=['score']) | |
types = types['Largest Property Use Type'].value_counts() | |
types = list(types[types.values > 100].index) | |
# Plot of distribution of scores for building categories | |
figsize(12, 10) | |
# Plot each building | |
for b_type in types: | |
# Select the building type | |
subset = data[data['Largest Property Use Type'] == b_type] | |
# Density plot of Energy Star scores | |
sns.kdeplot(subset['score'].dropna(), | |
label = b_type, shade = False, alpha = 0.8); | |
# label the plot | |
plt.xlabel('Energy Star Score', size = 20); plt.ylabel('Density', size = 20); | |
plt.title('Density Plot of Energy Star Scores by Building Type', size = 28); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment