Introduction to Invisible Cities

Invisible Cities by Italo Calvino (1972) is a book of vignettes describing imaginary cities, narrated by a fictional version of Marco Polo to Kublai Khan. The book is known for having a unique structural organisation to it, which is often attributed to Calvino’s connection with the Oulipo literary group during his time in Paris. The Oulipo group was a predominantly francophone literary group that sought to include mathematical based constraints in their writing. (Linder, 2022).

Introduction to R Markdowns

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. An R Markdown document allows RStudio code to be made into a shareable format that can be made more accessible to those without R software downloaded. The document is coded as a regular R script, but when you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. This can then be more easily sent and viewed by people without statistics experience.

Here is an example of embedded code:

load("calvinames")
## The above function loads the dataset into the RMarkdown workspace. Once the document is knit into a pdf, html, or MS word doc, the code just shows what was required in order to get the document to that point, and no further action is required at that point. It simply becomes decoration. RMarkdowns can be created that only print the code output and not the code that created it, but I like to print both in order to show my work.
library(ggplot2)
library(beeswarm)
library(ggbeeswarm)
library(plotly)
library(forcats)
library(dplyr)
library(knitr)
library(rmarkdown)
library(htmlwidgets)
## The "library()" functions loads a package into the workspace. The above lines of code load all the packages required to make the code I wrote run, as well as to enable RStudio to knit the document into a file that can be used by those without RStudio. I won't explain what all of them do, because I know that computer coding isn't everyone's forte. But in case it's of interest, I'll say that "ggplot2" is the package for making plots, "plotly" is the package for making plots interactive, and "knitr" enables making the RMarkdown into a document.
head(calvinames)
## # A tibble: 6 × 7
##    C_ID name       page chapter category numincat length
##   <dbl> <chr>     <dbl>   <dbl> <chr>       <dbl>  <dbl>
## 1     1 diomira       7       1 memory          1      1
## 2     2 isidora       8       1 memory          2      1
## 3     3 dorothea      9       1 desire          1      1
## 4     4 zaira        10       1 memory          3      2
## 5     5 anastasia    12       1 desire          2      1
## 6     6 tamara       13       1 signs           1      2
## This function prints the variable names and first six rows of data of the dataset "calvinames". calvinames is the dataset I made myself from Italo Calvino's Invisible Cities.
## The dataset is called "calvinames" because it differs from the first dataset I made (which is just called "calvino") in that it includes a variable for city name. This inclusion will come in handy later.

This Dataset

The dataset created has 55 observations (one for each city) of seven variables. The variables tracked are:

C_ID– City Identification. This is a standard variable to have in datasets. Each city is assigned a number in order of their appearance in the book.

name– Name of the city.

page– the page that the city occurs on in hte book. For multiple page cities, this is the page that the city starts on.

chapter– which chapter the city is found in.

category– the category that the city has been assigned to. The categories are as follows: continuous, dead, desire, eyes, hidden, memory, names, signs, sky, thin, and trading.

numincat– The number in its category that each city is assigned. For example, in the above output we can see that Dorothea is 1, because it is the first in the category of desire, Tamara is also 1 because it is the first city in the category of signs, and Zaira is 3 because it is the third city in the category of memory.

length– how long (in pages) each city is.

Why a Dataset for This Book?

Many scholars over the years have tried to find ways to visualise the organisation of this book, often depicting it in table form, in order to more efficiently illustrate its pattern than explaining it in a paragraph (or more) of description. However, in addition to tables and worded descriptions, some have attempted to visualise in other, more creative ways. Carolyn Springer wrote in the 1985 paper “Textual Geography: The Role of the Reader in”Invisible Cities”” about the subject, “The formidable symmetries of Invisible Cities resist verbal description. Instead they invite other codes of representation: graphic or even musical.” While music is the medium that Springer might choose to express the patterns found in the structure of Invisible Cities, it isn’t the direction that everyone has gone in. Paul Harris in his paper, Calvino and Codes (1990), wrote about Invisible Cities that “The literary form of the text announces its cybernetic theme: we may in a slight overdetermined manner think of the table of contents as the algorithm for running the Invisible Cities program,”. Regardless of if one puts stock into this idea of the table of contents itself being comparable to computer code, in the present day the use of data imaging software can be helpful for finding new ways to illustrate the organisation of Invisible Cities.

Visualising Calvino’s Invisible Cities with R

Here’s the first plot. This one shows chapter number on the x-axis, and number in category on the y-axis. Each dot represents one city, and is colour-coded according to category. Assuming all goes well with knitting the code into the output document, one should be able to hover over each dot and see the name of the city represented by that dot, as well as some other information.

calvinorder <- calvinames %>%
  arrange(chapter) %>%
  mutate(category = factor(category, levels=c("memory", "desire", "signs", 
                                              "thin", "trading", "eyes", 
                                              "names", "dead", "sky", "continuous", "hidden")))
ggplotly(ggplot(data = calvinorder, aes(x = chapter,
                                       y = numincat,
                                       label = name,
                                       colour = category)) + 
           geom_beeswarm(method = "square", size = 2.5) +
           scale_y_continuous(breaks = seq(0, 5, by=1)) +
           scale_x_continuous(breaks = seq(0, 10, by=1)) +
           theme(panel.background = element_rect(fill = NA), 
                 panel.border = element_rect(colour = "black", fill=NA, size=1)))
## these are the lines of code needed to create the following plot. 

The reason that this plot is includes is for the diagonal lines of colours shown across its grid, showing the way that cities are interspersed throughout each chapter by category. Additionally, note the near symmetricality of chapters 1 and 10. Also, something that I found to be particularly interesting is the city of Baucis being at the exact center of this plot.

The second plot shows category on the x-axis, and page number on the y-axis. The categories are again colour-coded, and shown from left to right in order of first appearance. Again, each dot represents one city, and hovering over each dot should provide further information about the data point.

ggplotly(ggplot(data = calvinorder, aes(x = category,
                                       y = page, 
                                       label = name,
                                       colour = category)) +
           geom_beeswarm(method = 'center', size = 2.5, cex = 3)+
           theme(panel.background = element_rect(fill = NA), 
                 panel.border = element_rect(colour = "black", fill=NA, size=1), 
                 legend.position = "none"))

Note the beautiful (and nearly symmetrical) cascade of the data points in this plot, showing how over the course of the book new categories are being introduced as others fall away. It is also interesting that the city of Baucis is nearly in the exact center of this one. That being said, something to note as a limitation (or a feature, depending on viewpoint) of this plot is that because the shape is determined by the page number each city starts on, it is heavily affected by the breaks between chapters and the way that the cities tend to get longer in some later chapters. The book has breaks in between chapters, where there are pages of Marco Polo and Kublai Khan conversing, and these can be seen in the the periodical horizontal gaps between points at places such as pages 20 to 30, or 130 to 140. The tendency for the cities to be longer in certain later chapters causes the lack of symmetry in places such as the bottom left and top right corners. These are where chapter 1’s cities being significantly shorter on average than chapter 9’s made the bottom four memory points make a more equilateral triangle shape, while the top four hidden points made a longer, more isosceles triangle shape. While plotting page number over category reveals some interesting things like these about the data, the irregularities caused by using page number on the y-axis can be corrected by using chapter number instead.

The third plot shows category on the x-axis, and chapter number on the y-axis. The points are still colour-coded to category, which is in order of first appearance, and each dot still represents a single city.

ggplotly(ggplot(data = calvinorder, aes(x = category,
                                       y = chapter,
                                       label = name,
                                       colour = category)) +
           geom_beeswarm(method = "square", size = 2.5)+
           scale_y_continuous(breaks = seq(0, 10, by=1)) +
           theme(panel.background = element_rect(fill = NA), 
                 panel.border = element_rect(colour = "black", fill=NA, size=1), 
                 legend.position = "none"))

Note not only the cascade of the data across categories and chapters, but also that this plot has perfect twofold rotational symmetry around the city of Baucis. That is to say, if the plot was rotated 180º around the center point (which falls exactly on the data point of Baucis), the shape of the plot would look exactly the same.

Discussion and Conclusions

Despite the amount of academic interpretation of the organisation of Calvino’s book, the author himself attributed no special meaning to the structure. In a 1983 lecture given at a university, he stated, “I tried to work out the best structure on the basis of the materials I had collected, as I wanted these series to alternate, to interlace one another, while trying to keep fairly close to the chronological order in which the various pieces had been written. […] The system of alternation is the simplest possible, though some people have not found it so.” That being said, while Calvino claims that the structure of the book is just the most simple way to organise it, that doesn’t necessarily negate the value that readers have placed in the structure, or the usefulness of finding ways to clearly depict it visually. Benjamin Linder, in a 2022 book written on Invisible Cities, explained that “Part of what makes the structure so fascinating is the way it suggests and encourages multiple routes through the text”. The hope with the preceding plots is that, though they may not make visible some secret hidden within the structure of the text, that at the very least they provide a clearer illustration of the book’s structure. And, though the table of contents alone isn’t something that can be plugged into data imaging software, the dataset created from the book and the lines of R code using it may provide a new perspective on Invisible Cities and even perhaps show a new way of navigating the landscape of the book.