# Framework for Social Media Analysis Based on Hashtag Research
## 3 Social Media Analysis Based on Hashtag Research Framework
### Seven Phases of the SMAHR Framework
An example is reference [14], which focused on identifying differences in corporate social responsibility based on the selected hashtag #CSR between developed and developing countries. In this study, 24,339 messages (21.42%) were selected from the basic set of 113,628 Instagram posts, which contain information about the message's location. A total of 9712 messages were sent from developed countries and 14,627 from developingcountries. Based on the previous step (Data Integration), this filtering can be applied, for example, in MS Excel, Apache OpenOffice, or another spreadsheet program. 4. **Data Transformation**--this is about transforming data into a suitable form, which is required by the information mining system. Basically, it is about preparing data for an information system working with data. The method of data transformation depends on the software used for data mining. The SMAHR framework recommends Gephi [51] in the current version 0.9.2. This software contains its module for importing data that are saved in CSV format. If a study is focused on regional differences or on an analysis of a specific region, it is necessary to perform data filtering based on the selected region. For this step, it is necessary to transform the data into a form where it will be possible to identify the selected region. Here, it depends very much on the API of individual social networks. At the API base, they either provide textual location information in address format or express that position through latitude and longitude, i.e., geographic coordinates. The next significant step in this phase is to transform the rest of the message into a format for data mining software. Here, it is possible to use Hashtag Matcher 1.2 software (see Supplementary Materials to this article). This software has two primary functions:  
* Remove non-hashtag text (#)
* Modify hashtags in a message to the form needed for Gephi program converts: \(\bigcirc\) All text in lowercase. Hashtag #prague and #Prague are two different hashtags for Gephi. For this reason, the first part of the transformation is focused on converting all characters to lowercase; \(\bigcirc\) If two or more hashtags are connected, for example, # farmersmarket # organicfood # fresh, these hashtags are separated by a space on #farmers-market #organicfood #fresh so that the program detects three hashtags. \(\bigcirc\) For a large data file, hashtags that are less than the specified value in the entire data file are removed. This mainly involves removal of typos, which removes all hashtags that are in the data file 1\(\times\). Parameters for Hashtag Matcher 1.2:  
-i--Input file. -o--Output file. If omitted, the file name is derived from input and placed in current directory. -l--Minimum number of occurrences for a hashtag to be included in output. Default: 0  
-csv-data-column--First based index of column with data. 0 means single line. Default: 1  
-csv-no-header--There is no header in the csv file. Default: false  
-csv-separator--Column's separator. Default:  
-m--Name of line matcher. -h--Help. Example: java -jar java-parserv3.jar -i = inputfile.csv -o = outputfile.csv -l = 100 -m = HashtagsMatcher -csv-data-column = 0  
Based on the previous steps of Data Integration and Data Transformation, the data can be imported into a data mining process software. The essence of the data import is in the creation of a network of hashtags, based on their relationship in a given message and between hashtags in the entire data file, as seen in Figure 2. The weight value corresponds to a number of links between the given hashtags.