Make a data frame.
From The World Factbook construct a data frame in which units (rows) are world countries with names from the “book” and variables (columns):
For visual inspection the additional variable region (North America, Central America, South America, Europe, Africa, Middle East, Central Asia, South Asia, East & Southeast Asia, Australia & Oceania, Antarctica) would be very useful - it can be constructed from the map on the entry page and region's countries lists on the next level.
student | V2 | V3 | V4 |
---|---|---|---|
Bulat Khamitov | total area | railways total | roadways total |
Ксения Морунова | population | annual air passengers | # of airports |
K. Radhakrishna | GDP - per capita | industrial products growth rate | military expenses |
Tereshonok Anna | death rate | literacy, total population % | hospital bed density |
Kirill Samoylenko | population below poverty line | labor force - agriculture % | education expenditures |
Brennan Larson | total area | population | military expenditures |
Karina Simonova | GDP (absolute) | median age | military expenditures in % of GDP |
Иванова Екатерина Сергеевна | Population | Telephones - mobile cellular | Internet users |
Makarova Anastasiia | Education Expenditure % | Adult obesity % | Internet users % |
Lesnykh Kirill | agricultural land | age 65 years and over (%) | total fertility rate |
Yanakov Eduard | GDP - per capita | population below poverty line | physicians density |
Save the created data frame as a CSV file.
Explore the collected data.
Write a report. Put the report and CSV file into a ZIP.
Hint: GitHub
> library(jsonlite) > J <- fromJSON(readLines("factbook.json")) > str(J,max.level=2) > J$countries[[4]]$data$name [1] "Albania" > J$countries$albania$data$name [1] "Albania" > names(J$countries) > names(J$countries$albania$data)