## 3 Results  
Data for this study were obtained from two different sources (Twitter and CryptoCompare) in the form of a JSON real-time stream, by means of an API [37; 38]. To query data, a set of keywords were given which correspond to the name and symbol of the cryptocurrencies, i.e., Bitcoin (BTC), and Ethereum (ETH). As shown in Table 1, data collected from Twitter contain several attributes related to each tweet such as _id, timestamp_, and _text_, but also attributes related to the user such as _user mentions, number of followers_, and _location_, among others. On the other hand, data from CryptoCompare contain transaction-inherent attributes, i.e., _timestamp [TS]_, _market [M]_, _symbol [FSYM]_, _price [P]_, and _volume [Q]_. Data streams feed their corresponding topic (_Twitter_ and _Crypto_) in Apache Kafka(tm). Data streaming is executed in a parallel manner, and in that way they can be processed simultaneously. Then, data processing is sequentially carried out in Apache Spark(tm), which allows the computation tasks to be divided between various processors forming a cluster. Data from Twitter in Table 1 contain fields related to the user that, for the purposes of this study, are not representative. Only the following attributes were kept: _timestamp_, _id_, and _text_. In the case of data obtained from CryptoCompare, none of their attributes were  
\begin{table}
\begin{tabular}{l l} \hline \hline
**Twitter** & **Cryptocompare** \\ \hline created at: ‘Fri Jan 14 07:00:00 +0000 2022’, & \\ id: 61e173 da2e8536 fc8c8e92 ff, & \\ id str: ’148197437765466521’, & \\ text: ‘RT @[PERSON]: @WatcherGuru A big & \\ transformation is on the way! The TIME HAS COME & date:”2022-01-14 07:00:00” \\ for @CryptolslandDAO’NOW is the best time to start & TYPE:”0” \\ thi...’, & M:“Coinbase” \\ truncated: True, & FSYM:“BTC” \\ entities: & \\ hashtags: [], & F:“2” \\ followers: [], & ID:”263883436” \\ user mentions: [], & TS:”1642165200” \\ urls: [ & Q:”0.00059115” \\ url: \", & P:\"42070.6406” \\ display url: \textbackslash{} twitter.com/i/web/status/1...’, & TOTAL-”24.8704” \\ location: []], & RTS:”1642165200” \\ metadata: & TSNS:”7000000000” \\ iso language code: \textbackslash{} \textbackslash{  
neglected as they contain representative information regarding each trade. At this point, data are transformed into a binary object which can be managed by Apache Kafka(tm). Text data from each tweet are processed in the real-time streaming layer by means of the library for natural language processing: Spark NLP, which is one of the most widely used NLP libraries [39; 40]. Attribute _text_ is split into sentences and, for each one, sentiment analysis is executed to identify whether it is positive or negative. Thus, a new attribute _sentence_ for each tweet is generated. On the other hand, data on the Apache Kafka(tm) topic _Crypto_ are transformed to have the same notation as data from the topic _Twitter_, so they can be related. Finally, data are immediately uploaded to the corresponding collection in the database hosted at MongoDB(tm). By following the process presented in Figure 2, a new dataset that relates the individual data from topics _Twitter_ and _Crypto_ is queried from the database. Attributes _timestamp_ and _currency_ are defined as keys to establish a relationship that allows generating a new dataset containing facts regarding the transactions. Considering the speculative nature of cryptocurrencies dominated by short-term investors [25], data are analyzed on a time basis of minutes; thereafter, new attributes are calculated: _number of tweets, accumulated sentiment, transaction volume, average currency price_, and _number of transactions_. The obtained dataset, as shown in Table 2, is then sent to a new topic (_Query_) in Apache Kafka(tm) to be streamed to Apache Spark(tm) and thus processed in a second iteration. With the purpose of demonstrating the application of the proposed algorithm, we collected data for a period of 8 h, from 06:59:00 (UTC-6) to 16:59:00 (UTC-6) of 14 January 2022.