I am trying to import a file that was saved using json.dumps and contains the coordinates of the tweets:
{ "type": "Point", "coordinates": [ -4.62352292, 55.44787441 ] }
My code is:
>>> import json >>> data = json.loads('/Users/JoshuaHawley/clean1.txt')
But every time I get an error:
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
I want to finish extracting all the coordinates and saving them separately to another file so that later they can be matched, but this seemingly simple problem - this prevents me from doing this. I looked at the answers to similar errors, but it seems I can not apply them to this. Any help would be appreciated as I am relatively new to python.
json python
Jth
source share