<jupyter_start><jupyter_text>Crytocurrency Short formsAUR - AuroracoinBCC - BitConnect (inactive)BCH - Bitcoin CashBTC or XBT - BitcoinDASH - DashDOGE or XDG - DogecoinEOS - EOS.IOETC - Ethereum ClassicETH - Ether (also known as Ethereum)GRC - GridcoinLTC - LitecoinKOI or COYE - Coinye (inactive)MZC - MazacoinNano - NanoNEO - NeoNMC - NamecoinNxt - NXTPOT - PotCoinPPC - PeercoinTIT - TitcoinUSDC - USD Coin (stablecoin)USDT - TetherVTC - VertcoinXEM - NEMXLM - StellarXMR - MoneroXPM - PrimecoinXRP - RippleXVG - VergeZEC - Zcash<jupyter_code># Scrapping 7 different types of Cryptocurrency
BTC = api.search('bitcoin',count=200, lang='en', tweet_mode='extended')
ETH = api.search('Ethereum', count=200, lang='en', tweet_mode='extended')
USDT = api.search('tether', count=200, lang='en', tweet_mode='extended')
XRP = api.search('Ripple', count=200, lang='en', tweet_mode='extended')
BCH = api.search('bitcoin cash', count=200, lang='en', tweet_mode='extended')
LTC= api.search('litecoin', count=200, lang='en', tweet_mode='extended')
VTC = api.search('vertcoin', count=200, lang='en', tweet_mode='extended')
# Creating dataframes for different currency:
df1 = pd.DataFrame(data=[tweet.full_text for tweet in BTC], columns=['original_Tweets'])
df2 = pd.DataFrame(data=[tweet.full_text for tweet in ETH], columns=['original_Tweets'])
df3 = pd.DataFrame(data=[tweet.full_text for tweet in USDT], columns=['original_Tweets'])
df4 = pd.DataFrame(data=[tweet.full_text for tweet in XRP], columns=['original_Tweets'])
df5 = pd.DataFrame(data=[tweet.full_text for tweet in BCH], columns=['original_Tweets'])
df6 = pd.DataFrame(data=[tweet.full_text for tweet in LTC], columns=['original_Tweets'])
df7 = pd.DataFrame(data=[tweet.full_text for tweet in VTC], columns=['original_Tweets'])
# We display the first 10 elements of the dataframe:
df7.head()
# Creating a shortform list and adding a column 'currency' in respective dataframe for future filtering:
cur = ['BTC','ETH','USDT','XRP','BCH','LTC','VTC']

df1['Currency'] = cur[0]
df2['Currency'] = cur[1]
df3['Currency'] = cur[2]
df4['Currency'] = cur[3]
df5['Currency'] = cur[4]
df6['Currency'] = cur[5]
df7['Currency'] = cur[6]
df1.head()
df2.head()
# add relevant data:
#BTC
df1['len']  = np.array([len(tweet.full_text) for tweet in BTC])
df1['ID']   = np.array([tweet.id for tweet in BTC])
df1['Date'] = np.array([tweet.created_at for tweet in BTC])
df1['Source'] = np.array([tweet.source for tweet in BTC])
df1['Likes']  = np.array([tweet.favorite_count for tweet in BTC])
df1['RTs']    = np.array([tweet.retweet_count for tweet in BTC])

#ETH
df2['len']  = np.array([len(tweet.full_text) for tweet in ETH])
df2['ID']   = np.array([tweet.id for tweet in ETH])
df2['Date'] = np.array([tweet.created_at for tweet in ETH])
df2['Source'] = np.array([tweet.source for tweet in ETH])
df2['Likes']  = np.array([tweet.favorite_count for tweet in ETH])
df2['RTs']    = np.array([tweet.retweet_count for tweet in ETH])

#USDT
df3['len']  = np.array([len(tweet.full_text) for tweet in USDT])
df3['ID']   = np.array([tweet.id for tweet in USDT])
df3['Date'] = np.array([tweet.created_at for tweet in USDT])
df3['Source'] = np.array([tweet.source for tweet in USDT])
df3['Likes']  = np.array([tweet.favorite_count for tweet in USDT])
df3['RTs']    = np.array([tweet.retweet_count for tweet in USDT])

#XRP
df4['len']  = np.array([len(tweet.full_text) for tweet in XRP])
df4['ID']   = np.array([tweet.id for tweet in XRP])
df4['Date'] = np.array([tweet.created_at for tweet in XRP])
df4['Source'] = np.array([tweet.source for tweet in XRP])
df4['Likes']  = np.array([tweet.favorite_count for tweet in XRP])
df4['RTs']    = np.array([tweet.retweet_count for tweet in XRP])


#BCH
df5['len']  = np.array([len(tweet.full_text) for tweet in BCH])
df5['ID']   = np.array([tweet.id for tweet in BCH])
df5['Date'] = np.array([tweet.created_at for tweet in BCH])
df5['Source'] = np.array([tweet.source for tweet in BCH])
df5['Likes']  = np.array([tweet.favorite_count for tweet in BCH])
df5['RTs']    = np.array([tweet.retweet_count for tweet in BCH])

#LTC
df6['len']  = np.array([len(tweet.full_text) for tweet in LTC])
df6['ID']   = np.array([tweet.id for tweet in LTC])
df6['Date'] = np.array([tweet.created_at for tweet in LTC])
df6['Source'] = np.array([tweet.source for tweet in LTC])
df6['Likes']  = np.array([tweet.favorite_count for tweet in LTC])
df6['RTs']    = np.array([tweet.retweet_count for tweet in LTC])

#VTC
df7['len']  = np.array([len(tweet.full_text) for tweet in VTC])
df7['ID']   = np.array([tweet.id for tweet in VTC])
df7['Date'] = np.array([tweet.created_at for tweet in VTC])
df7['Source'] = np.array([tweet.source for tweet in VTC])
df7['Likes']  = np.array([tweet.favorite_count for tweet in VTC])
df7['RTs']    = np.array([tweet.retweet_count for tweet in VTC])
# Display of first 10 elements from dataframe:
display(df1.head(10), df2.head(10))
final_df = pd.concat([df1,df2,df3,df4,df5,df6])
final_df
# dataframe to be stored in CSV file
final_df.to_csv('Cryptocurrencytweetsscraping.csv')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16984845502853768, 'fraction_numerical': 0.020468411729974413, 'mean_word_length': 5.6, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '397965', 'license': 'Apache-2.0', 'n_tokens_mistral': 2053, 'n_tokens_neox': 1933, 'n_words': 469, 'path': 'CrytpocurrencyTweets Scraping using Twitter API Notebook .ipynb', 'repo_name': 'astar313/Cryptocurrency_Sentimental_Analysis_Price_Prediction', 'size': '5081'}