16 Use data_Europe. Use ggplot. Plot pop vs gdpPercap.
17 Use data_Europe. Use ggplot. Plot pop vs gdpPercap.
18 Use data_Europe. Use ggplot. Plot pop vs gdpPercap. Scale population by log10
19 Use data_Europe. Use ggplot. Plot pop vs gdpPercap. Scale population by log10. Color the data by country.
20 Use data_Europe. Use ggplot. Plot pop vs gdpPercap. Scale population by log10. Color the data by country and size it by lifeExp.
Looking for the answers in R command script codes.
1952 1957 1962 1967 1972 1977 1982 1987 1992 1997 2002 2007 142 142 142 142 142 142 142 142 142 142 142 142 > table(gapminder$country) Afghanistan Albania Algeria 12 12 12 Angola Argentina Australia 12 12 12 Austria Bahrain Bangladesh 12 12 12 Belgium Benin Bolivia 12 12 12 Bosnia and Herzegovina Botswana Brazil 12 12 12 Bulgaria Burkina Faso Burundi 12 12 12 Cambodia Cameroon Canada 12 12 12 Central African Republic Chad Chile 12 12 12 China Colombia Comoros 12 12 12 Congo, Dem. Rep. Congo, Rep. Costa Rica 12 12 12 Cote d'Ivoire Croatia Cuba 12 12 12 Czech Republic Denmark Djibouti 12 12 12 Dominican Republic Ecuador Egypt 12 12 12 El Salvador Equatorial Guinea Eritrea 12 12 12 Ethiopia Finland France 12 12 12 Gabon Gambia Germany 12 12 12 Ghana Greece Guatemala 12 12 12 Guinea Guinea-Bissau Haiti 12 12 12 Honduras Hong Kong, China Hungary 12 12 12 Iceland India Indonesia 12 12 12 Iran Iraq Ireland 12 12 12 Israel Italy Jamaica 12 12 12 Japan Jordan Kenya 12 12 12 Korea, Dem. Rep. Korea, Rep. Kuwait 12 12 12 Lebanon Lesotho Liberia 12 12 12 Libya Madagascar Malawi 12 12 12 Malaysia Mali Mauritania 12 12 12 Mauritius Mexico Mongolia 12 12 12 Montenegro Morocco Mozambique 12 12 12 Myanmar Namibia Nepal 12 12 12 Netherlands New Zealand Nicaragua 12 12 12 Niger Nigeria Norway 12 12 12 Oman Pakistan Panama 12 12 12 Paraguay Peru Philippines 12 12 12 Poland Portugal Puerto Rico 12 12 12 Reunion Romania Rwanda 12 12 12 Sao Tome and Principe Saudi Arabia Senegal 12 12 12 Serbia Sierra Leone Singapore 12 12 12 Slovak Republic Slovenia Somalia 12 12 12 South Africa Spain Sri Lanka 12 12 12 Sudan Swaziland Sweden 12 12 12 Switzerland Syria Taiwan 12 12 12 Tanzania Thailand Togo 12 12 12 Trinidad and Tobago Tunisia Turkey 12 12 12 Uganda United Kingdom United States 12 12 12 Uruguay Venezuela Vietnam 12 12 12 West Bank and Gaza Yemen, Rep. Zambia 12 12 12
#16
data_Europe = gapminder %>% filter(year == 2002, continent ==
"Europe")
ggplot(data_Europe, aes(x = pop, y = gdpPercap)) +
geom_point()
#17
ggplot(data_Europe, aes(x = pop, y = gdpPercap)) +
geom_point() #question 17 is the same as question 16
#18
ggplot(data_Europe, aes(x = pop, y= gdpPercap)) +
geom_point() +
scale_x_log10()
#19
ggplot(data_Europe, aes( x = pop, y = gdpPercap, color = country))
+
geom_point()
#20
ggplot(data_Europe, aes(x=pop, y = gdpPercap, color = country, size
= lifeExp)) +
geom_point() +
scale_x_log10()
Please rate
Get Answers For Free
Most questions answered within 1 hours.