mirror of
https://github.com/netzbegruenung/social-spider.git
synced 2024-05-04 19:53:40 +02:00
remove unused parts
This commit is contained in:
parent
f63a68d91e
commit
c052384426
|
@ -1,35 +0,0 @@
|
|||
import json
|
||||
|
||||
|
||||
def createBundeslaenderMap(filename, column):
|
||||
with open("maps/bundeslaender_simplify200.geojson") as map_f:
|
||||
maps = json.load(map_f)
|
||||
with open("docs/result.json") as result_f:
|
||||
result = json.load(result_f)
|
||||
minimum = 1000000
|
||||
maximum = -1
|
||||
for _, elem in result.items():
|
||||
if elem[0] != "LV":
|
||||
continue
|
||||
if elem[column] < minimum:
|
||||
minimum = elem[column]
|
||||
if elem[column] > maximum:
|
||||
maximum = elem[column]
|
||||
print(maximum)
|
||||
for feature in maps["features"]:
|
||||
name = feature["properties"]["GEN"]
|
||||
for _, elem in result.items():
|
||||
if elem[0] != "LV":
|
||||
continue
|
||||
if elem[1] != name:
|
||||
continue
|
||||
feature["properties"]["fill-opacity"] = elem[column] / maximum
|
||||
feature["properties"]["fill"] = "#00ff00"
|
||||
with open("maps/bundeslaender_" + filename + ".geojson", "w") as output_f:
|
||||
json.dump(maps, output_f)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
createBundeslaenderMap("facebookLikes", 5)
|
||||
createBundeslaenderMap("twitterFollower", 7)
|
||||
createBundeslaenderMap("instaFollower", 9)
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
15762
result.yaml
15762
result.yaml
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue