-
Notifications
You must be signed in to change notification settings - Fork 3
/
0813wed_map.py
32 lines (32 loc) · 1.43 KB
/
0813wed_map.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import numpy as np
c = np.array([[408584,373005,362979,67803,1744890],
[165463,141393,119364,33829,794537],
[133822,138642,71470,26249,601859],
[104363,78024,296050,15641,983723],
[72673,114008,89389,23618,1653489],
[75984,81002,291466,13242,650882],
[51572,33034,35616,9685,525794],
[35339,24676,21647,8793,148807],
[41037,50642,14932,13567,41827],
[40798,43370,22797,8153,228744],
[32952,68297,207895,17338,208895],
[10501,8517,70377,4204,37422],
[30955,28006,9855,7709,30908],
[17578,334472,74129,48278,69826],
[21448,45170,161122,11444,130039],
[15098,40259,120151,11249,226420],
[17491,15548,7044,3482,33917],
[9364,24409,74714,7725,166537],
[4757,19010,8727,5748,51962],
[6724,8394,27503,3213,27849]])
d=np.log(np.sum(c[:,:3],1)*1.0/np.sum(c[:,:3]))
# d *= 1/d.max()
off=4
mn = d.min()
22*(d-mn+off)/((d-mn+off).max())
ct = ['newyork', 'losangeles', 'chicago', 'sanfrancisco', 'london',
'washington', 'seattle', 'amsterdam', 'houston', 'atlanta', 'paris',
'stockholm', 'indianapolis', 'moscow', 'barcelona', 'berlin', 'stlouis',
'rome', 'prague', 'helsinki']
for n, v in zip(ct, 20*(d-mn+off)/((d-mn+off).max())):
print("#{}-label {{font-size: {}pt}}".format(n, v))