Articles NutritionCheckpoint Hangman Survey Says About Steven Cleary

Survey Says

Summary

About

This app was started in a group of four as a semester long project. Since then I am the only one still working on it with help from Ana Huff.

Agile/SCRUM

This app was started in a team of four as a class project. We used taiga.io to manage our backlog and taskboard. We would rotate scrum roles through out the semester

Other Contributors

Ana Huff - Helped out with the sticky header and polishing of the UI
Frontend

UI

The UI design was inspired mainly by twitter as well as some other popular apps and websites like Facebook and Amazon.

Code Smells

Most recently I have been working to refactor the front end. To do this I have been using Industrial Logic's reference guide to refactoring. Smells to Refactorings Quick Reference Guide. I am working from top to bottom and am currently at "Duplicated Code".
Frameworks/Libraries: Angular4, Ionic, Bootstrap, GraphJS, Plotly, RXjs
Backend

Tests

The backend contains tests for the various parts of the api. The backend also contains commands to run all of the tests or just specific test files. Each part of the api has its own test file.

Security

The app contains signup and login functionality however, this is only for testing. If this app were to ever appear on an app store this functionality would be removed. Login through Facebook would be the only way to login. This way the application would not have to store any passwords.
The program keeps track of users through an Oauth authentication type system. When users login or signup a token is generated for them which is then attatched to each of their requests to allow them access to their account.

Data Collection

The main inspiration behind this app is that it can be used to collect really useful data sets. Every time the user answers a question their response is saved to the database. This means you could go through every user and retrieve all of their answers.
Frameworks/Libraries: Django
Models

Collection

The app collects the tweets through the Twitter api and writes them to a mysql database. To collect the tweets the program sends search requests to the Twitter api using the keyterm '?'. The program collects things about the tweet like the amount of favorites, retweets, users follower count, users friend count, users favorites count, users statuses count, time the tweet was created, time of the query, and whether the tweet contains a picture or video.

Models

To create the model the program takes the 1000 most common words and creates an occurence matrix for each tweet. Then the other data collected about the tweet is concated to that matrix such as users followers, time tweet has been up, users friend count, users tweet count, users likes, and whether the tweet has had a picture or video. Number of retweets is used as the label. Then a linear regression is done to map all the data about a tweet to the number of retweets. Lastly the the coefficients correponding to the unigrams are saved. This model is then used to rank the text of incoming tweets.

Bots

To fill up the app with mock data random sentences are generated. To do this the program saves all of the bigrams found in the collection of tweets. Then random sentences are generated by choosing a random first word and then making random choices in the possible words that could follow ( based off the bigram list ).
Frameworks/Libraries: Scikit-Learn, NLTK
Gallery
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Structure  (last updated 4/30/18)

Back End

Folder name Source Comments Total
cback 1987 260 2588
cback/app 1859 170 2328
cback/app/api 459 30 544
cback/app/api/models 14 1 18
cback/app/api/questions 302 21 361
cback/app/api/test_functions 21 1 24
cback/app/api/user 122 7 141
cback/app/management 83 16 117
cback/app/management/commands 83 16 116
cback/app/migrations 314 12 358
cback/app/tests 580 30 722
cback/app/tests/main_db_tests 543 27 672
cback/app/tests/temp_db_tests 37 3 50
cback/cback 111 86 238

Front End

Folder name Source Comments Total
src 2297 249 2870
src/app 143 25 186
src/components 879 34 1008
src/components/feed 82 1 96
src/components/myheader 169 0 190
src/components/plot 291 20 334
src/components/plot/plotQuestion 185 16 214
src/components/plot/plotResult 106 4 120
src/components/poll 247 12 288
src/components/poll/pollQuestion 44 9 58
src/components/poll/pollResult 203 3 230
src/components/questionView 90 1 100
src/model 105 3 122
src/pages 900 98 1102
src/pages/accountDetails 94 0 103
src/pages/home 54 0 66
src/pages/login 47 0 55
src/pages/mainFeed 60 0 68
src/pages/newSurvey 353 54 434
src/pages/newSurvey/newPlot 99 40 147
src/pages/newSurvey/newPoll 96 4 110
src/pages/notify 60 1 68
src/pages/profilePage 12 5 24
src/pages/search 29 0 40
src/pages/searchRequest 92 1 99
src/pages/signup 99 37 145
src/providers 202 11 262
src/theme 22 41 88

Models

Folder name Source Comments Total
twitter 677 163 942
twitter/graph 101 6 110
twitter/graph/two 41 2 45
twitter/old 105 27 152