Created
February 5, 2018 00:59
-
-
Save ei-grad/1355223cd8a3c6ba16deb454ddef50b4 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
from sklearn.datasets import make_blobs | |
import numpy as np | |
coords, counties = make_blobs(1000, centers=20) | |
values = np.random.randint(0, 100, [20]) | |
with open("input.csv", "w") as f: | |
f.write('Town,X,Y,County,Value\n') | |
for town, ((lon, lat), county) in enumerate(zip(coords, counties), 1): | |
f.write('Town%d,%.2f,%.2f,County%d,%d\n' % (town, lat, lon, county, values[county])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://stackoverflow.com/questions/48253800/shading-a-map-according-to-data-for-a-set-of-coordinates