Commit 1a1fa27d authored by Rémy Decoupes's avatar Rémy Decoupes
Browse files

Add a work around about over tweets.jsonl: convert all single quote into double quote

parent dcdfe591
......@@ -51,3 +51,4 @@
2. Verify if kibana is working (and is connected to elasticsearch)
+ With your favorite browser connect to [Mood tetis kibana website](http://mo-mood-tetis-tweets-collect.montpellier.irstea.priv:5601/app/home#/)
+ Create an index pattern through Analytics > Discover
3. Edit tweets jsonl file: transform the single quote to double quote: `python3 elasticsearch/src/`
# from
import json
import ast
fr = open("/home/rdecoupe/mood-tetis-tweets-collect/output/tweetoutput20200622-093342.jsonl")
fw = open("/home/rdecoupe/mood-tetis-tweets-collect/output.doublequote/tweetoutput20200622-093342.jsonl", "w")
for line in fr:
json_dat = json.dumps(ast.literal_eval(line))
dict_dat = json.loads(json_dat)
json.dump(dict_dat, fw)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment