Skip to content

Social Media usage on Twitter and Instagram to see what people are talking about.

Notifications You must be signed in to change notification settings

cecilyal/Capstone_SocialMediaAPI

Repository files navigation

Capstone_SocialMediaAPI

Twitter API

For my twitter capstone project, I was collecting tweets using the bounding box. I was using two bounding boxes to try to collect tweets within two parks in the Denver area. I was using Cheeseman Park and Washington Park in Denver, CO. The goal was to use the tweets to be able to see if the was a way to see how usage of social media can to improve the parks. There was a Jingle bell 5k I was collecting tweets from specifically to see how a race would also impact the tweets. I realized afterwards that my tweets were not actually coming the right location. I was trying to look at the tweets to see if had gotten any from the race. I was using the column.str.contains(‘word’) to look through the tweets using different words, like race, run, jingle bell, 5k, etc. I realized then that the bounding box I had set as a parameter had not worked like I had anticipated. I then used folium to map out all the coordinates I had gotten from some tweets. I was able to see that it had been grabbing tweets, not just from park, but across the Denver city area. With the tweets I had collected I was able to turn emojis in text and run some benchmarking Latent semantic analysis to get a brief overview of what people were talking about generally in the Denver area.

Instagram API

The Instagram API had a parameter to get location of posts. I was able to get an access token, which then allowed for me to see the location ids of different areas. After cleaning up the list and creating a function to be able to go through more than one location id at a time, I realized the error I was getting was because I was in sandbox mode. Sandbox mode means that it’s a development phase of your app. In order to get your app to go live, you need to submit a video application and write an essay. Otherwise you will only be able to get posts from the sandbox users, which means the 10 people max that you have given access to of your app. I tired different ways to get the media search to work. I used the location_id/media search and then tried just the media search with the latitude and longitude based on the location ids I was able to get. I even tried using a different access token. I still was only able to get the location ids, latitude, and longitude. I had researched the errors too and that is how I came to the conclusion for getting a 200 response but no information.

Dialogfeed

I was able to find a wesbite that is authorized to temporary get some information about social media usage. This website allows you get posts across a variety of social media platforms. Since my focus is Instagram and Twitter, I was able to set parameters on the website to focus on the location to pull post on Instagram and Twitter based on location, similar to that of the bounding box, as well as by hashtag of the parks in order to see if that would pull in any more posts. I was able to find out that more people use Instagram over twitter. I then was able to access a json API where I was able to import the json to go into and clean up to start to anlayze. The problem is that based on adjusting the url for the API, I was only able to get 500 posts as my limit.

Continuation Plan with Instagram

I am currently working an essay to try to get approval of my app in order to get out of Sandbox mode. I want to be able to create an app in Instgram to be able to get more posts than the 500 I was able to clean up via Dialogfeed website. With approval of the app, I would want to be able to create a tool that pulls in all these posts and analyzes the posts, including all the emojis and hashtags to find how parks can use the information to improve the parks. It would a way to a survey of people's thoughts of parks in large manner and easier since many people to not in general like to fill out surveys online or on paper. This tool could be used for business as way for them to focus on improvements in their production. For example, a business might be holding an event in a park and could potentially use this app to look at the information to see how to promote for the event or even where to set up that would get the most attention.

About

Social Media usage on Twitter and Instagram to see what people are talking about.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published