geoffjentry / twitteR

R based twitter client
http://cran.r-project.org/web/packages/twitteR/index.html
254 stars 164 forks source link

Update tweet_columns and status method for new columns #129

Closed seanchrismurphy closed 8 years ago

seanchrismurphy commented 8 years ago

Updated tweet_columns to match the status reference class - it was missing lcoation, language, and profileImageURL, which meant that df_to_statuses was incorrectly throwing and error and thus tweets couldn't be retrieved from sql tables.

seanchrismurphy commented 8 years ago

Also updated the status class initiate method to deal with the new columns (location, language, profileimageURL) when they're coming from a df - previously df_to_status was breaking, which was also breaking load_from_db. Also made a minor change to search_twitter_and_store so the user can specify an N different to the default 5000.

geoffjentry commented 8 years ago

Hi Sean, thanks for this. Will this cause any issues for an already existing database store?

seanchrismurphy commented 8 years ago

Well, right now the latest version already causes incompatibility with existing stores because they have 16 columns and new status dfs have 19. And they won't be retrievable because of the location bug. This update should at least make existing tables retrievable because it fills the new columns with unknown if you retrieve an older store, I think. But it doesn't fix the problem of trying to save new tweets into an existing table that was created under the old system, because the column numbers will be different. I'm not sure how to fix that, except by making a new table for new tweets.

On 23 Aug 2016 10:00 pm, "Jeff Gentry" notifications@github.com wrote:

Hi Sean, thanks for this. Will this cause any issues for an already existing database store?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/geoffjentry/twitteR/pull/129#issuecomment-241708913, or mute the thread https://github.com/notifications/unsubscribe-auth/AGN-7upJjgFGiJ72K_4c6mcXBdyIArrnks5qiuDlgaJpZM4JoH_0 .

geoffjentry commented 8 years ago

I can't remember if I ever actually thought through how to progress in the future when adding columns. In the back of my mind I think I did, but that was ages ago when I had the time to poke at this :( As you point out, it's broken anyways, so this seems like it'll be better than what's there before.