{"id":19766072,"url":"https://github.com/wyldelarue/tweetpredictor","last_synced_at":"2025-06-12T16:03:02.682Z","repository":{"id":71109998,"uuid":"112233549","full_name":"WyldeLaRue/TweetPredictor","owner":"WyldeLaRue","description":"Is it possible to predict the political party of a twitter user? A  model to classify and make inferences on the political party of politicians' twitters.","archived":false,"fork":false,"pushed_at":"2018-10-18T23:22:49.000Z","size":114543,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T10:55:15.235Z","etag":null,"topics":["data-science","r"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WyldeLaRue.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-27T18:37:09.000Z","updated_at":"2019-04-08T03:35:26.000Z","dependencies_parsed_at":"2023-02-24T19:30:19.031Z","dependency_job_id":null,"html_url":"https://github.com/WyldeLaRue/TweetPredictor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/WyldeLaRue/TweetPredictor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WyldeLaRue%2FTweetPredictor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WyldeLaRue%2FTweetPredictor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WyldeLaRue%2FTweetPredictor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WyldeLaRue%2FTweetPredictor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WyldeLaRue","download_url":"https://codeload.github.com/WyldeLaRue/TweetPredictor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WyldeLaRue%2FTweetPredictor/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259499967,"owners_count":22867329,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-science","r"],"created_at":"2024-11-12T04:21:56.502Z","updated_at":"2025-06-12T16:03:02.645Z","avatar_url":"https://github.com/WyldeLaRue.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TweetPredictor\nCan we predict the political party of a twitter user?        \nWe fit a logistic model to classify and make inferences on the political party of politician's twitters. \n\n\n## PCA \u0026 Clustering\n![](presentation_files/figure-markdown_strict/unnamed-chunk-2-1.png)\n\n## Native Logistic Model\n![](presentation_files/figure-markdown_strict/unnamed-chunk-3-1.png)\n\n    ## [1] 0.05140878\n\nConsideration\n-------------\n\nSkree plot - are there exactly 2 parties?\n\n![](presentation_files/figure-markdown_strict/unnamed-chunk-5-1.png)\n\nConsideration Continued\n-----------------------\n\n![](presentation_files/figure-markdown_strict/unnamed-chunk-6-1.png)\n\nWeaknesses of Previous Model\n----------------------------\n\n-   Naive\n\nImproved Model (Trees)\n----------------------\n\n![](presentation_files/figure-markdown_strict/unnamed-chunk-7-1.png)\n\n    ## [1] 506 253 126  63  32  16   8   4   1\n\nVisualize Improved Model\n------------------------\n\n![](presentation_files/figure-markdown_strict/unnamed-chunk-8-1.png)\n\nOutliers \u0026 Interesting Things\n-----------------------------\n\n-   Who are these users scoring extremely low on PC1 and PC2?\n-   What are the 5-clusters encoding? What’s up with the density on\n    cluster 3?\n\nMethod Continued\n----------------\n\nTo expand upon this research question, “Can you predict the political\nparty of a twitter user using their tweet history,” some improvements\ncould be made:\n\n-   Training and testing on members of the population to make a model\n    that works more generally, instead of on politicians due to charged\n    language.\n-   Considering different scalings of the data such as quantile-based\n    instead of ratio-based numerics.\n-   \n\nFun Takeaways\n-------------\n\n![](images/all_words_dot.png)\n\nFun Takeaways\n-------------\n\n![](images/hash_tags_dot.png)\n\nFun Takeaways\n-------------\n\n![](images/hash_tags_bar.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwyldelarue%2Ftweetpredictor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwyldelarue%2Ftweetpredictor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwyldelarue%2Ftweetpredictor/lists"}