Generate Love Poem

I was inspired to create this project based on ‘Love Poem’ by Hala Alyan.

I feel like not enough people are talking about this poem. And by this poem, I also mean the poet. Hala Alyan.

In “The Moon That Turns You Back”, Hala Alyan teaches me new words for love and new modes for expression. I did not expect to find a love poem to her favorite cities tucked in between lines of Python. Alyan creates a function and calls it generate_love_poem. The poet defines three columns with 5 items in each: cities, adjectives, and eye colors. The function is set to randomly select an item from each list to create the poem, implying that regardless of the city or the vantage point of the love gleaned from the place through eyes of varying colors and hearts of differing temperament, the effect on the poet remains the same. She ends her poem:

Everywhere: shouting and apricots and reconstructed light

When you read “The Moon That Turns You Back” in its entirety, you can begin to feel what these cities mean to Alyan. How they shape how she loves, how they color her memories. Buy her book. Read her work. Find the poem yourself, or ask to borrow mine!

I wanted to create this poem myself to explore a few questions.

  • Does the code in the text compute?

  • Does the randomly generated poem change my experience of the poem?

  • Is this an experience that I find desirable?

  • Does sharing this in an interactive format affect the audience’s role in experiencing the work?

I defined four columns for my function: friends, maths, sky colors, and final lines. My love for my friends, for math, and for skies the color of Nebraska prairie flowers (and other beautiful things) is boundless. Adding a final lines column allows me to create a function that generates a new last line for each poem instead of having the same final line for all of my generated poems.

Below, you can see my poem written in the R coding language. I wanted to bring the interactive experience of this poem to you instead of keeping it to myself in my cloud IDEs, so I needed to create an application, needed a place to host the application, and needed to ensure that this website would allow me to embed it. You are experiencing an R Shiny App, written using R, HTML, and CSS. Enjoy!