शुरू करेंमुफ़्त में शुरू करें

फैसेट्स के साथ word counts का विज़ुअलाइज़ेशन

पिछले अभ्यास से word_counts लोड कर दिए गए हैं। आइए Twitter डेटा के लिए word counts को विज़ुअलाइज़ करें, जहाँ complaints और non-complaints के लिए अलग-अलग फैसेट्स हों.

यह अभ्यास पाठ्यक्रम का हिस्सा है

R में Text Analysis परिचय

पाठ्यक्रम देखें

अभ्यास निर्देश

  • एक color aesthetic शामिल करें जो बताए कि यह complaint है या नहीं.
  • कॉलम प्लॉट के लिए legend शामिल न करें.
  • इस आधार पर फैसेट करें कि ट्वीट complaint से आया है या नहीं, और y-axis को free रखें.
  • कॉर्डिनेट्स पलटें और यह शीर्षक जोड़ें: "Twitter Word Counts".

इंटरैक्टिव व्यावहारिक अभ्यास

इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।

# Include a color aesthetic tied to whether or not its a complaint
ggplot(word_counts, aes(x = word2, y = n, ___)) +
  # Don't include the lengend for the column plot
  geom_col(___) +
  # Facet by whether or not its a complaint and make the y-axis free
  ___(___, scales = ___) +
  # Flip the coordinates and add a title: "Twitter Word Counts"
  ___() +
  ___(___)
कोड संपादित करें और चलाएँ