<jupyter_start><jupyter_text>COVID-19 Israel Mapping based on app 'hamagen' data source at:https://gisweb.azureedge.net/Points.json<jupyter_code>import json
import pandas as pd
import datetime as dt
from urllib.request import urlopen

# reading from file
#with open('../data/hamagen/Points.json') as data_file:    
#    data = json.load(data_file)  
    
# can also read from url
data = json.loads(urlopen('https://gisweb.azureedge.net/Points.json').read())    

df = pd.json_normalize(data["features"])
df = df.drop(['id','type','geometry.type','properties.OBJECTID','properties.sourceOID','properties.Name', 'properties.stayTimes','properties.POINT_X','properties.POINT_Y'], axis=1)
df['x'] = df.apply(lambda x: x['geometry.coordinates'][0], axis=1)
df['y'] = df.apply(lambda x: x['geometry.coordinates'][1], axis=1)
df['from'] = df.apply(lambda x: dt.datetime.fromtimestamp(x['properties.fromTime']//1000), axis=1)
df['to'] = df.apply(lambda x: dt.datetime.fromtimestamp(x['properties.toTime']//1000), axis=1)
df = df.drop(['geometry.coordinates', 'properties.fromTime', 'properties.toTime'], axis=1)
df
import matplotlib.pyplot as plt

df.plot(kind="scatter",x='x', y='y', figsize=(6,6))
plt.show()

import wordcloud
from bidi.algorithm import get_display
import numpy as np

text = df['properties.Place'].values 
bidi_text = get_display(np.array2string(text))

wordcloud = wordcloud.WordCloud(font_path='/System/Library/Fonts/ArialHB.ttc').generate(str(bidi_text))
print(wordcloud)

plt.imshow(wordcloud)
plt.axis("off")
plt.figure(figsize=(40,20))
#plt.show()<jupyter_output><wordcloud.wordcloud.WordCloud object at 0x11ffc8450>
{'fraction_non_alphanumeric': 0.17380660954712362, 'fraction_numerical': 0.019583843329253364, 'mean_word_length': 6.569444444444445, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '339500', 'license': 'CC-BY-4.0', 'n_tokens_mistral': 591, 'n_tokens_neox': 572, 'n_words': 103, 'path': 'notebooks/covid-19-mapping.ipynb', 'repo_name': 'dror27/dror-ddj-notebooks', 'size': '1634'}