Skip to content

Commit

Permalink
Remove twitter source
Browse files Browse the repository at this point in the history
  • Loading branch information
pbong committed Aug 17, 2023
1 parent 8d9e8db commit dd8ab41
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions callbacks/home/plot_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,17 @@ def convert_to_data_by_sense(contextual_info, sense_ids, pos_list):
sources = contextual_info[i]
for categories in sources:
for title in sources[categories]:
for year in sources[categories][title]:
pos = ''
if pos:
pos = pos_list[i]
sense_and_pos = sense_and_pos_text(f'Sense {i+1}', pos)
category = sanitize_category(categories)

entry = [sources[categories][title][year], year,
title, category, sense_ids[i], sense_and_pos]
data_matrix.append(entry)
if title != 'twitter':
for year in sources[categories][title]:
pos = ''
if pos:
pos = pos_list[i]
sense_and_pos = sense_and_pos_text(f'Sense {i+1}', pos)
category = sanitize_category(categories)

entry = [sources[categories][title][year], year,
title, category, sense_ids[i], sense_and_pos]
data_matrix.append(entry)

return pd.DataFrame(data_matrix, columns=['counts', 'year', 'source', 'category', 'sense', 'sense_and_pos'])

Expand Down

0 comments on commit dd8ab41

Please sign in to comment.