Last active
July 23, 2020 15:08
-
-
Save Nick3523/7e5bca83df602ef357e36004c463f623 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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