# Framework for Social Media Analysis Based on Hashtag Research
## 3 Social Media Analysis Based on Hashtag Research Framework
### Seven Phases of the SMAHR Framework  
1. **Data Cleaning**--removing irrelevant, confusing or misleading data from a data file [49]. At this stage, it is necessary to understand the context of the hashtag and the various situations for its use. It is mainly a matter of removing irrelevant and  
Figure 1: Seven phases of social media analysis based on hashtag research (SMAHR) framework process. Source: Own processing. confusing data. In this area, these are mainly hashtags that can be used in various contexts. An example is reference [14], which focused on corporate social responsibility. Netlytic software [48] was used to download the data, where a condition was specified for downloading messages that contain the hashtag #CSR (no font size limitation). Total downloads of 1,172,868 Instagram posts. Based on the analysis of communities (see phase 5--Data Mining), the community dealing with the computer game \"CSR Racing\" was extracted, where the hashtag #CSR was also used. This point is critical to the scope of data mining, and non-topic messages must be removed. 2. **Data Integration**--a process that is defined as data homogenization [50]. An essence of the data integration activity lies in this process in the creation of a homogeneous data set, with which it is possible to go to the third phase--Data Selection. Due to the different API settings of individual social networks, it is necessary to create a board structure for further work, containing the following items: * ID--identifier of an item in a data file. It is not necessary for further processing, but speeds up an orientation in an overall data set; * Author--this is the author's identifier of particular message. This information is important in terms of identifying a number of unique users in the data file. For example, if data have been downloaded throughout the year, one user will likely comment on the topic more than once; * Message--this item contains the text part of the message. If it is possible to insert hashtags into other parts of the message on a social network (some social networks have a separate message title and message body), it is necessary to merge these parts into one item; * Location--this is the identification of the place where the message was sent or the user's residence. This information can be used to identify regional differences (more in phase 5--Data Mining). This is a very important piece of information that can give us information whether the messages are captured throughout the period, and there is no particular outage in the data file. It can also inform us about seasonality in certain regions, which is useful, for example, in the field of farmers' markets, where in central Europe, for example, customers will communicate in connection with farmers' markets in spring other products than those produced in summer and fall [12]. 3. **Data selection**--a process during which a researcher decides what data are relevant for further analysis. The SMAHR framework focuses on hashtag analysis. For this reason, it is necessary to remove all text that is not a hashtag from the message field (see the Data Integration phase) at this point. It removes any text that does not start with a \"#\". For this, it is possible to use the Hashtag Matcher 1.2 module, which is described in more detail in the next phase--Data Transformation. These two phases are closely related in this framework. **Message sending location** Research can be divided into two parts:  
* _An analysis of communication from a global perspective_--without regional differences. All messages are used. * _An analysis of a particular region, or an analysis of regional differences_--if a study is focused on identifying a regional difference or is focused on an analysis of a specific region. In this case, it is necessary to use data filtering based on values in the location field (see phase Data Integration) to select only those data that contain information about the location of the region.