Editing Intro to Programming and Data Science (Spring 2020)/Day 8 Coding Challenges
From CommunityData
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 75: | Line 75: | ||
# A Premier League soccer game happened today between Liverpool and Chelsea. Using two geo searches, see if you can tell which city hosted the game. Note: if you do this some other day, you should pick a new sporting event. | # A Premier League soccer game happened today between Liverpool and Chelsea. Using two geo searches, see if you can tell which city hosted the game. Note: if you do this some other day, you should pick a new sporting event. | ||
'''Geolocation in the streaming | '''Geolocation in the streaming APi''' | ||
# Alter the streaming algorithm to include a "locations" filter. You need to use the order sw_lng, sw_lat, ne_lng, ne_lat for the four coordinates.Β (Recall the stop button will stop an active process like the stream.) | # Alter the streaming algorithm to include a "locations" filter. You need to use the order sw_lng, sw_lat, ne_lng, ne_lat for the four coordinates.Β (Recall the stop button will stop an active process like the stream.) | ||
Line 92: | Line 92: | ||
# How many handles follow you but none of your followers? | # How many handles follow you but none of your followers? | ||
# Repeat this for people you follow, rather than those that follow you. | # Repeat this for people you follow, rather than those that follow you. | ||
'''From Data to Questions''' | |||
Identify a question that Twitter data could help you to answer. Figure out a query that would gather that data. | |||
# Save the raw data that Twitter returns in a .json file | |||
# Write code that stores the data as a CSV file instead of in JSON. | |||
== Congratulations!!!!== | == Congratulations!!!!== | ||
You now know how to capture data from Twitter that you can use in your research!!! Next workshop we'll play with some fun analytical tools. In the meantime, here are [[Twitter words of warning|a few words of caution about using Twitter data for science]]. | You now know how to capture data from Twitter that you can use in your research!!! Next workshop we'll play with some fun analytical tools. In the meantime, here are [[Twitter words of warning|a few words of caution about using Twitter data for science]]. |