Created
February 14, 2023 13:13
-
-
Save rinsuki/f12eaa2e1c19a4c5e187b93b3d4cd90a to your computer and use it in GitHub Desktop.
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
import json | |
import sys | |
with open(sys.argv[1], "r") as f: | |
data = json.load(f) | |
out = [] | |
for checkin in data: | |
if checkin.get("private", False): | |
continue | |
should_skip = False | |
for category in checkin["venue"]["categories"]: | |
if category["name"].endswith("駅"): | |
should_skip = True | |
break | |
if should_skip: | |
continue | |
location = checkin["venue"]["location"] | |
out.append({ | |
"lat": location["lat"], | |
"lng": location["lng"], | |
}) | |
print(json.dumps(out)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment