# Image of a City through Big Data Analytics: Colombo from the Lens of Geo-Coded Social Media Data
## 3 Research Design
### Social Media Analytics with the CUP Framework
#### 3.2.1. Capture: Twitter and Instagram Data  
The first stage of the framework involves 'capturing' Twitter social media information. However, Twitter has certain merits and constraints. The main merits include: (a) Twitter is one of the most rapidly growing social media microblogging services; (b) Twitter allows researchers to use a free Twitter 'application programming interface' (API); (c) unlikely  
Figure 2: The CUP framework.  
in Facebook and Instagram, Twitter data can be considered 'open data', which delivers succinct real-time data to the public [53]; (d) Twitter search and streaming APIs allow researchers to write queries based on certain keywords and/or hashtags to download information [54]; (e) and analyzing Twitter data is considered a novel approach of harvesting dispersed community knowledge [55].  
Restricted API-based data accessibility can be considered the main limitation of Twitter, where APIs provide access to only 1% of publicly available Twitter data. Additionally, from a collected sample, only around 10% is either geo-located or geo-tagged [56]. Even the geo-coded tweets are becoming harder to collect due to not sharing personal mobile location information. As well, there are ethical barriers, as such information consists of the exact location (x,y coordinates of a location) information of the people.  
For instance, only 22% of tweets consisted of geo-coded information from the total harvested data. Therefore, geo-tagged information is often collected through data providers--i.e., DataSift--with 100% access. This is a costly approach [38]. However, since this study related to location-specific keywords, such as Lotus Tower, Pettah, and so on, the aforesaid limitation did not affect the results of this study. As another limitation, reference [57] highlighted the bias of age groups of the Twitter data. Except for these limitations, an increasing number of studies use tweets as the main data source [58; 59].  
The obtained raw data consists of user ID, text body, available images and videos, time stamp, global positioning system (GPS) coordinates, and the language of the tweet. Then, this study adopted the five-step data-cleaning process presented by [60]. Those are time zone filter, date filter, bot filter, relevance filter, and text filter.  
Time-zone filtering, date filtering, and bot Filtering are done through the Twitter APIs while collecting data. The UTC/GMT+5:30 time zone is used for the time-zone filter. These filter out the tweets tweeted within the given time zone. Date filtering is used to filter out tweets tweeted within a given time frame. This study contains tweets starting from 1 January 2015 to 31 December 2020. Bot filter is used to filter automated tweets. After these three filtering processes were completed, the extracted data was saved to '.CSV' formatted files.  
Each file was then opened using Macro-enabled MS Excel for further cleaning. Relevance filtering was done to remove any irrelevant messages to the studying context or interests. All the conjunctions, Be-verbs, links, and special characters were removed using text filtering. After all these steps, the cleaned data was finally saved as a '.XLSX' formatted file for further processing.  
Secondly, capturing Instagram social media information was done. Hashtag filtering and location filtering are functions offered by the Instagram app. Only the relevant images were downloaded at this stage. All the portraits, group photos, and advertisements were filtered out. Including Twitter images, altogether, 762 images were selected to create the final data set covering the 28 selected locations of Colombo city.