<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Hannah Baker on Medium]]></title>
        <description><![CDATA[Stories by Hannah Baker on Medium]]></description>
        <link>https://medium.com/@hannahb_25170?source=rss-430ad6e2908f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*cGjNYDyy8KtVH4eFWW8qYA.jpeg</url>
            <title>Stories by Hannah Baker on Medium</title>
            <link>https://medium.com/@hannahb_25170?source=rss-430ad6e2908f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 02:05:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hannahb_25170/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[IIIFind]]></title>
            <link>https://medium.com/cogapp/iiifind-35ef93d79ea9?source=rss-430ad6e2908f------2</link>
            <guid isPermaLink="false">https://medium.com/p/35ef93d79ea9</guid>
            <category><![CDATA[musetech]]></category>
            <category><![CDATA[iiif]]></category>
            <category><![CDATA[coghack]]></category>
            <dc:creator><![CDATA[Hannah Baker]]></dc:creator>
            <pubDate>Mon, 03 Jun 2024 16:49:22 GMT</pubDate>
            <atom:updated>2024-06-03T16:49:22.847Z</atom:updated>
            <content:encoded><![CDATA[<h4>A fun IIIF game</h4><p>For Cogapp’s most recent hack day, the brief was to make something fun with IIIF, or if that was too much of a challenge something mildly entertaining.</p><p>I wracked my brains for the funnest experiences I’d ever had and soon decided to make a IIIF version of a family favourite card game where you have to find the common object on two cards as quickly as possible (I know how to have a good time)!</p><p>Once I had the idea it was straight to work planning. I decided to use artworks as the images so that people could enjoy and discover new artworks whilst playing, plus Cogapp has many art galleries in our client network so I knew I’d have a wealth of resources to choose from.</p><p>I decided to use artworks from the <a href="https://www.artic.edu/">Art Institute of Chicago’s</a> collection. Having working with their collection before I knew they had a great selection of public domain artworks and I was already familiar with their API so it was a win-win.</p><p>I started off by looking through the AIC’s collection to come up with a list of predefined objects for people to hunt for and I settled on the following:</p><figure><img alt="A list of objects (Monkey, Dog, Boat, Umbrella, Fruit, Clock, Snake and Elephant)" src="https://cdn-images-1.medium.com/max/1024/1*54FaMdJJODEZtDHAPuWI2A.png" /><figcaption>A list of objects (Monkey, Dog, Boat, Umbrella, Fruit, Clock, Snake and Elephant)</figcaption></figure><p>Now that I had my list of objects I set about finding 7 – 9 artworks for each of them. It was sometimes challenging to source artworks that had enough detail in them to make it even a little bit challenging to find the object. For instance, one of the artworks for ‘Elephant’ didn’t contain much other than an elephant, making it quite obvious what the answer would be for that round:</p><figure><img alt="A woman sat on an elephant" src="https://cdn-images-1.medium.com/max/858/1*rY5M7Dqi-gClpxdKBqHSzw.png" /><figcaption>‘Courtesan on White Elephant’ by Suzuki Harunobu</figcaption></figure><p>This issue was exacerbated by needing to use public domain artworks as it restricted my options, plus I only had a limited time to search through the collection for suitable images. While chatting to my colleague Luke about this problem, he suggested also using some AI generated images containing the objects so that there could be more variety without having to spend hours trawling through existing artworks. Using this approach, we could also generate images that could be used in multiple object categories by making sure there was only ever one object crossover in each of the images. In other words, we could create the following images:</p><p>Image 1: Monkey, Dog, Boat</p><p>Image 2: Dog, Umbrella, Fruit</p><p>Image 3: Boat, Clock, Snake</p><p>Image 4: Umbrella, Snake, Elephant</p><p>Image 5: Fruit, Clock, Elephant</p><p>Image 6: Monkey, Clock, Elephant</p><p>Image 7: Monkey, Fruit, Snake</p><p>Image 8: Dog, Snake, Elephant</p><p>However, as some of the AIC artworks I’d selected also had more than one of the objects in then, I still needed to make sure each artwork would only be paired with another artwork if there was only one matching object, as I only wanted there to be one correct answer. For instance, the following two artworks both contain a Monkey and Fruit, so I’d have to put in a check to make sure these two images were never displayed together.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nh9kUCdQ4A9cB42c-fPVYg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*2oonA6ZswSB9xe8xWnaHTg.png" /><figcaption><strong>Left:</strong> ‘Still Life with Monkey, Fruits, and Flowers’ by Jean Baptiste Oudry <strong>Right: ‘</strong>Monkey playing with crabs’ by Isoda Koryusai</figcaption></figure><p>Once I had my artworks (both AI and human-made) I was ready to start building the game. I built a UI (user interface) with two OpenSeadragon viewers so that the user could zoom in and move around the image to see it in more detail and hunt for the relevant objects. To generate the viewers I first hardcoded an array containing the relevant image IDs for each of the objects and randomly selected an object and two image IDs from that array:</p><pre>const dibbleObjects = {<br>    &quot;Monkey&quot;: [&quot;27992&quot;, &quot;94126&quot;, &quot;26777&quot;, &quot;21181&quot;, &quot;8715&quot;, &quot;14799&quot;, &quot;19471&quot;, &quot;28341&quot;, &quot;52497&quot;, &quot;1715937356533card001monkeydogboat&quot;, &quot;1715937458290card006monkeyclockelephant&quot;, &quot;1715937472118card007monkeyfruitsnake&quot;, &quot;1715937356533card001monkeydogboat&quot;],<br>    &quot;Dog&quot;: [&quot;27992&quot;, &quot;158&quot;, &quot;49068&quot;, &quot;40724&quot;, &quot;561&quot;, &quot;28136&quot;, &quot;61715&quot;, &quot;1715937356533card001monkeydogboat&quot;, &quot;1715937389260card002dogumbrellafruit&quot;, &quot;1715937484999card008dogsnakeelephant&quot;, &quot;1715937356533card001monkeydogboat&quot;],<br>    &quot;Boat&quot;: [&quot;27992&quot;, &quot;14598&quot;, &quot;28102&quot;, &quot;59927&quot;, &quot;94996&quot;, &quot;86421&quot;, &quot;1715937356533card001monkeydogboat&quot;, &quot;1715937413583card003boatclocksnake&quot;, &quot;1715937356533card001monkeydogboat&quot;],<br>    &quot;Umbrella&quot;: [&quot;27992&quot;, &quot;47928&quot;, &quot;213791&quot;, &quot;19693&quot;, &quot;22017&quot;, &quot;86421&quot;, &quot;19773&quot;, &quot;20878&quot;, &quot;1715937427455card004umbrellasnakeelephant&quot;, &quot;1715937389260card002dogumbrellafruit&quot;],<br>    &quot;Fruit&quot;: [&quot;94126&quot;, &quot;21181&quot;, &quot;81558&quot;, &quot;44892&quot;, &quot;100351&quot;, &quot;84709&quot;, &quot;182381&quot;, &quot;1715937389260card002dogumbrellafruit&quot;, &quot;1715937443012card005fruitclockelephant&quot;, &quot;1715937472118card007monkeyfruitsnake&quot;, &quot;1715937356533card001monkeydogboat&quot;],<br>    &quot;Clock&quot;: [&quot;11988&quot;, &quot;94996&quot;, &quot;158312&quot;, &quot;156538&quot;, &quot;236383&quot;, &quot;85496&quot;, &quot;76631&quot;, &quot;20005&quot;, &quot;217185&quot;, &quot;1715937413583card003boatclocksnake&quot;, &quot;1715937443012card005fruitclockelephant&quot;, &quot;1715937458290card006monkeyclockelephant&quot;],<br>    &quot;Snake&quot;: [&quot;23985&quot;, &quot;4819&quot;, &quot;78161&quot;, &quot;60587&quot;, &quot;136981&quot;, &quot;11229&quot;, &quot;51466&quot;, &quot;1715937413583card003boatclocksnake&quot;, &quot;1715937427455card004umbrellasnakeelephant&quot;, &quot;1715937472118card007monkeyfruitsnake&quot;, &quot;1715937484999card008dogsnakeelephant&quot;],<br>    &quot;Elephant&quot;: [&quot;2102&quot;, &quot;6810&quot;, &quot;113249&quot;, &quot;21083&quot;, &quot;32485&quot;, &quot;32478&quot;, &quot;1715937427455card004umbrellasnakeelephant&quot;, &quot;1715937443012card005fruitclockelephant&quot;, &quot;1715937458290card006monkeyclockelephant&quot;, &quot;1715937484999card008dogsnakeelephant&quot;]<br>};</pre><p>Once I had my two image IDs I could then construct the IIIF image URL. This was done differently depending on whether the artwork was one of AIC’s or one of the newly created AI generated images. The AI generated image IDs all contained letters, so I used this as a check to determine how to construct the IIIF URL. This wasn’t the most robust or future proof approach but I was pressed for time so I went with it:</p><pre>// Fetch the IIIF manifest<br>fetch(manifestUrl)<br>.then(response =&gt; response.json())<br>.then(manifest =&gt; {<br>    let imageUrl;<br>    let tileWidth;<br>    let tileHeight;<br><br>    // Extract the image URL and tile information from the manifest<br>    if (cogappImage) {<br>        imageUrl = manifest[&quot;@id&quot;] + &#39;/full/full/0/default.jpg&#39;;<br>        tileWidth = manifest[&quot;tiles&quot;][0][&quot;width&quot;];<br>        tileHeight = manifest[&quot;tiles&quot;][0][&quot;height&quot;];<br>    } else {<br>        imageUrl = manifest[&quot;sequences&quot;][0][&quot;canvases&quot;][0][&quot;images&quot;][0][&quot;resource&quot;][&quot;@id&quot;];<br>        tileWidth = manifest[&quot;sequences&quot;][0][&quot;canvases&quot;][0][&quot;images&quot;][0][&quot;resource&quot;][&quot;width&quot;];<br>        tileHeight = manifest[&quot;sequences&quot;][0][&quot;canvases&quot;][0][&quot;images&quot;][0][&quot;resource&quot;][&quot;height&quot;];<br>    }<br>    <br>    // Construct the OpenSeadragon tileSources object<br>    var tileSources = [{<br>        type: &#39;image&#39;,<br>        url: imageUrl,<br>        buildPyramid: false,<br>        tileSize: tileWidth,<br>        tileOverlap: 0,<br>        width: tileWidth,<br>        height: tileHeight<br>    }];<br><br>    // Check if viewer already exists<br>    if (!viewerRef.current) {<br>        // Create the OpenSeadragon viewer with the IIIF manifest as the tile source<br>        let viewer = OpenSeadragon({<br>            id: idPrefix,<br>            prefixUrl: &#39;/openseadragon/images/&#39;,<br>            crossOriginPolicy: &#39;Anonymous&#39;,<br>            tileSources: tileSources<br>        });<br><br>        viewerRef.current = viewer;<br>    } else {<br>        // Update the tileSources of the existing viewer<br>        viewerRef.current.open(tileSources);<br>    }<br>});<br>}, [artworkId, idPrefix]);</pre><p>I then triggered this with a ‘Start’ button and created buttons for each of the objects, which when clicked would check whether the button value corresponded to the correct answer.</p><p>I also added in a score tracking component so players could see how many correct and incorrect answers they gave and I added a one minute count down timer as I wanted to introduce a speed element to the game to make it more fun when playing solo.</p><figure><img alt="A score tracking component showing the number of correct and incorrect answers for Player 1 and Player 2 and the count down timer (with 24 seconds left)" src="https://cdn-images-1.medium.com/max/1024/1*hmasTxfBcTzDNMAdbZs68g.png" /><figcaption>The score tracking component showing the number of Correct and Incorrect answers for each player and the countdown timer</figcaption></figure><p>As the original card game is a two player game the final goal I had was to make my game two player as well. I wasn’t sure how to approach this given the time constraints and my colleague Luke came to the rescue again. He suggested using a keyboard with a number pad and assign the main numbers to Player 1 and the number pad to Player 2. That way two people could play against each other so long as they were in the same room and had an appropriate physical keyboard plugged in. It wasn’t perfect as it meant that people wouldn’t be able to play together virtual and they would need specific equipment, but it was the best option I had given the time constraints.</p><figure><img alt="A keyboard with a number pad. The main numbers are highlighted in pink with a note that these are the numbers for Player 1 and the number pad is highlighted in blue with a note that these are the numbers for Player 2." src="https://cdn-images-1.medium.com/max/1024/1*t0x93Mb1cbsPJA3izlukPQ.png" /><figcaption>A keyboard with a number pad. Player 1 can use the main numbers (highlighted in pink) and Player 2 can use the number pad (highlighted in blue)</figcaption></figure><p>I quickly integrated this featured just in time for the 4.30pm demo so that two of my colleagues could go head to head in a game of IIIFind. It was pretty tense but in the end Tristan was crowned as the Cogapp IIIFind champion.</p><p>If you’d like to have a go at playing, either solo or with a friend, <a href="https://iiifind.netlify.app/">you can do so here</a>.</p><p>You can also take a look at the code <a href="https://github.com/CogappLabs/iiifind">on GitHub</a>.</p><p><a href="https://www.cogapp.com/team/hannah-baker">Hannah</a> is a Developer at <a href="https://www.cogapp.com/">Cogapp</a>, a digital agency specialising in the cultural sector. Please get in touch if you’d like to hear more about <a href="https://www.cogapp.com/work">our work</a>.</p><p>If you’re interested in joining us for a hack day, there’s more information <a href="https://www.cogapp.com/r-d/hack-days">on our website</a>.</p><p>We’re on <a href="https://twitter.com/cogapp">Twitter</a> or you can <a href="https://www.cogapp.com/contact-us">contact us</a> via our website.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=35ef93d79ea9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cogapp/iiifind-35ef93d79ea9">IIIFind</a> was originally published in <a href="https://medium.com/cogapp">cogapp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kitsch Crochet]]></title>
            <link>https://medium.com/cogapp/kitsch-crochet-aa7c0d196c16?source=rss-430ad6e2908f------2</link>
            <guid isPermaLink="false">https://medium.com/p/aa7c0d196c16</guid>
            <category><![CDATA[hackathons]]></category>
            <category><![CDATA[crochet]]></category>
            <category><![CDATA[coghack]]></category>
            <category><![CDATA[musetech]]></category>
            <dc:creator><![CDATA[Hannah Baker]]></dc:creator>
            <pubDate>Fri, 05 Apr 2024 10:57:24 GMT</pubDate>
            <atom:updated>2024-04-05T10:57:24.939Z</atom:updated>
            <content:encoded><![CDATA[<p>For Cogapp’s latest hack day there was a bit of a twist, rather than our usual coding projects we were tasked with making something tangible. The brief was very open, we could make something with any material: thread, clay, paper, wood, etc — the sky (and budget) was the limit.</p><p>I’ve always loved making things with my hands so I was very excited about this one. I particularly love knitting and crochet, but I don’t often find the time, so it seemed like the perfect opportunity to spend the day making something with yarn. Both knitting and crochet are quite slow, so it was a challenge to think of something I could feasibly make in a day. I knew this from experience as my most ambitious project to date was a knitted jumper, which took me over a year to make!</p><figure><img alt="A rust coloured knitted jumper" src="https://cdn-images-1.medium.com/max/1024/1*Ms9LoA_XZO2fIreBYWaCig.jpeg" /><figcaption>My knitted jumper</figcaption></figure><p>The jumper was well worth the effort (if I do say so myself), but given the time constraints I had to think smaller this time. I thought it would be fun to make something playful and useless (and most importantly little), so I started hunting for a suitably whimsical pattern. After much deliberation I decided on a poodle wine bottle cover — what every classy home needs! 💅 For a small fee I bought the crochet pattern from <a href="https://www.etsy.com/uk/listing/648242378/poodle-millenium-wine-bottle-cover-pdf">Jenny Auckram on Etsy</a> (thanks Jenny) and I was ready to go.</p><p>While it may seem that crocheting a poodle wine bottle cover was unrelated to my usual programming work, fibre arts and coding share a rich history. Ada Lovelace famously said of the “Analytical Engine”, one of the first computers in the nineteenth century, “We may say most aptly that the Analytical Engine weaves algebraic patterns just as the Jacquard loom weaves flowers and leaves.”¹</p><p>Knitting and crocheting have also been used in the classroom to teach children maths and programming concepts² and ultimately to try to encourage more girls into STEM careers.³</p><p>While making my hack day project, I really enjoyed seeing the poodle slowly come to life over the course of the day. Although, I’d forgotten how much concentration crocheting takes as it involves constant counting to follow the pattern, not to mention the finger cramps. But gradually seeing the cute features come together was enough of a reward to keep me going:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rLIRqd7N7pf_qFfJKCkZhQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OgR6KLhvQz4KI7gpkGDLrg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gvGJr4u6Z5HRF8uKVPvHOg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rth1VkoibMvbRYzHIKiOgA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q6c2OBbhBMNyCRXKpxsoMw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Uxqsus-3UbvDLOFiyEyO_g.jpeg" /><figcaption>The poodle wine bottle cover being made</figcaption></figure><p>Eventually, after much love, sweat and luckily no tears, the full poodle was ready for the 4.30pm demo!</p><p>I’d also kept a little something in my back pocket, I had a top secret stretch goal that I waited until the demo to reveal.</p><p>I thought it would be interesting to compare a crochet design made my a human to one made by AI, so I’d also asked Chat GPT to generate a crochet pattern for a poodle wine bottle cover.</p><p>Here’s the prompt I gave:</p><blockquote>“Can you please write me crochet pattern for a purely decorative wine bottle cover with the characteristics of a poodle? The end product should be able to cover an average sized wine bottle (height: 30cm, diameter of base: 7cm) and it should cover the entire wine bottle, so there should be instructions on how to make the poodles head and body. The pattern should use a 3.5mm crochet hook and 8 ply yarn. Pompoms can be used in the pattern if you choose. Black thread can also be used in the pattern to embroider features such as eyes and nose.”</blockquote><p>And here is the end result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qv0VYWoEUOCDRS_5lzUWHQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7JIR91PHvAEibKQB5lJq1A.jpeg" /><figcaption>The poodle wine bottle cover designed by Chat GPT</figcaption></figure><p>As you can see it didn’t deliver on the dimensions or the functionality - there’s no way of actually using this as a wine bottle cover.</p><p>I particularly like the tongue detail, the instructions for which were:</p><blockquote>“Tongue: Cut a small piece of pink yarn and attach it as the tongue below the nose.”</blockquote><p>I also enjoyed the suggestion to optionally “attach pompoms along the body for a playful touch”, but unfortunately I ran out of time and wasn’t able to implement this.</p><p>Suffice to say I think crochet pattern designers are safe from the AI-takes-over-the-world impending disaster (for now at least).</p><p>[1]: The MIT Press, <em>Celebrating Ada Lovelace, </em>https://mitpress.mit.edu/celebrating-ada-lovelace/</p><p>[2]: Ashley Brickeen, <em>Knitting is Coding and More</em>, https://waldorfpeninsula.org/blog/knitting-coding/</p><p>[3]: Holly Korbey, <em>Girls Knit Their Way to a Math Career</em>, https://www.uml.edu/news/news-articles/2017/bright-knitting.aspx</p><p><a href="https://www.cogapp.com/team/hannah-baker">Hannah</a> is a Developer at <a href="https://www.cogapp.com/">Cogapp</a>, a digital agency specialising in the cultural sector. Please get in touch if you’d like to hear more about <a href="https://www.cogapp.com/work">our work</a>.</p><p>If you’re interested in joining us for a hack day, there’s more information <a href="https://www.cogapp.com/r-d/hack-days">on our website</a>.</p><p>We’re on <a href="https://twitter.com/cogapp">Twitter</a> or you can <a href="https://www.cogapp.com/contact-us">contact us</a> via our website.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aa7c0d196c16" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cogapp/kitsch-crochet-aa7c0d196c16">Kitsch Crochet</a> was originally published in <a href="https://medium.com/cogapp">cogapp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[❤️ ️Art of Attraction ❤️]]></title>
            <link>https://medium.com/cogapp/%EF%B8%8F-%EF%B8%8Fart-of-attraction-%EF%B8%8F-6f50a99c403f?source=rss-430ad6e2908f------2</link>
            <guid isPermaLink="false">https://medium.com/p/6f50a99c403f</guid>
            <category><![CDATA[online-games]]></category>
            <category><![CDATA[coghack]]></category>
            <dc:creator><![CDATA[Hannah Baker]]></dc:creator>
            <pubDate>Fri, 09 Feb 2024 16:42:05 GMT</pubDate>
            <atom:updated>2024-02-09T16:42:05.493Z</atom:updated>
            <content:encoded><![CDATA[<p>Cogapp recently teamed up with the <a href="https://www.nga.gov/"><strong>National Gallery of Art</strong></a> in Washington D.C. to create games from their collection. The NGA were interested in how games could be used to help people experience their collection and learn more about art in general, and Cogapp were more than happy to oblige and partner up with them for our 25th hack day. The NGA already have a fun and engaging game called <a href="https://www.nga.gov/artle.html"><strong>Artle</strong></a>, where the user is given up to four guesses to correctly name an artist from seeing four of their artworks, and the success of this had inspired them to develop more games. If you haven’t played Artle yet, I encourage you to give it a go.</p><p>At a Cogapp social a few weeks before the hack day, we had the bright idea of basing our games on British gameshows from the 80’s and 90’s, this seemed quite appropriate for a collaboration with an American art gallery. After some lively discussion, I came up with the idea of basing a game on a particular dating show which used to air on Saturday nights in the UK. My lips are sealed, but see if you can guess which show inspired me when you hear more about the game 😉</p><p>Due to the loose dating theme, I decided to call my game “Art of Attraction”. I planned to have three artworks that are hidden from the user, and give the user the opportunity to ask three questions which would be answered by each of the three artworks, as though they were a person. Once the user had read the answers from each of the three artworks, they could then choose their favourite artwork based on their witty replies alone – at this point they still wouldn’t have actually seen any of the artworks. Once the user had locked in their decision, it would be time for the big reveal. The chosen, favourite artwork would be revealed first, followed by the other two rejected artworks, and it may be that the user feels they made a terrible mistake and are hit with an overwhelming sense of regret!</p><p>I thought this would be a fun way of being matched with an artwork that you may genuinely like, and it could be played multiple times to build up an idea of the types of artworks you like, and maybe get an idea of which artworks you’d like to go and see in real life in the National Gallery of Art.</p><p>My plan for building the game was to use Next.js to build the UI (user interface), and to use OpenAI’s API to send questions to ChatGPT to generate the “artworks” answers to the series of questions. I had a stretch goal of pulling in three random artworks from the NGA’s collection, but for the first iteration of the game I would hard code the three artworks.</p><p>The first step was to create a UI inspired by the set of the aforementioned dating show, so I made everything various shades of pink. 💕 The UI features three pink boxes which act as placeholders for the three hidden artworks, and a form with three sample questions and a text input so the user can get creative and come up with their own questions if they choose. Once one of the sample questions has been asked, it’s replaced with a new question so the user is never short on options. To give you an idea, the initial sample questions are:</p><ol><li>I love spending time looking at beautiful scenery, do you think I’ll enjoy looking at you?</li><li>My home is filled with interesting objects that each have a unique story, do you think you’d fit in there?</li><li>I’m drawn to thought-provoking and emotionally charged art. Can you evoke strong feelings or reflections in me?</li></ol><p>When the user submits the form with their chosen question, the OpenAI’s API is used to send three separate API calls to ChatGPT to generate responses from each of the three artworks. I used the following prompt, where [Title], [Artwork] and [Question] are placeholders for the true values:</p><blockquote>“Please answer the following question based on the themes of the painting “[Title]” by “[Artist]”. Your answer should be in first person, as though it’s the painting itself that is answering. Don’t include any mention of the artwork title, the artists name, or describe anything specific about the painting itself. Simply use the painting as the inspiration for your answers. Please keep your answer short and succinct, and ideally a bit cheeky. Use simple language and don’t address the interviewer with pet names.</blockquote><blockquote>Question: [Question]”</blockquote><p>The prompt developed to include “don’t address the interviewer with pet names” because when I asked for the answers to be a bit cheeky in an attempt to make the answers more humorous, they became filled with “Of course honey”, “Let me tell you baby” etc, and nobody wants to be on the receiving end of a stranger addressing you with a term of endearment.</p><p>While the game did lead to some amusing outcomes, in general ChatGPT isn’t very good at being funny – maybe that will change with time. Instead, the answers were somewhat humorous because of how dry and soulless they were. Here are some examples:</p><p><strong><em>Question: </em></strong>“I love spending time looking at beautiful scenery, do you think I’ll enjoy looking at you?”</p><p><strong><em>Answer: </em></strong>“Absolutely! I may not be rolling hills or snow-capped peaks, but I’ve got my own kind of beauty. Feast your eyes on the luscious fruits, the shimmering oysters, and the inviting glass of wine. I may not have breathtaking vistas, but I can certainly make your taste buds tingle and your mouth water. So if you appreciate the finer things in life, I guarantee you’ll find me quite the visual treat.”</p><p><strong><em>Question: </em></strong>“My home is filled with interesting objects that each have a unique story, do you think you’d fit in there?”</p><p><strong><em>Answer: </em></strong>“Of course! I would be the perfect addition to your home. With my captivating presence and cozy cushion, I’ll bring a touch of winter charm and feline grace to your collection. Plus, I have plenty of stories to share, from snowy adventures to lazy days by the fireplace. So, make some space and let me purr-fectly fit into your fascinating world!”</p><p><strong><em>Question: </em></strong>“Do you like piña coladas?”</p><p><strong><em>Answer: </em></strong>“As a painting, I am devoid of taste buds, so piña coladas are lost on me.”</p><p>Once the user assesses the responses and chooses their favourite artwork, it’s time for the big reveal. The pink placeholder is then updated to display a thumbnail of the chosen artwork, and the image acts as a link to the artwork on the National Gallery of Art’s website so the users can learn more about it if they wish. For instance, if the chosen artwork was “<em>Winter: Cat on a Cushion (L’hiver: Chat sur un coussin)” </em>by<em> </em><strong>Théophile Alexandre Steinlen </strong>it would display as below, with a link to <a href="https://www.nga.gov/collection/art-object-page.66755.html">the artwork on the NGA’s website</a>.</p><figure><img alt="A pink rectangle with a small image thumbnail displayed inside it. The thumbnail shows a cat on a cushion." src="https://cdn-images-1.medium.com/max/838/1*JWr7o_79kyFmN9ipxv5cdw.png" /><figcaption>Thumbnail of “Winter: Cat on a Cushion (L’hiver: Chat sur un coussin)”<em> </em>by<em> </em>Théophile Alexandre Steinlen displayed in the pink placeholder box</figcaption></figure><p>Sadly I didn’t reach my stretch goal of randomising the artworks, but I laid the groundwork for this to be implemented in the future. The NGA use the following data schema for each of their artworks, so although I only needed the Title and Attribution information I hardcoded the three artworks using the entire object so that the they could easily be swapped out for other, randomised artworks in the future. I also thought it would be useful to keep all of the data for other possible enhancements. For instance, rather than displaying a thumbnail of each of the artworks at the end of the game, the <a href="https://www.cogapp.com/r-d/iiif"><strong>IIIF</strong></a> manifest (“iiifurl”) could be used to show a super high resolution image using a IIIF viewer like <a href="https://openseadragon.github.io/"><strong>OpenSeadragon</strong></a> instead.</p><pre>{<br>  &quot;accessioned&quot;: &quot;1&quot;,<br>  &quot;accessionnum&quot;: &quot;1986.4.1&quot;,<br>  &quot;locationid&quot;: &quot;&quot;,<br>  &quot;title&quot;: &quot;Winter: Cat on a Cushion (L&#39;hiver: Chat sur un coussin)&quot;,<br>  &quot;displaydate&quot;: &quot;&quot;,<br>  &quot;beginyear&quot;: &quot;1859&quot;,<br>  &quot;endyear&quot;: &quot;1923&quot;,<br>  &quot;visualbrowsertimespan&quot;: &quot;1851 to 1875&quot;,<br>  &quot;medium&quot;: &quot;color lithograph&quot;,<br>  &quot;dimensions&quot;: &quot;sheet: 45 x 57.7 cm (17 11/16 x 22 11/16 in.)&quot;,<br>  &quot;inscription&quot;: &quot;upper right in plate artist&#39;s monogram; lower right /in graphite: Steinlen&quot;,<br>  &quot;markings&quot;: &quot;&quot;,<br>  &quot;attributioninverted&quot;: &quot;Steinlen, Théophile Alexandre&quot;,<br>  &quot;attribution&quot;: &quot;Théophile Alexandre Steinlen&quot;,<br>  &quot;provenancetext&quot;: &quot;&quot;,<br>  &quot;creditline&quot;: &quot;Gift of Lesley Hughes&quot;,<br>  &quot;classification&quot;: &quot;Print&quot;,<br>  &quot;subclassification&quot;: &quot;&quot;,<br>  &quot;visualbrowserclassification&quot;: &quot;print&quot;,<br>  &quot;parentid&quot;: &quot;&quot;,<br>  &quot;isvirtual&quot;: &quot;0&quot;,<br>  &quot;departmentabbr&quot;: &quot;CG-E&quot;,<br>  &quot;portfolio&quot;: &quot;&quot;,<br>  &quot;series&quot;: &quot;&quot;,<br>  &quot;volume&quot;: &quot;&quot;,<br>  &quot;watermarks&quot;: &quot;&quot;,<br>  &quot;lastdetectedmodification&quot;: &quot;2023-05-10 13:28:58.583-04&quot;,<br>  &quot;wikidataid&quot;: &quot;Q74071217&quot;,<br>  &quot;customprinturl&quot;: &quot;&quot;,<br>  &quot;images&quot;: [<br>  {<br>      &quot;uuid&quot;: &quot;16943d3f-1589-4d52-b613-80856cec6ba2&quot;,<br>      &quot;iiifurl&quot;: &quot;https://api.nga.gov/iiif/16943d3f-1589-4d52-b613-80856cec6ba2&quot;,<br>      &quot;iiifthumburl&quot;: &quot;https://api.nga.gov/iiif/16943d3f-1589-4d52-b613-80856cec6ba2/full/!200,200/0/default.jpg&quot;,<br>      &quot;viewtype&quot;: &quot;primary&quot;,<br>      &quot;sequence&quot;: &quot;0&quot;,<br>      &quot;width&quot;: &quot;4736&quot;,<br>      &quot;height&quot;: &quot;3711&quot;,<br>      &quot;maxpixels&quot;: &quot;&quot;,<br>      &quot;created&quot;: &quot;2010-09-01 11:39:07-04&quot;,<br>      &quot;modified&quot;: &quot;2023-07-27 15:46:52-04&quot;,<br>      &quot;depictstmsobjectid&quot;: &quot;66755&quot;,<br>      &quot;assistivetext&quot;: &quot;&quot;<br>  }<br>  ],<br>  &quot;primaryImage&quot;: &quot;https://api.nga.gov/iiif/16943d3f-1589-4d52-b613-80856cec6ba2/full/!200,200/0/default.jpg&quot;,<br>  &quot;primaryImageHeight&quot;: &quot;3711&quot;,<br>  &quot;primaryImageWidth&quot;: &quot;4736&quot;,<br>  &quot;Technique&quot;: [<br>  &quot;lithograph&quot;<br>  ],<br>  &quot;Keyword&quot;: [<br>  &quot;Cat&quot;<br>  ],<br>  &quot;Theme&quot;: [<br>  &quot;mammal&quot;<br>  ],<br>  &quot;School&quot;: [<br>  &quot;French&quot;<br>  ],<br>  &quot;objectID&quot;: &quot;66755&quot;<br>}</pre><p><a href="https://art-of-attraction.netlify.app/">If you’d like to give the game a go and see if you find your perfect match, you can do so here</a>. As the artworks are still hard coded you can only enjoy the big reveal once. My advice is to savour it!</p><p><a href="https://github.com/CogappLabs/art-of-attraction">If you’re interested you can also see the code here</a>.</p><p><a href="https://www.cogapp.com/team/hannah-baker">Hannah</a> is a Developer at <a href="https://www.cogapp.com/">Cogapp</a>, a digital agency specialising in the cultural sector. Please get in touch if you’d like to hear more about <a href="https://www.cogapp.com/work">our work</a>.</p><p>If you’re interested in joining us for a hack day, there’s more information <a href="https://www.cogapp.com/r-d/hack-days">on our website</a>.</p><p>We’re on <a href="https://twitter.com/cogapp">Twitter</a> or you can <a href="https://www.cogapp.com/contact-us">contact us</a> via our website.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6f50a99c403f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cogapp/%EF%B8%8F-%EF%B8%8Fart-of-attraction-%EF%B8%8F-6f50a99c403f">❤️ ️Art of Attraction ❤️</a> was originally published in <a href="https://medium.com/cogapp">cogapp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mystery Movie — Lights, camera, AIction!]]></title>
            <link>https://medium.com/cogapp/mystery-movie-lights-camera-aiction-e1e4930eb706?source=rss-430ad6e2908f------2</link>
            <guid isPermaLink="false">https://medium.com/p/e1e4930eb706</guid>
            <category><![CDATA[hackathons]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[movies]]></category>
            <category><![CDATA[coghack]]></category>
            <dc:creator><![CDATA[Hannah Baker]]></dc:creator>
            <pubDate>Wed, 11 Oct 2023 14:54:25 GMT</pubDate>
            <atom:updated>2023-11-14T13:01:24.375Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Mystery Movie – lights, camera, AIction!</strong></h3><p>For Cogapp’s 24th hackday there was one rule and one rule only – make something with AI. In other words: “The first rule of the Cogapp hack day is: you must make something with AI. The second rule of the Cogapp hack day is: you MUST make something with AI!”, said in the voice of Tyler Durden in <strong>Fight Club</strong>.</p><p>Having had very limited interaction with AI up to this point, I was a bit <strong>Clueless</strong> and apprehensive about this rule, it felt like <strong>Mission Impossible </strong>(see what I did there?). Being unfamiliar with AI tools, I didn’t know what their capabilities were, but this was the perfect opportunity to dip my toes into the AI water.</p><p>After lots of back and forth and reading various articles, I eventually had a plan! I was going to make a Mystery Movie game. The idea was to make a simple UI with a “Play Now” button, which used AI to generate three images based on the beginning, middle and end of the plot of a random movie. The user could then try to guess the movie title behind the scenes.</p><p>I decided to use Next.js, which I’d never used before, so I incorporated AI into my project in yet another capacity – by relying heavily on ChatGPT to help me write the code. I asked ChatGPT lots of questions throughout the day and with some refinement I pieced together various code snippets in a <strong>Frankenstein</strong>-esque manner (okay, I’ll stop now). This was an interesting way of working given the AI theme of the hack day, and with lots of hand holding, I ended up learning a lot about Next.js in a short amount of time.</p><p>Once I’d decided to use Next.js, the first thing I needed was an API to get the plot of a movie, which could then be split into three sentences. I did some Googling and decided to use <a href="https://www.omdbapi.com/">The Open Movie Database</a>, as it was simple to use and provided the option of a short or full movie summary. It was exactly what I needed: it was like <strong>The Sound Of Music </strong>to my ears (I’m out of control)!</p><p>The output of the API call was very comprehensive, giving me the movie rating, information about awards, and even a link to a movie poster. But the only thing I was interested in was the plot. I started off by hard coding the movie title, and would work on randomising it once I’d connected all of the dots.</p><p>Here’s the response from the OMDb API call for the movie <strong>Alien</strong>:</p><pre>{<br>  Title: &#39;Alien&#39;,<br>  Year: &#39;1979&#39;,<br>  Rated: &#39;R&#39;,<br>  Released: &#39;22 Jun 1979&#39;,<br>  Runtime: &#39;117 min&#39;,<br>  Genre: &#39;Horror, Sci-Fi&#39;,<br>  Director: &#39;Ridley Scott&#39;,<br>  Writer: &quot;Dan O&#39;Bannon, Ronald Shusett&quot;,<br>  Actors: &#39;Sigourney Weaver, Tom Skerritt, John Hurt&#39;,<br>  Plot: `In the distant future, the crew of the commercial <br>  spaceship Nostromo are on their way home when they pick <br>  up a distress call from a distant moon. The crew are under <br>  obligation to investigate and the spaceship descends on the<br>  moon afterwards. After a rough landing, three crew members <br>  leave the spaceship to explore the area on the moon. At the <br>  same time as they discover a hive colony of some unknown creature, <br>  the ship&#39;s computer deciphers the message to be a warning, not a <br>  distress call. When one of the eggs is disturbed, the crew realizes <br>  that they are not alone on the spaceship and they must deal with the <br>  consequences.`,<br>  Language: &#39;English&#39;,<br>  Country: &#39;United Kingdom, United States&#39;,<br>  Awards: &#39;Won 1 Oscar. 18 wins &amp; 22 nominations total&#39;,<br>  Poster: &#39;https://m.media-amazon.com/images/M/MV5BOGQzZTBjMjQtOTVmMS00NGE5LWEyYmMtOGQ1ZGZjNmRkYjFhXkEyXkFqcGdeQXVyMjUzOTY1NTc@._V1_SX300.jpg&#39;,<br>  Ratings: [<br>    { Source: &#39;Internet Movie Database&#39;, Value: &#39;8.5/10&#39; },<br>    { Source: &#39;Rotten Tomatoes&#39;, Value: &#39;98%&#39; },<br>    { Source: &#39;Metacritic&#39;, Value: &#39;89/100&#39; }<br>  ],<br>  Metascore: &#39;89&#39;,<br>  imdbRating: &#39;8.5&#39;,<br>  imdbVotes: &#39;904,074&#39;,<br>  imdbID: &#39;tt0078748&#39;,<br>  Type: &#39;movie&#39;,<br>  DVD: &#39;01 Jun 1999&#39;,<br>  BoxOffice: &#39;$81,900,459&#39;,<br>  Production: &#39;N/A&#39;,<br>  Website: &#39;N/A&#39;,<br>  Response: &#39;True&#39;<br>}</pre><p>With the movie plot in hand, I added this to the moviePlot variable and used the OpenAI API to send the following prompt to ChatGPT:</p><p><em>“Please split the following movie plot into 3 short sentences. 1 sentence should explain the beginning of the movie, 1 should explain the middle and 1 should explain the end.</em></p><p><em>Movie plot: ${moviePlot}”</em></p><p>Like a true AI maestro, ChatGPT promptly delivered the requested sentences. Here’s what I was given for <strong>Alien</strong> (#spoileralert):</p><ol><li>“In the distant future, the crew of the commercial spaceship Nostromo receive a distress call from a distant moon and decide to investigate, even though their journey back home was almost complete.”</li><li>“After a rough landing on the moon, three crew members explore the area and stumble upon a hive colony of an unknown creature, just as the ship’s computer deciphers the message to be a warning rather than a distress call.”</li><li>“When one of the eggs in the hive colony is disturbed, the crew realizes they are not alone on the spaceship and must confront the terrifying consequences of their investigation.”</li></ol><p>I was getting close to reaching my <strong>Final Destination </strong>(last one, I promise). The last piece of the puzzle was sending off the three sentences as prompts to an AI image generator. As I was already using the OpenAI API, this seemed like the easiest option.</p><p>I was quite impressed with the results, although some movies produced better images than others. The images produced for <strong>Alien</strong> were quite good and managed to incorporate some of the key details from the sentences:</p><figure><img alt="The Mystery Movie UI with three images based on the movie “Alien”" src="https://cdn-images-1.medium.com/max/1024/1*-gC5ldwga6eg7pCidocYOw.png" /><figcaption>AI generated images for “Alien”</figcaption></figure><p>Here are some of the other more successful results:</p><figure><img alt="The Mystery Movie UI with three images based on the movie “Titanic”" src="https://cdn-images-1.medium.com/max/1024/1*TvJOBvOCVrF1syngO7DNCw.png" /><figcaption>AI generated images for “Titanic”</figcaption></figure><figure><img alt="The Mystery Movie UI with three images based on the movie “The Wizard of Oz”" src="https://cdn-images-1.medium.com/max/1024/1*SbfiMq46AOHVGLYq8-y4BA.png" /><figcaption>AI generated images for “The Wizard of Oz”</figcaption></figure><p>At this stage, I was still hard coding the movie title each time, so the final step was to produce a random result. Sadly, the OMDb API doesn’t allow you to return a random movie as the title is a required field, so instead I manually chose some famous films and added them to an array. I then used the array to randomly select one of the movie titles each time the button is pressed.</p><p>It was a really fun project to work on, and it would be interesting to continue playing around with the parameters to see how the results would change. For instance, outputting each of the images in the style of the movie poster returned by OMDb, or just using the movie title to return a single image — with AI, the possibilities are a <strong>‘NeverEnding Story’</strong>! 😉</p><p>You can play Mystery Movie here: <a href="https://mystery-movie.netlify.app/">https://mystery-movie.netlify.app/</a></p><p>Or take a look at the code: <a href="https://github.com/CogappLabs/mystery-movie">https://github.com/CogappLabs/mystery-movie</a></p><p><a href="https://www.cogapp.com/team/hannah-baker">Hannah</a> is a Developer at <a href="https://www.cogapp.com/">Cogapp</a>, a digital agency specialising in the cultural sector. Please get in touch if you’d like to hear more about our other <a href="https://blog.cogapp.com/">hack-day projects</a> or any of <a href="https://www.cogapp.com/work">our other work</a>.</p><p>If you’re interested in joining us for a hack day, there’s more information <a href="https://www.cogapp.com/r-d/hack-days">on our website</a>.</p><p>We’re on <a href="https://twitter.com/cogapp">Twitter</a> or you can <a href="https://www.cogapp.com/contact-us">contact us</a> via our website.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1e4930eb706" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cogapp/mystery-movie-lights-camera-aiction-e1e4930eb706">Mystery Movie — Lights, camera, AIction!</a> was originally published in <a href="https://medium.com/cogapp">cogapp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Crowdsourcing 404s]]></title>
            <link>https://medium.com/cogapp/crowdsourcing-404s-2a21d78f350a?source=rss-430ad6e2908f------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a21d78f350a</guid>
            <category><![CDATA[hackday]]></category>
            <category><![CDATA[coghack]]></category>
            <category><![CDATA[musetech]]></category>
            <dc:creator><![CDATA[Hannah Baker]]></dc:creator>
            <pubDate>Fri, 26 May 2023 15:34:38 GMT</pubDate>
            <atom:updated>2023-05-26T15:34:38.017Z</atom:updated>
            <content:encoded><![CDATA[<h4>Engaging your audience in an unlikely place</h4><p>For Cogapp’s 23rd hack day, we teamed up with the <a href="https://www.artic.edu/">Art Institute of Chicago</a>, who have a great API that provides JSON-formatted data, allowing developers like us to integrate the museum’s public data into our own projects. This API is the same tool that powers the AIC website.</p><p>For my project, I decided to tackle the age-old problem of the boring 404 error page and come up with a solution to make a (marginally) funner experience for a user who finds themselves lost on a website.</p><p>My idea was to ask users who encountered a 404 page to decide whether a random artwork from the AIC’s collection was relevant for such a page. For instance, if the user deemed the artwork to have a theme such as lost, missing, fail, oops, cry, or sad, however tenuously, they would be asked to provide a (preferably humorous) sentence to fill in the blank at the start of this statement: “_________. Sorry, we can’t find that page. You’ll find loads to explore on the home page.” (A bit like playing the 1950’s party game <a href="https://en.wikipedia.org/wiki/Mad_Libs">Mad Libs</a>). This sentence would then be displayed alongside the approved artwork on future 404 pages.</p><p>As the AIC’s API provides access to over 100,000 artworks from the museum’s collection, I decided to whittle down the sample of artworks to those that hadn’t been viewed much. I thought this would be an interesting way to highlight some of the AIC’s lesser seen works, and luckily, it was easy to achieve this because the API includes a ‘has_not_been_viewed_much’ key.</p><p>So, I structured my API call to only return artworks that haven’t been seen much and are in the public domain, and to only return the key pieces of information I needed for my project, which were the artwork id, image id and title. The results from my API call looked like this:</p><pre>&quot;data&quot;: [<br>  {<br>      &quot;_score&quot;: 6.8850713,<br>      &quot;is_public_domain&quot;: true,<br>      &quot;has_not_been_viewed_much&quot;: true,<br>      &quot;id&quot;: 59819,<br>      &quot;image_id&quot;: &quot;30dff056-2127-efac-3438-0e46c697fecd&quot;,<br>      &quot;title&quot;: &quot;High Chair&quot;<br>  },<br>  {<br>      &quot;_score&quot;: 6.8850713,<br>      &quot;is_public_domain&quot;: true,<br>      &quot;has_not_been_viewed_much&quot;: true,<br>      &quot;id&quot;: 148350,<br>      &quot;image_id&quot;: &quot;d23cd8a0-f54b-366d-3c50-955f9889eaf5&quot;,<br>      &quot;title&quot;: &quot;Female Figure with Two Joined Heads&quot;<br>  },<br>  {<br>      &quot;_score&quot;: 6.8850713,<br>      &quot;is_public_domain&quot;: true,<br>      &quot;has_not_been_viewed_much&quot;: true,<br>      &quot;id&quot;: 90312,<br>      &quot;image_id&quot;: &quot;340ce78b-cf17-6818-7311-1ab2fdbf4e57&quot;,<br>      &quot;title&quot;: &quot;Vision&quot;<br>  },<br>  {<br>      &quot;_score&quot;: 6.8850713,<br>      &quot;is_public_domain&quot;: true,<br>      &quot;has_not_been_viewed_much&quot;: true,<br>      &quot;id&quot;: 44750,<br>      &quot;image_id&quot;: &quot;96cb8426-330a-ac3c-ba9d-172d9e78b9ce&quot;,<br>      &quot;title&quot;: &quot;Madonna and Child on Clouds&quot;<br>  },<br>]</pre><p>Once I had this data, the next step was to think of a way to gather and store the user input. I decided to use a simple form to capture the user’s decision and their comical accompanying sentence for the artwork. As my time was limited, I focused on functionality over style and design, so this was the end result of the form (I know, it’s not very pretty):</p><figure><img alt="A simple, un-styled form in a web browser" src="https://cdn-images-1.medium.com/max/1024/1*AVvM6T8jNQaC7phsj8Z_Wg.png" /><figcaption>A simple form to capture the users answer</figcaption></figure><p>If the user didn’t think the artwork was appropriate for a 404 page, they had the option to say ‘No’ and the artwork would be permanently discarded, never to be seen on a 404 page again (cue dramatic music).</p><p>Underneath the form, I wanted to display the artwork in as high a quality as possible, along with the artwork title — both so that the user knew what the artwork was, and to help provide them with inspiration. As the AIC offer IIIF manifests for all of their public domain artworks, I was able to display a high-quality copy of the artwork very easily. The IIIF manifests follow a standardised API, meaning they can be used with any IIIF-compliant tools, and I chose to use <a href="https://openseadragon.github.io/">OpenSeadragon</a>.</p><p>To display the artwork in an OpenSeadragon viewer, I simply pulled in a random artwork from my data sample and injected the artwork id into the AIC’s uniform IIIF manifest URL and used that to generate an OpenSeadragon viewer:</p><pre>// Generate an OSD viewer for a provided artwork, and display in the relevant container<br>export function generateOSDViewer(artwork, id) {<br>    // Construct the manifest url <br>    let manifestUrl = &#39;https://api.artic.edu/api/v1/artworks/&#39; + artwork.id + &#39;/manifest.json&#39;;<br><br>    // Fetch the IIIF manifest<br>    fetch(manifestUrl)<br>    .then(response =&gt; response.json())<br>    .then(manifest =&gt; {<br>        // Extract the image URL and tile information from the manifest<br>        var imageUrl = manifest[&quot;sequences&quot;][0][&quot;canvases&quot;][0][&quot;images&quot;][0][&quot;resource&quot;][&quot;@id&quot;];<br>        var tileWidth = manifest[&quot;sequences&quot;][0][&quot;canvases&quot;][0][&quot;images&quot;][0][&quot;resource&quot;][&quot;width&quot;];<br>        var tileHeight = manifest[&quot;sequences&quot;][0][&quot;canvases&quot;][0][&quot;images&quot;][0][&quot;resource&quot;][&quot;height&quot;];<br>        <br>        // Construct the OpenSeadragon tileSources object<br>        var tileSources = [{<br>          // ...construct tileSources object here...<br>        }];<br><br>        // Create the OpenSeadragon viewer with the IIIF manifest as the tile source<br>        let viewer = OpenSeadragon({<br>          // ...create OpenSeadragon viewer here...<br>        });<br><br>        return viewer;<br>    })<br>    .catch(error =&gt; console.error(error));<br><br>}</pre><p>Adding this to the page allowed the user to see a high resolution display of the artwork with the ability to zoom in and out, and to move around the artwork to see different areas in more detail:</p><figure><img alt="An artwork depicting a woman in Victorian clothing, shown in an OpenSeadragon viewer" src="https://cdn-images-1.medium.com/max/711/1*qDeawVV9GtLN5dpV2NR4LQ.png" /><figcaption>‘Mrs. Vanderveer, or Mrs. Vandeveer’ artwork in OpenSeadragon viewer. The artwork is public domain.</figcaption></figure><p>For the hack day, I wanted a quick and easy way to store the data, so I opted to store the user-approved artworks and sentences in the browser’s local storage. This approach wouldn’t work in the real world, as the data would need to be stored in a centralised location so that the list of approved and discarded artworks would be the same for all users, but it was a quick way to spin up a demo ready for the 4.30pm deadline, so I went with it.</p><p>Assuming at least one artwork has been approved, then each time a user encountered a 404 error they would either be shown a 404 page with a randomly selected artwork from the approved list along with the accompanying sentence, or they would see the form with the ability to vote on a new artwork. If it was the latter, they could then decide whether it should be stored to be enjoyed by future lost users or permanently discarded as it was off-topic for a 404 image.</p><p>I certainly had fun testing the project and trying to come up with sentences for some artworks. Admittedly, I’m no comedian but here’s an attempt that made me chuckle:</p><figure><img alt="A 404 page showing a sculpture of a woman with two heads, and the sentence: Let’s put our heads together and figure out what’s happened here… Sorry, we can’t find that page. You’ll find loads to explore on the home page." src="https://cdn-images-1.medium.com/max/939/1*PEWej5llvox8hc8g4mb9Vw.png" /><figcaption>An example 404 page with the sculpture ‘Female Figure with Two Joined Heads’. The artwork is public domain.</figcaption></figure><p>I warned you, I’m no comedian.</p><p>I had a great time working on this hack day project and I was happy with the end results, although there are certainly some updates and enhancements that would need to be made in order for it to be a viable feature on a real life website. For instance, as mentioned previously, the data would need to be stored in a centralised location (not in local storage) and the owners of the website would need to have the ability to monitor and approve the sentences accompanying the images (to weed out any dull or inappropriate entries). However, it would be exciting to see users actively engaging with and shaping the content of a website, so it could be a feature worth improving and refining in the future.</p><p>So, the next time you encounter a dull 404 error page, remember that there are some kind people out there working hard to make them less boring.</p><p>Have a go with the <a href="https://fun-404.netlify.app/">live demo</a>, or <a href="https://github.com/CogappLabs/fun-404">take a look at the source code</a>.</p><p><a href="https://www.cogapp.com/team/hannah-baker">Hannah</a> is a Developer at <a href="https://www.cogapp.com/">Cogapp</a>, a digital agency specialising in the cultural sector. Please get in touch if you’d like to hear more about our other <a href="https://blog.cogapp.com/">hack-day projects</a> or any of <a href="https://www.cogapp.com/work">our other work</a>.</p><p>We’re on <a href="https://twitter.com/cogapp">Twitter</a> or you can <a href="https://www.cogapp.com/contact-us">contact us</a> via our website.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a21d78f350a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cogapp/crowdsourcing-404s-2a21d78f350a">Crowdsourcing 404s</a> was originally published in <a href="https://medium.com/cogapp">cogapp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[USA States Challenge]]></title>
            <link>https://medium.com/cogapp/usa-states-challenge-b7d9b4fc027b?source=rss-430ad6e2908f------2</link>
            <guid isPermaLink="false">https://medium.com/p/b7d9b4fc027b</guid>
            <category><![CDATA[maps]]></category>
            <category><![CDATA[hackathons]]></category>
            <category><![CDATA[coghack]]></category>
            <category><![CDATA[musetech]]></category>
            <dc:creator><![CDATA[Hannah Baker]]></dc:creator>
            <pubDate>Wed, 24 Aug 2022 10:12:08 GMT</pubDate>
            <atom:updated>2022-08-24T10:12:08.995Z</atom:updated>
            <content:encoded><![CDATA[<h4>Can you name all fifty states?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*REp6b5cKXQqU_0tptcdxuw.jpeg" /><figcaption>Map of Southern California from the LMEC collection</figcaption></figure><p>For Cogapp’s July hack day, we were given free rein to explore the <a href="https://www.leventhalmap.org/">Leventhal Map &amp; Education Center’s</a> extensive collection, and create a project based on the theme ‘Maps’. This was my first hack day at Cogapp so I was excited to get stuck in.</p><p>My mother grew up in Brockton, MA, and as a large portion of the collection is maps of the Massachusetts area, I was inspired to create an educational version of a game she would have us play every Thanksgiving — “Can you name all 50 US states?” (Spoiler: I can’t).</p><p>I thought that creating an interface where a user guesses a state name, and is then shown a random collection item relevant to that state, would be a fun way to explore the collection, allowing the user to find new items in a serendipitous way. In order to complete the project in the given time, I teamed up with <a href="https://medium.com/@nuaahmed">Noor</a> to lend a helping hand.</p><p>After setting up a simple user interface, the first step was to create an object containing all of the state names. This was needed so that the users input could be cross checked against it. Rather than attempting to name all of the states at this stage, I Googled it. This gave me the opportunity to revise all of the state names and try desperately to remember all 50, so I could impress with my ability to win my own game during the hack day demo (Spoiler: I didn’t).</p><figure><img alt="The USA States Challenge UI, with an input for users to type a state name" src="https://cdn-images-1.medium.com/max/1024/1*GL2KiyKMOx-Gn5f55eF-ig.png" /><figcaption>The USA States Challenge UI</figcaption></figure><figure><img alt="An JavaScript object containing all 50 state names" src="https://cdn-images-1.medium.com/max/1024/1*6FOE3lAJHfFdW-qlA5dt_A.png" /><figcaption>A JavaScript object containing all 50 state names</figcaption></figure><p>Once I had all of the state names in an object, the next step was to check whether the users input was a valid state name. As an additional challenge, the state name needed to be spelt correctly (if you don’t think that’s a challenge, see this list of <a href="https://www.mentalfloss.com/article/651090/most-misspelled-states">America’s most commonly misspelled state names</a>). If the state name was <em>incorrect</em>, I wanted to show the user a notification letting them know, and if the state name was correct but they <em>already submitted that answer</em>, I would also show them a notification.</p><figure><img alt="A notification showing the user that ‘Hawiia’ is not a valid state name" src="https://cdn-images-1.medium.com/max/646/1*VQzloYRFf2ieA3l3pYe1AQ.png" /><figcaption>A notification showing the user that ‘Hawiia’ is not a valid state name</figcaption></figure><p><strong>Now we get to the maps!</strong></p><p>The <a href="https://www.leventhalmap.org/">LMEC</a> digital collection has over 11,000 items, that can be queried using a JSON API and a IIIF API. If the state name is correct, the Digital Commonwealth’s JSON API is used to search for that state name in the LMEC collection portal and programmatically retrieve metadata about relevant collection items.</p><figure><img alt="A JSON object containing a collection items metadata" src="https://cdn-images-1.medium.com/max/945/1*7DpxbDKC0lorwPb0p2Ryow.png" /><figcaption>A JSON object containing a collection items metadata</figcaption></figure><p>One of the collection items is then randomly selected, and the image metadata is injected into a IIIF API call so that the image can be displayed on the page for the user to see.</p><p>The map is only displayed until the user guesses another state name correctly. The correct answers are also added to the Correct Answers list as hyperlinks to the generated map, so that the user can view the maps again.</p><figure><img alt="The US States Challenge UI showing that ‘Massachusetts’ is a correct answer and displaying a relevant map" src="https://cdn-images-1.medium.com/max/1024/1*aZkET7isLgU0GZ2NTLDVdg.png" /><figcaption>The US States Challenge UI showing that ‘Massachusetts’ is a correct answer and displaying a relevant map</figcaption></figure><p>Each time a user plays the game, a different map will be generated for each correct answer, so the game can be played over and over again!</p><p>Have a go yourself here: <a href="https://cogapplabs.github.io/states-challenge/">https://cogapplabs.github.io/states-challenge/</a></p><p>You can see the code for the project here: <a href="https://github.com/CogappLabs/states-challenge">https://github.com/CogappLabs/states-challenge</a></p><p>Over the years <a href="http://cogapp.com/">Cogapp</a> has been privileged enough to work on projects including some of the world’s most beautiful maps. Read more about one of our favourite examples of this, our work with <a href="https://www.cogapp.com/work#/british-library-magnificent-maps/">The British Library on the Magnificent Maps exhibition</a>.</p><p><a href="http://cogapp.com/refinery">Get in touch</a> to speak with us about your next digital project.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b7d9b4fc027b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cogapp/usa-states-challenge-b7d9b4fc027b">USA States Challenge</a> was originally published in <a href="https://medium.com/cogapp">cogapp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>