Tidy Tuesday week 41: Haunted Places

I loved this week’s theme! The data was a catalog of reported haunted places across the US from old roads to schools and libraries. As a horror fan, I loved reading the descriptions of all the haunted places and sightings of ghosts – not that I believe any of it to actually be true, but entertaining nonetheless.

The main data items were the location of the haunted place, a title of the location, and a description of the haunted place and the entity that haunts it. The most interesting part to me was the description itself and the story of the haunted place.

The descriptions ranged from 2-5000+ characters in length which made it difficult to work with in a data vis sense. But that makes it perfect for using the LLMs that are available to us now. I decided to summarise the types of locations and randomly select 5 places from the top 3 types to give 15 stories in total (15 would just organise well in landscape). I would then pass the description to the Open AI chatGPT API and summarise the description to 50 words or less. The LLM doesn’t usually adhere precisely to the word limit but usually makes it close enough to be suitable.

To bring it to life even more I used Midjourney to generate an image of the haunting entity. I used chatGPT to first summarise the entity that is the subject of the haunting in the description. I then asked it to generate an image prompt from the description. I then passed that to Midjourney to generate the image. It worked very well!

As an example, one of the haunted places depicted a 5-year-old boy possessed by demons. The description was:

“There is a gravestone for a five-year-old little boy who was said to be taken over by demons. His family put a color picture on his marker and it is still in perfect condition. When you look at the picture, you can see horns on his head.”

I prompted chatGPT (gpt-4) to “Provide a summary description of what the ghost, entity or environment looks like in 50 words or less”. The image description returned was:

“The ghost of a five-year-old boy, allegedly possessed by demons, haunts the area. His marked gravestone bears a color picture, untouched by time, which eerily depicts him with horns on his head.”

The initial description itself is fairly small so it more or less returned the same level of detail, but you could see how it would be great for much longer descriptions. I then prompted chatGPT to “Create a prompt for a hyper-realistic image of what the entity looks like and the environment in 20 words or less from the following description:”. It returned:

“hyper-realistic image capturing the ghostly presence of a demon-possessed boy haunting his gravesite, featuring an ageless, horned portrait, at the Poland Cemetery, dark, smokey, grainy”

I then copied this into Midjourney to generate the image.

Terrifyingly good! I could have automated the images with {openai} and create_iamge() but DALL-E is just not as good. DALL-E 3 is much better but couldn’t tap into it at the time.

After creating the images – which took a little while to be fair but it was fun and totally worth it – I pulled together the chart in ggplot2.

I think this is one of my favourites so far! I love the descriptions and the images.

Just for comparison I created the same image but fully automated it with {openai} and used DALL-E. The results…not as good. The haunting on Circle K McPherson Rd cracks me up!

Follow me on social media: