Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
from dataprep.data_connector import *
from dataprep.eda import *
# À obtenir via un compte twitter pour developpeur
client_id = '****************'
client_secret = '************************************************'
dc = Connector("twitter", _auth={"client_id":client_id, "client_secret":client_secret})
dc.show_schema("tweets")
df = dc.query("tweets", q="covid-19", _count=10000)
df.head()
cdf = df.copy()
cdf = cdf[cdf["iso_language_code"] == "en"].reset_index()
cdf.head()
plot(cdf, "text")
df_random = dc.query("tweets", q=False, _count=10000)
df_random = df_random[df_random["iso_language_code"] == "en"].reset_index()
plot(df_random, "text")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.