<?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 Daniel J. Dufour on Medium]]></title>
        <description><![CDATA[Stories by Daniel J. Dufour on Medium]]></description>
        <link>https://medium.com/@DanielJDufour?source=rss-b5259d21982a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*-hUgPY3a-dn7Ze6V.</url>
            <title>Stories by Daniel J. Dufour on Medium</title>
            <link>https://medium.com/@DanielJDufour?source=rss-b5259d21982a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 20:19:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@DanielJDufour/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[What I learned about Hackathons at the Code for America Summit]]></title>
            <link>https://medium.com/@DanielJDufour/what-i-learned-about-hackathons-at-the-code-for-america-summit-85a6794d02b0?source=rss-b5259d21982a------2</link>
            <guid isPermaLink="false">https://medium.com/p/85a6794d02b0</guid>
            <category><![CDATA[hackathons]]></category>
            <category><![CDATA[civictech]]></category>
            <category><![CDATA[code-for-america]]></category>
            <dc:creator><![CDATA[Daniel J. Dufour]]></dc:creator>
            <pubDate>Mon, 03 Jun 2019 19:32:43 GMT</pubDate>
            <atom:updated>2019-06-03T19:32:43.077Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NeEeKZdQ43BetsswdEJ5kg.jpeg" /><figcaption>Picture from session on “Running Civic Coding Hackathons and Why They (Continue) to Be Important” at 2019 Code for America Summit in Oakland, California</figcaption></figure><p>I recently attend a discussion on hackathons hosted by <a href="https://twitter.com/kowyatt">Kirsten Wyatt</a> from the <a href="https://twitter.com/GovLovePodcast">GovLove Podcast</a> at the recent Code for America Summit. <a href="https://twitter.com/laura_biediger">Laura Biediger</a> from the City of Durham and Code for Durham and Amin Mehr from Code.gov shared best practices and lessons learned from hosting hackathons. Here is a list of insights from the panelists:</p><p><strong>Laura Biediger</strong></p><ol><li><strong>Narrative: </strong>The language we use to describe hackathons is important. Laura said that an “ideathon” sends a different message than “hackathon.” People who might be turned off by a “hackathon” might feel more welcome at an “ideathon.”</li><li><strong>More Seats at the Table: </strong>It is important to have government partners and the people who are going to be affected at the table.</li><li><strong>Learning Curve</strong>: The learning curve can be high for new hackathon participants. Consider teaching them “how to hack” before a hackathon.</li></ol><p><strong>Amin Mehr</strong></p><ol><li><strong>New Ideas: </strong>Hackathons are great because they allow people to be really creative outside the confines of their day to day work. They’ll come up with solution they wouldn’t have in the office.</li><li><strong>Incentives: </strong>It’s difficult for government to offer the same type of incentives that private companies can offer. We need to think creatively about how government can incentivize participation. We are always trying to think of how to reward and give credit to people who join us. Some incentives are having a hackathon in a cool space or having a senior level government official come and speak.</li><li><strong>Everyone can Present:</strong> It is important to allow everyone to demo at the end of a hackathon even if their work is not complete.</li></ol><p>I hope you enjoyed these notes and look forward to hearing your thoughts.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=85a6794d02b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Calculating Intersection of Polygon with a Raster]]></title>
            <link>https://medium.com/@DanielJDufour/calculating-intersection-of-polygon-with-a-raster-89c2624d78a2?source=rss-b5259d21982a------2</link>
            <guid isPermaLink="false">https://medium.com/p/89c2624d78a2</guid>
            <category><![CDATA[remote-sensing]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[satellite-imagery]]></category>
            <category><![CDATA[gis]]></category>
            <category><![CDATA[maps]]></category>
            <dc:creator><![CDATA[Daniel J. Dufour]]></dc:creator>
            <pubDate>Thu, 08 Mar 2018 22:27:19 GMT</pubDate>
            <atom:updated>2018-03-08T22:27:19.594Z</atom:updated>
            <content:encoded><![CDATA[<p>Stephen Peyton and I recently developed an algorithm for calculating which pixels of a raster intersect an arbitrary polygon. The following is a high-level overview of the algorithm.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*Ln3gVx4ymITmaK0NAIDevw.png" /><figcaption>A raster image of pastureland with a polygon of Ireland’s borders. Raster data is from the Center for International Earth Science Information Network (CIESIN). Basemap is from © OpenStreetMap.</figcaption></figure><p><strong>Basic Overview of Algorithm</strong></p><ol><li>Create a horizontal line for each row of pixels in the raster image</li><li>Calculate intersections of the horizontal lines and the polygon’s edges</li><li>Group edges by intersection</li><li>Determine whether edges pass completely through their horizontal lines</li><li>Take pairs of intersections where edges completely cross a horizontal line</li><li><strong>Create Horizontal Lines</strong></li></ol><p>Rasters can be thought of as as a table of pixel values. This two-dimensional organization makes iterating over the rows easy. We convert each row in the table of pixels to a horizontal line. Here’s what an image of all the rows converted to horizontal lines looks like.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*wU2Hy0cCIQFFjGuwTP3hJw.png" /><figcaption>Image of Raster with Purple Horizontal Lines. Raster data is from Global Human Settlement Layer (GHSL). Basemap is from © OpenStreetMap Contributors.</figcaption></figure><p>2. <strong>Calculate Intersections of Horizontal Lines and Polygon Edges</strong></p><p>Our next step is to calculate where the horizontal lines intersect with the line segments that make up the polygon. We use your basic linear algebra for these calculations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*i1ToRI23zgK8BS3OwdqbPg.png" /><figcaption>Horizontal lines in purple with intersections in light blue. Raster data is from Global Human Settlement Layer (GHSL). Basemap is from © OpenStreetMap Contributors.</figcaption></figure><p><strong>3. Group Edges by Intersection</strong></p><p>Our third step is to group line segments around consecutive intersections. A new group begins whenever a line segment enters a horizontal line and ends when a line segment exits a horizontal line.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*jgM3lzWUeaD491xbbfxLMQ.png" /><figcaption>An illustration of line segments grouped by intersection. The first group of line segments is in red. The second group is in yellow. Raster data is from Global Human Settlement Layer (GHSL). Basemap is from © OpenStreetMap Contributors.</figcaption></figure><p>4. <strong>Determine Throughness</strong></p><p>The next step is to iterate through the groups and determine whether the line segments of the polygon completely pass through the horizontal line or not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/339/1*NicDlR2akAKIRd1IRaCXEw.png" /><figcaption>Raster data is from Global Human Settlement Layer (GHSL). Basemap is from © OpenStreetMap Contributors.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/331/1*VOh0p_qlHZ2IMA23SQG-Kw.png" /><figcaption>Raster data is from Global Human Settlement Layer (GHSL). Basemap is from © OpenStreetMap Contributors.</figcaption></figure><p>Example of a Line Segment in Red Running Completely Through a Horizontal Line in Purple.</p><p>Example of a group of yellow line segments not making it through a purple horizontal line.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*zNb4ebl1_i2QUdjChf-j3g.png" /></figure><p>Another example of a “rebounding” intersection that doesn’t go completely through the purple horizontal line.</p><p>5. <strong>Calculate Insides of a Polygon</strong></p><p>Our fifth step is to calculate the insides of a polygon. We use an algorithm derived from W. Randolph Franklin’s “<a href="https://wrf.ecse.rpi.edu//Research/Short_Notes/pnpoly.html">PNPOLY — Point Inclusion in Polygon Test</a>”. We assume that every group of line segments that goes completely through the row line represent a boundary between inside and outside the polygon. For each row line, we take each consecutive pair of intersections and assume that the polygon lies between them.</p><p>The following is an example of what happens when the calculation is made without respect to whether the line segments completely cross the horizontal line.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*K5pokCqUsBuTvvs5HDuSDw.png" /><figcaption>Insides (green) computed without first determining type of intersection</figcaption></figure><p>If we properly skip over intersections that don’t go completely through the horizontal line, we get correct results that look like the following.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*FlvLGzh6uVNQATKj-70Chw.png" /><figcaption>Insides (in green) computed with respect to throughness of intersection</figcaption></figure><p>A more realistic image is shown before. The green squares represent pixels that have been determined to be intersecting the polygon</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*PJqLVVfPSxeRrxTInZd6Ug.png" /><figcaption>Raster data is from Global Human Settlement Layer (GHSL). Basemap is from © OpenStreetMap Contributors.</figcaption></figure><p><strong>Next Steps</strong></p><p>We’re publishing this research in part to receive feedback. We’re interested in edge cases that might confuse this algorithm. Let us know. Thanks!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=89c2624d78a2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Serendipity, God, and Google Now]]></title>
            <link>https://medium.com/@DanielJDufour/serendipity-god-and-google-now-1dfd37270734?source=rss-b5259d21982a------2</link>
            <guid isPermaLink="false">https://medium.com/p/1dfd37270734</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[social-interaction]]></category>
            <dc:creator><![CDATA[Daniel J. Dufour]]></dc:creator>
            <pubDate>Mon, 16 May 2016 00:21:22 GMT</pubDate>
            <atom:updated>2016-05-17T01:20:54.269Z</atom:updated>
            <content:encoded><![CDATA[<p>Serendipity, God, and Google Now</p><p>This article is about how <a href="https://www.google.com/landing/now/">Google Now</a> and similar artificial intelligences could start playing a role we often attribute to God or “the universe.”</p><p>If you randomly bump into your friend on the street, would you say that this is just random coincidence or serendipity? What if it wasn’t….</p><p>I was just having a conversation with two friends about Facebook’s <a href="https://www.facebook.com/help/629537553762715/">Nearby Friends</a> feature, which alerts you if a friend is close to you. The idea is that if you know that a friend is nearby, then you would walk a few blocks to meet up and say hi. Now what if you were both using <a href="http://maps.google.com/">Google Maps</a> to get somewhere and Google Maps suggested routes that would make you bump into each other? Wouldn’t that be cool? If Google doesn’t tell you, then it would be a complete surprise. That feeling you get when you bump into a friend on the street could happen a lot more often! Would you still call this serendipity if Google engineered it?</p><p>I should probably mention an app that I’m working on that impacts my thinking here. It’s called <a href="https://perfectpartyplaylist.com/">Perfect Party Playlist</a> and it basically creates playlists for parties based on what songs people love. You know that feeling you get when your favorite song “randomly” comes on at a party. That would happen for everyone at every party! One of my concerns though is that people would adjust their expectations and start to expect that one of their favorite songs play at every party. If not, they would get disappointed. If technology takes the place of the divine in engineering serendipity, then would it lose its magical feeling?</p><p>Dating and networking are key markets for artificial intelligences that match people together based on interests and preferences. Now what would you say if Google Now, <a href="http://www.apple.com/ios/siri/">Siri</a> or <a href="http://www.meetup.com/">Meetup</a>, engineered your “randomly” meeting someone at an event? It could be done. If one of those systems identified someone that you should meet, it could encourage you both to attend the same event, by moving a specific event higher in both of your search results. When you meet at the event, could you say that it was random? Would people want to know if their meeting someone is a chance encounter or engineered by an artificial intelligence?</p><p>These are big questions that I don’t think anyone has answers to yet. ( If you do, let us know! ) We should start discussing them as a society. It’s important for us to discuss the future before it happens. We want to shape the future, not just have it happen to us.</p><p>I looking forward to hearing everyone’s thoughts.</p><p>Disclaimer: I have no evidence to suggest that Google Now, Siri or Meetup are working on engineering the sort of social interactions I mentioned above. This article is just speculation in that regard.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1dfd37270734" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>