Telegram Group & Telegram Channel
On bubbles and trees 💫

Teun van den Brand делает просто волшебные дополнения к ggplot2, в частности, библиотека {legendry} теперь позволяет делать пузырьковые легенды для графиков.


library(legendry)

gapminder::gapminder |>
dplyr::filter(year == max(year)) |>
ggplot(aes(gdpPercap, lifeExp, size = pop,
fill = continent)) +
geom_point(pch = 21, alpha = 0.8) +
scale_size_area(
limits = c(0, NA), max_size = 20,
breaks = c(0, 100, 500, 1000)*1e6,
labels = c(0, "100M", "500M", "1B"),
guide = guide_circles(vjust = 1)
) +
scale_fill_discrete(guide =
guide_legend(override.aes =
list(size = 4, alpha = 0.8))) +
scale_x_log10() +
labs(
x = "ВВП на душу населения",
y = "Ожидаемая продолжительность жизни",
fill = "Континент",
size = "Население"
)


Это должно быть по умолчанию в {ggplot2}!



group-telegram.com/naukaidannye/707
Create:
Last Update:

On bubbles and trees 💫

Teun van den Brand делает просто волшебные дополнения к ggplot2, в частности, библиотека {legendry} теперь позволяет делать пузырьковые легенды для графиков.


library(legendry)

gapminder::gapminder |>
dplyr::filter(year == max(year)) |>
ggplot(aes(gdpPercap, lifeExp, size = pop,
fill = continent)) +
geom_point(pch = 21, alpha = 0.8) +
scale_size_area(
limits = c(0, NA), max_size = 20,
breaks = c(0, 100, 500, 1000)*1e6,
labels = c(0, "100M", "500M", "1B"),
guide = guide_circles(vjust = 1)
) +
scale_fill_discrete(guide =
guide_legend(override.aes =
list(size = 4, alpha = 0.8))) +
scale_x_log10() +
labs(
x = "ВВП на душу населения",
y = "Ожидаемая продолжительность жизни",
fill = "Континент",
size = "Население"
)


Это должно быть по умолчанию в {ggplot2}!

BY Наука и данные




Share with your friend now:
group-telegram.com/naukaidannye/707

View MORE
Open in Telegram


Telegram | DID YOU KNOW?

Date: |

Again, in contrast to Facebook, Google and Twitter, Telegram's founder Pavel Durov runs his company in relative secrecy from Dubai. Overall, extreme levels of fear in the market seems to have morphed into something more resembling concern. For example, the Cboe Volatility Index fell from its 2022 peak of 36, which it hit Monday, to around 30 on Friday, a sign of easing tensions. Meanwhile, while the price of WTI crude oil slipped from Sunday’s multiyear high $130 of barrel to $109 a pop. Markets have been expecting heavy restrictions on Russian oil, some of which the U.S. has already imposed, and that would reduce the global supply and bring about even more burdensome inflation. Just days after Russia invaded Ukraine, Durov wrote that Telegram was "increasingly becoming a source of unverified information," and he worried about the app being used to "incite ethnic hatred." On Feb. 27, however, he admitted from his Russian-language account that "Telegram channels are increasingly becoming a source of unverified information related to Ukrainian events." "Markets were cheering this economic recovery and return to strong economic growth, but the cheers will turn to tears if the inflation outbreak pushes businesses and consumers to the brink of recession," he added.
from sa


Telegram Наука и данные
FROM American