<jupyter_start><jupyter_text>sentiment analysis investigating the impact of community opinion on the price of cryptocurrencies marketlooking at the top 5 cryptocurrencies. bitcoin , etheruem , litecoin, NEO coin, ADA coin  hypothesis- there is a linear correlation between sentiment score and the price- the more source we add to the model the more occurate  result we get  vader lexicon in nltkVADER (Valence Aware Dictionary and sEntiment Reasoner) is a lexicon and rule-based sentiment analysis tool that is specifically attuned to sentiments expressed in social media. It is fully open-sourced under the [MIT License].<jupyter_code>import pandas as pd
from scipy.stats import spearmanr, pearsonr
import matplotlib.pyplot as plt
def pearsonr_correaltion(x1, x2):
    corr = pearsonr(x1, x2)
    if corr[1] <= 0.05:
        return corr
print("ticker ::corr:: p_value")
for ticker in ["ada", "bch", "btc", "eos", "eth", "ltc", "neo", "xrp"]:
    data = pd.read_csv(f"../data/vader_{ticker}.csv")
    # data =data[data.time>'2017-01-01']
    # data =data[data.time>'2017-12-29']
    corr = pearsonr_correaltion(data.mid, data.score_reddit)
    if corr is not None:
        print(f"{ticker.upper()}    ::{corr[0]:.2f}:: {corr[1]}")
for ticker in ['ada','bch','btc','eos','eth','ltc','neo','xrp']:
    data = pd.read_csv(f'../data/vader_{ticker}.csv')
    #data =data[data.time>'2017-01-01']
    #data =data[data.time>'2017-12-29']
    corr = pearsonr_correaltion(data.mid,data.score_btt)
    if corr is not None:
        print(f"{ticker}::{corr[0]:.2f}, with p_value {corr[1]}")
for ticker in ['ada','bch','btc','eos','eth','ltc','neo','xrp']:
    data = pd.read_csv(f'../data/vader_{ticker}.csv')
    #data =data[data.time>'2017-01-01']
    #data =data[data.time>'2017-12-29']
    corr = pearsonr_correaltion(data.mid,data.score)
    if corr is not None:
        print(f"{ticker}::{corr[0]:.2f}, with p_value {corr[1]}")<jupyter_output>ada::0.50, with p_value 3.381776601050529e-23
bch::0.11, with p_value 0.049326729313279485
btc::0.30, with p_value 2.995801264473421e-12
eos::0.38, with p_value 2.743469599818487e-13
eth::0.32, with p_value 1.380081752363265e-09
ltc::0.55, with p_value 1.13246212573797e-28
neo::0.38, with p_value 3.31495066306251e-13
xrp::0.13, with p_value 0.02057032955194098<jupyter_text>ploting the price & the lexicon score<jupyter_code>from sklearn.preprocessing import MinMaxScaler 
import matplotlib.dates as mdates
def plot(ticker,column):
    data = pd.read_csv(f'../data/vader_{ticker.lower()}.csv')
    data =data[data.time>'2017-12-29']
    scaler = MinMaxScaler()
    data["score_norm"]=scaler.fit_transform(data[[column]])
    data["price_norm"]=scaler.fit_transform(data[["mid"]])
    plt.figure(figsize=(15,7))
    ax = plt.gca()
    ax.set_xlabel("date", size=5)
    ax.set_ylabel('Normalized price and score int range(0,1)', size=5)
    ax.set_title(f'{ticker.upper()}', size=5)
    data.time = pd.to_datetime(data.time)
    ax.fmt_xdata = mdates.DateFormatter('%Y-%m-%d')
    plt.xticks(rotation=70)
    plt.plot(data.time , data.score_norm, 'b.-')
    plt.plot(data.time , data.price_norm, 'r.-')
    ax.legend(['sentiment score','price'],loc="upper left")
    plt.grid()
    plt.show()
for ticker in ["ltc","btc",'bch','xrp','eth','neo']:
    plot(ticker,'score')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16516786570743405, 'fraction_numerical': 0.07523980815347722, 'mean_word_length': 4.617845117845118, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 15, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '601414', 'license': 'MIT', 'n_tokens_mistral': 1434, 'n_tokens_neox': 1280, 'n_words': 272, 'path': 'analyze social crypto community with sentiment lexicon approach.ipynb', 'repo_name': 'aldkak/cryptoanalysis', 'size': '3336'}