स्कैटर प्लॉट में इम्प्यूटेड वैल्यूज़ को विज़ुअलाइज़ करें
अब, आइए अध्याय तीन में देखा गया एक पिछला प्लॉट फिर से बनाएँ, जिसमें geom_miss_point() का उपयोग किया गया था.
ऐसा करने के लिए, हमें डेटा की रेंज से नीचे इम्प्यूट करना होगा। यह डेटा को खोजने-समझने के लिए एक विशेष तरह की imputation है। यह imputation उस अभ्यास को उजागर करेगी जिसकी ज़रूरत है: missing values को कैसे ट्रैक किया जाए। डेटा की रेंज से नीचे इम्प्यूट करने के लिए, हम impute_below_all() फंक्शन का उपयोग करते हैं.
यह अभ्यास पाठ्यक्रम का हिस्सा है
R में Missing Data से निपटना
अभ्यास निर्देश
oceanbuoys डेटा का उपयोग करते हुए:
bind_shadow(),impute_below_all(), औरadd_label_shadow()के साथ missing values को इम्प्यूट करें और ट्रैक करें.- x-axis पर wind और y-axis पर air temperature की missingness को विज़ुअलाइज़ करें, और missing air temp वैल्यूज़ को
air_temp_c_NAसे रंगें. - x-axis पर humidity और y-axis पर air temp को विज़ुअलाइज़ करें, और किसी भी missing केस को वैरिएबल
any_missingके साथ रंगें.
इंटरैक्टिव व्यावहारिक अभ्यास
इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।
# Impute and track the missing values
ocean_imp_track <- bind_shadow(___) %>%
impute_below_all() %>%
add_label_shadow()
# Visualize the missingness in wind and air temperature,
# coloring missing air temp values with air_temp_c_NA
ggplot(___,
aes(x = ___, y = ___, color = ___)) +
geom_point()
# Visualize humidity and air temp, coloring any missing cases using the variable any_missing
ggplot(___,
aes(x = ___, y = ___, color = ___)) +
geom_point()