Hi! I’m Ananya and in the following sections you’ll see what I’ve done in the last two weeks. Every graph represnts an answer to a question that I’ve included aabove the graph. Enjoy :)
Gapminder consists of data like population,life expentancy and GDP per capita of 142 countries collected between 1952-2007 in increments of 5 years. For this particular graph I’ve chosen to focus on the data from Asia.
twenty_first <- asia%>%
filter (year > "1996")
ggplot(twenty_first) + geom_line(aes(x = year,
y = gdpPercap,
colour = country)) +
theme_classic()
For this assignment on maps I chose to make a map of my hometown - Noida. In it I wanted to highlight the parks, libraries and art centres. Note - OSM stands for Open Street Map and helps us extract map related data for any area we want.
# Getting Map data
dat_H <- extract_osm_objects (key = 'highway', bbox = bbox_noida)
dat_L <- extract_osm_objects (key = "amenity",
value = "library",
return_type = "point", bbox = bbox_noida)
dat_Art <- extract_osm_objects (key = "amenity",
value = "arts_centre",
return_type = "point", bbox = bbox_noida)
dat_P <- extract_osm_objects (key = "park", return_type = "polygon",
bbox = bbox_noida)
# Group1
noida_map <-
tm_shape(dat_H) +
tm_lines(col = "orange") +
tm_shape(dat_L) +
tm_dots(size = 0.2, col = "red",shape = 22) +
tm_text("name", auto.placement = TRUE, size = 0.3) +
tm_shape(dat_Art) +
tm_dots(size = 0.1, col = "purple",shape = 21) +
tm_text("name", auto.placement = TRUE, size = 0.3) +
tm_shape(dat_P) +
tm_fill(size = "pop2020", col = "lightgreen") +
# Group2
tm_layout(main.title = "Map of Noida", main.title.size = 3, title = "Itinerary for a relaxed Day Out", title.size = 1, frame = TRUE, frame.lwd = 2, bg.color = "lightyellow")
noida_map
The following map represents the connections between the characters in the famous american sitcom ‘Friends’ and the network they form. The dataset required to create this map has been created entirely by me and is based on the first ten episodes of the first season. For this, I’ve used the visNetwork package that helps in plotting interactive network works.
friends_nodes_vis %>%
visNetwork(nodes = ., edges = friends_edges_vis,main = "The Friends Network",submain = "Alexa play *I'll be there for you* ", background = "lightyellow")%>%
visNodes(font = list(size = 30))%>%
# Colour and icons for each of the gender-groups
visGroups(groupname = "F", shape = "icon",
icon = list(code = "f182", size = 75, color = "orange"))%>%
visGroups(groupname = "M", shape = "icon",
icon = list(code = "f183", size = 75, color = "lightpink"))%>%
addFontAwesome()
Reflection: When I was dropping comp science in the 11th grade simply because of how much I despised working with Python it never occured to me that I would have to code for 2 weeks straight just a few years later. As frightening as this workshop seemed in the beginning I actually found myself growing fonder of this adorable (yet very troublesome) thing called R. I now feel a lot better about coding and even though there are a lot of things that I now want to change in my earlier assignments I quite how I’m leaving this workshop with a skill that I can use in all my future projects :)
Ps. The Alice in the Wonderland metaphors were partly the reason that kept me going throughout this workshop thanks to our favourite boomer!