Ethan C.

asked • 07/13/21

Hashtag Co-occurrence Network

I would attach the annotations.csv file but the file is too large, instructions are in bold and needs to be in Python programming below:

from google.colab import drive

drive.mount('/content/gdrive')

# Give filepath here to the variable filepath

# filepath = '/content/gdrive/MyDrive/ColabNotebooks/annotations.csv'

filepath = '/content/gdrive/MyDrive/annotations.csv

# Import "pandas" package here

import pandas as pd

import numpy as np

import matplotlib.pyplot as plt        #visualisation

import seaborn as sns                  #Visualisation

%matplotlib inline

Create hashtag co-occurrence network: Extract hashtags from the data. Each hashtag is a node. We put an edge between two nodes (hashtags) if two hashtags appear in a tweet.

For the created graph, print number of nodes and number of edges.


1 Expert Answer

By:

Rize S. answered • 03/23/23

Tutor
New to Wyzant

Senior IT Certified Trainer, IT Developer & DBA Administrator

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.