This file contains hidden or 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
| # set number of clusters | |
| kclusters = 5 | |
| #Drop categorical variables | |
| clustering = coffee_shops_population.drop(['Neighborhood', 'District', 'Latitude', 'Longitude'], 1) | |
| # Normalizing over the standard deviation | |
| from sklearn.preprocessing import StandardScaler | |
| X = clustering.values[:,1:] | |
| X = np.nan_to_num(X) |
This file contains hidden or 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
| Population & Demographics Data | Geographical Data | Location Data | |
|---|---|---|---|
| The list of neighborhoods in each district | Coordinates | The list of coffee shops | |
| The population of each neighborhood | Neighborhood boundaries |