![]() ![]() Use the geo_distance function (provided in geo.py) to calculate the shortest distance in miles between two positions. Implement find_closest_state, which returns the two-letter postal code of the state that is closest to the location of a tweet. In this phase, you will write functions to determine the state that a tweet is coming from, group tweets by state, and calculate the average positive or negative feeling in all the tweets associated with a state. You can use the keys of this dictionary to iterate over all the U.S. state, keyed by its two-letter postal code. The name us_states is bound to a dictionary containing the shape of each U.S. Red means positive sentiment blue means negative.īelow assignment is phase 3 of this project. This image isĬollecting public Twitter posts (tweets) that have been tagged with geographic locations and filtering for those that contain the "texas"Īssigning a sentiment (positive or negative) to each tweet, based on all of the words it contains,Īggregating tweets by the state with the closest geographic center, and finallyĬoloring each state according to the aggregate sentiment of its tweets. The map displayed above depicts how the people in different states feel about Texas. You will need to use dictionaries, lists, and data abstraction techniques to create a modular program. In this project, you will develop a geographic visualization of twitter data across the USA. This assignment is taken from Berkeley's CS61A page here. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |