Coder Social home page Coder Social logo

we-rate-dogs's Introduction

Data Wrangling Practice - WeRateDogs

Introduction

This notebook was used to practice data wrangling on the tweet archive of Twitter user @dog_rates, also known as WeRateDogs. WeRateDogs is a Twitter account that rates people's dogs with a humorous comment about the dog.

Python Libraries

  • os
  • requests
  • json
  • numpy
  • pandas
  • matplotlib.pyplot

Data Wrangling Report

Gather

WeRateDogs Twitter data was gathered using three different methods General tweet data was gathered manually from a csv file Dog breed predictions for each tweet data was gathered programmatically from a tsv file Number of favorites and retweets per tweet was gathered through Twitter's API Once gathered, these data were converted to pandas dataframes, where they were assessed for data quality and tidiness issues and cleaned.

Assess

This data was assessed both visually and programmatically for data quality and tidiness issues. Data quality issues included:

  • Tweet timestamp of object data type
  • Dog stage values (doggo, floofer, pupper, and puppo) included as individual columns
  • Erroneous rating and dog name values
  • Null values expressed as objects
  • Inconsistently formatted values
  • Tidiness issues included:
  • Variables unrelated to the project
  • Related variables spread across more than one dataframe

Clean

These data quality and tidiness issues were then addressed with programmatic cleaning methods and exported to csv files.

EDA

These csv files were then used in a brief exploratory data analysis that attempted to answer the following three questions:

  1. Does rating correlate with number of retweets or favorites?
  2. Does the amount of text correlate with the rating, number of retweets, or number of favorites?
  3. Does dog breed correlate with rating, number of retweets, or number of favorites?

Conclusions

The exploratory data analysis showed:

  1. Weak correlations between rating and retweet count with a correlation coefficient of 0.21 and between rating and favorite count with a correlation coefficient of 0.28.
  2. No correlations between text length and rating with a correlation coefficient of -0.10, text length and number of retweets with a correlation coefficient of 0.11, and text length and number of favorites with a correlation coefficient of 0.15.
  3. The distributions of both retweet count grouped by dog breed and favorite count grouped by dog breed are both long-tailed, right-skewed distributions. The three dog breeds with the highest average number of retweets per post are the Miniature Schnauzer with 11,293, Tibetan Terrier with 10,786, and Irish Terrier with 8,245. The three dog breeds with the highest average number of favorites per post are the Tibetan Terrier with 50,631, Giant Schnauzer with 25,619, and the Yorkshire Terrier with 24,758.

we-rate-dogs's People

Contributors

mgysel avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.