<jupyter_start><jupyter_text>[OUTDATED!] Transform overall COVID-19 tweets- add country based on coordinates- store as csv<jupyter_code>hydrated_json = pd.read_json("../data/raw/Hydrated_Tweets.jsonl", lines=True)<jupyter_output><empty_output><jupyter_text>Drop faulty rows (i.e. rows without coordinates):<jupyter_code>hydrated_json = hydrated_json.drop(hydrated_json[hydrated_json['coordinates'].isnull()].index).reset_index(drop=True)<jupyter_output><empty_output><jupyter_text>Add country name based on coordinates:<jupyter_code>hydrated_json["country"] = ""
for i in range(len(hydrated_json)):
    hydrated_json["country"][i] = reverse_geocode.search(tuple([hydrated_json["geo"][i]["coordinates"],(1,1)]))[0]['country'] #second tuple is to avoid error
len(hydrated_json["country"].unique())<jupyter_output><empty_output><jupyter_text>Export dataset as CSV:<jupyter_code>hydrated_json.to_csv("../data/interim/Hydrated_Tweets_with_countries.csv")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1491317671092952, 'fraction_numerical': 0.005107252298263534, 'mean_word_length': 11.727272727272727, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '8525', 'license': 'MIT', 'n_tokens_mistral': 369, 'n_tokens_neox': 348, 'n_words': 43, 'path': 'notebooks/01_AM_Transform_Covid_Tweets.ipynb', 'repo_name': 'Madhour/CovaxAnalytica', 'size': '979'}