<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel rdf:about="https://community.wolfram.com">
    <title>Community RSS Feed</title>
    <link>https://community.wolfram.com</link>
    <description>RSS Feed for Wolfram Community showing any discussions tagged with Graphs and Networks sorted by most viewed.</description>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/2593151" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/434022" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1907703" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/932548" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1321057" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1264240" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1007290" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/227651" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1793319" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/151105" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/497445" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/33771" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1112012" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/560469" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/2983903" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/943673" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1707390" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1561288" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/559849" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1065956" />
      </rdf:Seq>
    </items>
  </channel>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/2593151">
    <title>⭐ [R&amp;amp;DL] Wolfram R&amp;amp;D Developers on LIVE Stream</title>
    <link>https://community.wolfram.com/groups/-/m/t/2593151</link>
    <description>**Introducing our brand new YouTube channel, [Wolfram R&amp;amp;D][1]! Our channel features livestreams, behind-the-scenes creator presentations, insider videos, and more.**&#xD;
&#xD;
----------&#xD;
&#xD;
Join us for the unique Wolfram R&amp;amp;D livestreams on [Twitch][2] and [YouTube][3] led by our developers! &#xD;
&#xD;
You will see **LIVE** stream indicators on these channels on the dates listed below. The live streams provide tutorials and behind the scenes look at Mathematica and the Wolfram Language directly from developers.&#xD;
&#xD;
Join our livestreams every Wednesday at 11 AM CST and interact with developers who work on data science, machine learning, image processing, visualization, geometry, and other areas.&#xD;
&#xD;
&#xD;
----------&#xD;
&#xD;
&#xD;
⭕ **UPCOMING** EVENTS&#xD;
&#xD;
&#xD;
- Jan 29 -- Reinforcement Learning Applied to Feedback Control with [Suba Thomas][61]&#xD;
&#xD;
----------&#xD;
&#xD;
&#xD;
✅ **PAST** EVENTS  &#xD;
&#xD;
&#xD;
- April 24 -- [FeynCalc][60]&#xD;
- April 3 -- [Explore the Total Solar Eclipse of April 2024][59]&#xD;
- Mar 22 -- [20 Years of xAct Tensor Computer Algebra][58] &#xD;
- Feb 28 -- [Zero Knowledge Authentication][57]&#xD;
- Jan 17 -- [Nutrients by the Numbers][56]&#xD;
- Dec 13 -- [Understanding Graphics][55]&#xD;
- Oct 18 -- [Overview of Number Theory][54]&#xD;
- Sep 27 -- [QMRITools: Processing Quantitative MRI Data][52]&#xD;
- Sep 13 -- [Make High Quality Graph Visualization][51]&#xD;
- Sep 6 -- [Insider&amp;#039;s View of Graphs &amp;amp; Networks][53]&#xD;
- Aug 30 -- [Labeling Everywhere][49]&#xD;
- Aug 22 -- [Equation Generator for Equation-of-Motion Coupled Cluster Assisted by CAS][48]&#xD;
- Aug 16 -- [Foreign Function Interface][4]&#xD;
- July 26 -- [Modeling Fluid Circuits][6]&#xD;
- July 19 -- [Geocomputation][5]&#xD;
- July 5 -- [Protein Visualization][7]&#xD;
- Jun 14 -- [Chat Notebooks bring the power of Notebooks to LLMs][8]&#xD;
- May 31-- [Probability and Statistics: Random Sampling][9]&#xD;
- May 24 -- [Problem Solving][10]&#xD;
- May 17 -- [The state of Optimization][11]&#xD;
- May 10 -- [Building a video game with Wolfram notebooks][12]&#xD;
- April 26 -- [Control Systems: An Overview][13]&#xD;
- April 19 -- [MaXrd: A crystallography package developed for research support][14]&#xD;
- April 5th -- [Relational database in the Wolfram Language][15]&#xD;
- Mar 29th -- [Build your first game in the Wolfram Language with Unity game engine] [16]&#xD;
- Mar 22nd -- [Everything to know about Mellin-Barnes Integrals - Part II][17]&#xD;
- Mar 15th -- [Building your own Shakespearean GPT - a ChatGPT like GPT model][18]&#xD;
- Mar 8th -- [Understand Time, Date and Calendars][19]&#xD;
- Mar 1st -- [Introducing Astro Computation][20]&#xD;
- Feb 22nd -- [Latest features in System Modeler][21]&#xD;
- Feb 15th -- [Everything to know about Mellin-Barnes Integrals][22]&#xD;
- Feb 8th -- [Dive into Video Processing][23]&#xD;
- Feb 1st -- [PDE Modeling][24]&#xD;
- Jan. 25th -- [Ask Integration Questions to Oleg Marichev][25]&#xD;
- Jan. 18th -- [My Developer Tools][26]&#xD;
- Jan. 11th -- [Principles of Dynamic Interfaces][27]&#xD;
- Dec. 14th -- [Wolfram Resource System: Repositories &amp;amp; Archives][28]&#xD;
- Dec. 7th -- [Inner Workings of ImageStitch: Image Registration, Projection and Blending][29]&#xD;
- Nov. 30th -- [Q&amp;amp;A for Calculus and Algebra][30]&#xD;
- Nov. 23rd -- [xAct: Efficient Tensor Computer Algebra][31]&#xD;
- Nov. 16th -- [Latest in Machine Learning][32]&#xD;
- Nov. 9th -- [Computational Geology][33]&#xD;
- Nov. 2nd -- [Behind the Scenes at the Wolfram Technology Conference 2022][34]&#xD;
- Oct 26th -- [Group Theory Package (GTPack) and Symmetry Principles in Condensed Matter][35]&#xD;
- Oct 12th -- [Tree Representation for XML, JSON and Symbolic Expressions][36]&#xD;
- Oct. 5th -- [A Computational Exploration of Alcoholic Beverages][37]&#xD;
- Sept. 28th -- [Q&amp;amp;A with Visualization &amp;amp; Graphics Developers][38]&#xD;
- Sept. 14th -- [Paclet Development][39]&#xD;
- Sept. 7th -- [Overview of Chemistry][40]&#xD;
- Aug. 24th -- [Dive into Visualization][41]  &#xD;
- Aug. 17th -- [Latest in Graphics &amp;amp; Shaders][42]   &#xD;
- Aug. 10th -- [What&amp;#039;s new in Calculus &amp;amp; Algebra][43]   &#xD;
&#xD;
&#xD;
&#xD;
&#xD;
&#xD;
&amp;gt; **What are your interests? Leave a comment here on this post to share your favorite topic suggestions for our livestreams.**  &#xD;
**Follow us on our live broadcasting channels [Twitch][44] and [YouTube][45] and for the up-to-date announcements on our social media: [Facebook][46] and [Twitter][47].**&#xD;
&#xD;
&#xD;
  [1]: https://wolfr.am/1eatWLcDA&#xD;
  [2]: https://www.twitch.tv/wolfram&#xD;
  [3]: https://wolfr.am/1eatWLcDA&#xD;
  [4]: https://www.youtube.com/watch?v=C82NHpy7D6k&#xD;
  [5]: https://community.wolfram.com/groups/-/m/t/2985580&#xD;
  [6]: https://community.wolfram.com/groups/-/m/t/2982197&#xD;
  [7]: https://community.wolfram.com/groups/-/m/t/2982114&#xD;
  [8]: https://youtu.be/ZqawtrWwE0c&#xD;
  [9]: https://community.wolfram.com/groups/-/m/t/2946101&#xD;
  [10]: https://community.wolfram.com/groups/-/m/t/2925156&#xD;
  [11]: https://community.wolfram.com/groups/-/m/t/2921756&#xD;
  [12]: https://community.wolfram.com/groups/-/m/t/2918746&#xD;
  [13]: https://community.wolfram.com/groups/-/m/t/2917597&#xD;
  [14]: https://community.wolfram.com/groups/-/m/t/2911327&#xD;
  [15]: https://community.wolfram.com/groups/-/m/t/2907390&#xD;
  [16]: https://community.wolfram.com/groups/-/m/t/2921593&#xD;
  [17]: https://community.wolfram.com/groups/-/m/t/2861119&#xD;
  [18]: https://community.wolfram.com/groups/-/m/t/2847286&#xD;
  [19]: https://community.wolfram.com/groups/-/m/t/2851575&#xD;
  [20]: https://community.wolfram.com/groups/-/m/t/2852934&#xD;
  [21]: https://community.wolfram.com/groups/-/m/t/2842136&#xD;
  [22]: https://community.wolfram.com/groups/-/m/t/2838335&#xD;
  [23]: https://community.wolfram.com/groups/-/m/t/2827166&#xD;
  [24]: https://community.wolfram.com/groups/-/m/t/2823264&#xD;
  [25]: https://community.wolfram.com/groups/-/m/t/2821053&#xD;
  [26]: https://youtu.be/istKGqpDUsw&#xD;
  [27]: https://community.wolfram.com/groups/-/m/t/2777853&#xD;
  [28]: https://youtu.be/roCkXVkDuLA&#xD;
  [29]: https://youtu.be/pYHAz-NatXI&#xD;
  [30]: https://youtu.be/r7Hjdr_D7c4&#xD;
  [31]: https://community.wolfram.com/groups/-/m/t/2713818&#xD;
  [32]: https://community.wolfram.com/groups/-/m/t/2705779&#xD;
  [33]: https://community.wolfram.com/groups/-/m/t/2701172&#xD;
  [34]: https://youtu.be/UrM-OBu3H9o&#xD;
  [35]: https://community.wolfram.com/groups/-/m/t/2678940&#xD;
  [36]: https://community.wolfram.com/groups/-/m/t/2649407&#xD;
  [37]: https://community.wolfram.com/groups/-/m/t/2635049&#xD;
  [38]: https://community.wolfram.com/groups/-/m/t/2618033&#xD;
  [39]: https://community.wolfram.com/groups/-/m/t/2616863&#xD;
  [40]: https://community.wolfram.com/groups/-/m/t/2613617&#xD;
  [41]: https://community.wolfram.com/groups/-/m/t/2605432&#xD;
  [42]: https://community.wolfram.com/groups/-/m/t/2600997&#xD;
  [43]: https://community.wolfram.com/groups/-/m/t/2596451&#xD;
  [44]: https://www.twitch.tv/wolfram&#xD;
  [45]: https://wolfr.am/1eatWLcDA&#xD;
  [46]: https://www.facebook.com/wolframresearch&#xD;
  [47]: https://twitter.com/WolframResearch&#xD;
  [48]: https://www.youtube.com/live/ElP55ZILxPw?si=nsAPOQ3u-RbvuGKX&#xD;
  [49]: https://community.wolfram.com/groups/-/m/t/3007543&#xD;
  [50]: https://community.wolfram.com/web/charlesp&#xD;
  [51]: https://community.wolfram.com/groups/-/m/t/3019288&#xD;
  [52]: https://www.youtube.com/live/KM1yWHRrF2k?si=g2R7rHB2IinVRpo6&#xD;
  [53]: https://community.wolfram.com/groups/-/m/t/3009184&#xD;
  [54]: https://community.wolfram.com/groups/-/m/t/3064700&#xD;
  [55]: https://community.wolfram.com/groups/-/m/t/3084291&#xD;
  [56]: https://community.wolfram.com/groups/-/m/t/3104670&#xD;
  [57]: https://community.wolfram.com/groups/-/m/t/3164204&#xD;
  [58]: https://youtube.com/playlist?list=PLdIcYTEZ4S8TSEk7YmJMvyECtF-KA1SQ2&amp;amp;si=paXZHs0ZzGdB7y1y&#xD;
  [59]: https://youtube.com/playlist?list=PLdIcYTEZ4S8RyjEB7JSAsGerbYHl5xXeJ&amp;amp;si=xkNtkIDvKHFWHVmD&#xD;
  [60]: https://youtu.be/KUWK19Gx2LE?si=qbKISbL8FtvweSWo&#xD;
  [61]: https://community.wolfram.com/web/subat</description>
    <dc:creator>Charles Pooh</dc:creator>
    <dc:date>2022-08-05T21:37:19Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/434022">
    <title>XKCD in LUV and relationships: semantic proximity of similar colors</title>
    <link>https://community.wolfram.com/groups/-/m/t/434022</link>
    <description>*Images / animations are large, **wait till they load**. The best part IMHO is at the end. Huge table is NOT the end.*&#xD;
&#xD;
----------&#xD;
&#xD;
&#xD;
A color can be a hard thing to pinpoint. A harder question, perhaps: **Do visually close colors evoke close semantic descriptions?** Is **electric lime** close to **goblin grin**? Thats not RGB but these are real colors. At least according to public color poll run by ever-inventive creator of XKCD comic Randall Munroe. And from 222,500 user sessions and over five million colors we finally can pose a question: if visual similarity of colors - like this graph (I will show how to build it from XKCD data later):&#xD;
&#xD;
![enter image description here][1]&#xD;
&#xD;
can be used to define &amp;#034;semantic proximity&amp;#034; of subjective color descriptions ...like these ones (also [from XKCD data][2]):&#xD;
&#xD;
![enter image description here][3]&#xD;
&#xD;
![enter image description here][4]&#xD;
&#xD;
Well, we will investigate, or at least try to pinpoint, visual similarity to comprehend the semantic one (if there is any). BTW, this is not a typo, -  ladies do prefer to use camel for color! And I am not going to comment about what type of glasses gentlemen see the world through. So what does programming have to do with this? Patience, there is a huge chart and a network - way down this post  result of some coding and probably a few more jokes. When Randall Munroe published the poll data there were a few efforts to visualize results. [Simple table by XKCD][5] like this &#xD;
&#xD;
![enter image description here][6]&#xD;
&#xD;
was a bit disorienting for me because colors were visually random. Data Pointed efforts were excellent. But [first one][7] had too few most-popular names (while stunning): &#xD;
&#xD;
[![enter image description here][8]][9]&#xD;
&#xD;
[The second one][10], quite an [interactive marvel][11], had some tiny points which were hard to see and easy to miss with good names:&#xD;
&#xD;
[![enter image description here][12]][13]&#xD;
&#xD;
I wanted to browse all ~1000 names but in a sort of consistent color-wise way.  **The main point being, when i see a &amp;#034;goblin green&amp;#034; color, I would like neighboring colors to be similar, so I can see which names should also be close semantically. Basically I wanted to compare names of similar colors.** Lets import data and see a sample:&#xD;
&#xD;
    data = Import[&amp;#034;http://xkcd.com/color/rgb.txt&amp;#034;, &amp;#034;Data&amp;#034;][[All, 1 ;; 2]];&#xD;
    data // Length&#xD;
    data[[;; 4]] // Column&#xD;
&#xD;
`949&#xD;
&#xD;
{{{&amp;#034;cloudy blue&amp;#034;, &amp;#034;#acc2d9&amp;#034;}},&#xD;
&#xD;
 {{&amp;#034;dark pastel green&amp;#034;, &amp;#034;#56ae57&amp;#034;}},&#xD;
&#xD;
 {{&amp;#034;dust&amp;#034;, &amp;#034;#b2996e&amp;#034;}},&#xD;
&#xD;
 {{&amp;#034;electric lime&amp;#034;, &amp;#034;#a8ff04&amp;#034;}}`&#xD;
&#xD;
Note, colors are given as hexadecimal HTML codes. We can use Interpreter to get colors in WL format, say RGB:&#xD;
&#xD;
    clrs = Interpreter[&amp;#034;Color&amp;#034;][data[[All, 2]]];&#xD;
    Multicolumn[clrs, 30]&#xD;
&#xD;
![enter image description here][14]&#xD;
&#xD;
 We, of course, could just throw all the points on a chromatic diagram:&#xD;
&#xD;
    ChromaticityPlot[{clrs, &amp;#034;RGB&amp;#034;}, PlotTheme -&amp;gt; &amp;#034;Detailed&amp;#034;, &#xD;
     Appearance -&amp;gt; {&amp;#034;VisibleSpectrum&amp;#034;, &amp;#034;Wavelengths&amp;#034; -&amp;gt; True}]&#xD;
&#xD;
![enter image description here][15]&#xD;
&#xD;
...or in 3D&#xD;
&#xD;
    ChromaticityPlot3D[{clrs, &amp;#034;RGB&amp;#034;}, PlotTheme -&amp;gt; &amp;#034;Marketing&amp;#034;, &#xD;
     Appearance -&amp;gt; &amp;#034;VisibleSpectrum&amp;#034;, SphericalRegion -&amp;gt; True]&#xD;
&#xD;
![enter image description here][16]&#xD;
&#xD;
...but that of course would not get me anywhere with readability of color names. So I decided to do the simplest thing - a table. Columns would arrange colors in one way while rows in another. This won&amp;#039;t be perfect, but let&amp;#039;s try it. For example in [LUV color space][17] there are 3 parameters:&#xD;
&#xD;
- L - lightness, approximate luminance&#xD;
- U - color&#xD;
- V - color&#xD;
&#xD;
LUV is a color space designed to have perceptual **uniformity**; i.e. equal changes in its components will be perceived by a human to have equal effects. I hope this uniformity will help me to rearrange the colors. LUV is extensively used for applications such as computer graphics which deal with colored lights and is device independent. Let&amp;#039;s get data in a convenient format:&#xD;
&#xD;
    dataP = MapAt[ColorConvert[Interpreter[&amp;#034;Color&amp;#034;][#], &amp;#034;LUV&amp;#034;] &amp;amp;, #, 2] &amp;amp; /@ data;&#xD;
    dataP[[;; 5]] // Column&#xD;
&#xD;
![enter image description here][18]&#xD;
&#xD;
I will sort by abstract colors U and V and sacrifice lightness L to keep things simple and 2-dimensional. 2D sorting already will be helpful. Once **data are sorted according to U**&#xD;
&#xD;
    dataPA = SortBy[dataP, #[[2, 2]] &amp;amp;];&#xD;
&#xD;
we ragged-partition them in 10 columns and **sort each column according to V**:&#xD;
&#xD;
    dataPAB = SortBy[#, #[[2, 3]] &amp;amp;] &amp;amp; /@ Partition[dataPA, 10, 10, 1, {}];&#xD;
    dataPAB[[;; 5, ;; 5]] // TableForm&#xD;
&#xD;
![enter image description here][19]&#xD;
&#xD;
Note the tricky syntax for `Partition` to keep partitioning ragged and not cut off a short remaining column. Now I will just build a grid where cells are rectangles of color with the color name written inside. But here is a tricky part: text color should be in contrast to the color of cell background, to be readable. Good that we have ColorNegate! We can use ColorNegate[x] when cell color is x - cool! ...except when cell color is gray because&#xD;
&#xD;
    ColorNegate[Gray] // InputForm&#xD;
`GrayLevel[0.5]`&#xD;
&#xD;
Hmmm... Well let&amp;#039;s be inventive. When `ColorDistance` of a cell-color too close to `Gray` - we&amp;#039;ll simply use `White` for text. Define:&#xD;
&#xD;
    rect[{x_, y_}] := Framed[Style[x, 10, &#xD;
       If[ColorDistance[ColorNegate[y], Gray] &amp;lt; .2, White, &#xD;
        ColorNegate[y]]], Background -&amp;gt; y, ImageSize -&amp;gt; {80, 50}]&#xD;
&#xD;
Check:&#xD;
&#xD;
    rect@{&amp;#034;speechless green&amp;#034;, Green}&#xD;
&#xD;
![enter image description here][20]&#xD;
&#xD;
Great, we now ready. Behold, read, and wonder (right-click and &amp;#034;open image in new tab&amp;#034; to see a bigger version). Do not forget - there is more stuff after this table.&#xD;
&#xD;
    Grid[ParallelMap[rect, dataPAB, {2}], Spacings -&amp;gt; {0, 0}]&#xD;
&#xD;
![enter image description here][21]&#xD;
&#xD;
Well, could there a be a better or different way to visualize relationships? What about a network graph - judging by [social analytics approaches][22] - they are the best to represent relationships. Let&amp;#039;s make a clean cut and get the data again:&#xD;
&#xD;
    data = Import[&amp;#034;http://xkcd.com/color/rgb.txt&amp;#034;, &amp;#034;Data&amp;#034;][[All, 1 ;; 2]];&#xD;
&#xD;
And we turn strings of color descriptions into WL format colors with Interpreter again:&#xD;
&#xD;
    data = Reverse[MapAt[Interpreter[&amp;#034;Color&amp;#034;], #, 2]] &amp;amp; /@ data;&#xD;
    data[[;; 5]] // Column&#xD;
&#xD;
![enter image description here][23]&#xD;
&#xD;
Now, like on Facebook - you have friends and they have friends and so on - we need to find closest friends of each color. We can use `ColorDistance` for that that utilizes many measures, for example `Euclidean` distance in `LABColor` and such. Let&amp;#039;s define our distance function:&#xD;
&#xD;
    neco[{u_, v_}, {x_, y_}] := ColorDistance[u, x]&#xD;
&#xD;
Now in WL we have an awesome function `Nearest` that can operate on any objects to deduce the closest to it objects:&#xD;
&#xD;
    neig[c_] := Nearest[DeleteCases[data, c], c, {All, .16}, DistanceFunction -&amp;gt; neco]&#xD;
&#xD;
where `{All, .16}` means *among all objects find closest within radius 0.16 as given by `DistanceFunction`*. `DeleteCases` is needed exclude the original object as its own friend. Check:&#xD;
&#xD;
![enter image description here][24]&#xD;
&#xD;
This function will connect the original color and its closest friends within 0.16 measure of `DistanceFunction`&#xD;
&#xD;
    edgs[v_] := v &amp;lt;-&amp;gt; # &amp;amp; /@ neig[v]&#xD;
&#xD;
Check:&#xD;
&#xD;
![enter image description here][25]&#xD;
&#xD;
Noticed the trick with `Sort`? `Sort` will flip the edges to orient `b&amp;lt;-&amp;gt;a` as `a&amp;lt;-&amp;gt;b` so we can delete duplicates using `Union` when building all edges between all colors and their friends:&#xD;
&#xD;
    edgsALL = Union[Sort /@ Flatten[ParallelMap[edgs, data], 1]];&#xD;
&#xD;
To get a simple color-proximity `Graph` define a `VertexLabels` function:&#xD;
&#xD;
    panelLabel[lbl_] := lbl[[1]]&#xD;
&#xD;
And now behold:&#xD;
&#xD;
    g = Graph[data, edgsALL, VertexLabels -&amp;gt; Table[i -&amp;gt; Placed[{i}, Center, panelLabel], {i, data}], &#xD;
      EdgeStyle -&amp;gt; Opacity[.2], EdgeShapeFunction -&amp;gt; &amp;#034;Line&amp;#034;, VertexSize -&amp;gt; 0, ImageSize -&amp;gt; 900]&#xD;
&#xD;
![enter image description here][26]&#xD;
&#xD;
To build a large scale browseable network with readable labels define new label function:&#xD;
&#xD;
    panelLabel[lbl_] := Panel[Style[lbl[[2]], 14, Bold, &#xD;
       If[ColorConvert[lbl[[1]], &amp;#034;GrayLevel&amp;#034;][[1]] &amp;lt; .5, White, Black]], &#xD;
      FrameMargins -&amp;gt; 0, Background -&amp;gt; lbl[[1]]]&#xD;
&#xD;
Instead of negating the color of text (as we did in the huge table) we make it `White` if `GrayLevel` of background is `&amp;lt; 0.5` and Black if it is `&amp;gt; 0.5`. A different approach. Check:&#xD;
&#xD;
![enter image description here][27]&#xD;
&#xD;
Perfect. Now the monster network:&#xD;
&#xD;
    g = Graph[data, edgsALL, VertexLabels -&amp;gt; &#xD;
        Table[i -&amp;gt; Placed[{i}, Center, panelLabel], {i, data}], &#xD;
       EdgeStyle -&amp;gt; Opacity[.2], EdgeShapeFunction -&amp;gt; &amp;#034;Line&amp;#034;, &#xD;
       VertexSize -&amp;gt; 0, ImageSize -&amp;gt; 10000];&#xD;
&#xD;
To browse it open [**==&amp;gt; THIS LINK &amp;lt;==**][28] in a **NEW TAB** and zoom in/out. It will look something like this:&#xD;
&#xD;
![enter image description here][29]&#xD;
&#xD;
Interesting part is why did we chose **radius 0.16**? Two words - [percolation theory][30]. **Radius 0.16** for XKCD data serves as [percolation threshold][31] much below which the network has a lot of disconnected components and much above which the network is &amp;#034;overconnected&amp;#034; complete `Graph`. The former is lack of information and the later is &amp;#034;too much&amp;#034;  info for meaningful sharp description. My intuition is that percolation threshold is the golden middle that allows for concise but precise definitions. You can experiment lowering it and increasing it to see how network under- and over- connects. Percolation threshold is that moment when you can get from one description to another and then next one and get to any other description. Using association chains you can deduce deeper connections among remote meanings **in the whole network**. This is of course is speculative and arguable. Let me know if you are familiar with relevant research or have an opinion. And now using percolation threshold we can define new colors based on old descriptions:&#xD;
&#xD;
    Labeled[Grid[neig[{#, &amp;#034;&amp;#034;}], Frame -&amp;gt; All], &#xD;
       Row[{&amp;#034;New clor &amp;#034;, Graphics[{#, Disk[]}, ImageSize -&amp;gt; 30], &amp;#034; is like&amp;#034;}], Top] &amp;amp;@RandomColor[]&#xD;
&#xD;
![enter image description here][32]&#xD;
&#xD;
Concise (much less than full ~1000 descriptors) but precise (you &amp;#034;got the feeling&amp;#034;). Now what is next? It would be really great to make a &amp;#034;machine&amp;#034;  have an imagination and form its own new color descriptors. How? - not sure but probably running [WL machine learning][33] on some large color-related corpora. When I figure it out - I will write a continuation. Or maybe you will?&#xD;
&#xD;
&#xD;
  [1]: /c/portal/getImageAttachment?filename=lablelessnet.png&amp;amp;userId=11733&#xD;
  [2]: http://blog.xkcd.com/2010/05/03/color-survey-results/&#xD;
  [3]: /c/portal/getImageAttachment?filename=female_colors.gif&amp;amp;userId=11733&#xD;
  [4]: /c/portal/getImageAttachment?filename=male_colors.gif&amp;amp;userId=11733&#xD;
  [5]: http://xkcd.com/color/rgb/&#xD;
  [6]: /c/portal/getImageAttachment?filename=assorted_colors.png&amp;amp;userId=11733&#xD;
  [7]: http://www.datapointed.net/2010/06/xkcd-color-name-strata/&#xD;
  [8]: /c/portal/getImageAttachment?filename=color_name_strata_l.jpg&amp;amp;userId=11733&#xD;
  [9]: http://www.datapointed.net/2010/06/xkcd-color-name-strata/&#xD;
  [10]: http://www.datapointed.net/2010/09/men-women-color-names/&#xD;
  [11]: http://www.datapointed.net/visualizations/color/men-women-color-names-d3/&#xD;
  [12]: /c/portal/getImageAttachment?filename=2015-02-02_16-30-13.png&amp;amp;userId=11733&#xD;
  [13]: http://www.datapointed.net/visualizations/color/men-women-color-names-d3/&#xD;
  [14]: /c/portal/getImageAttachment?filename=asd3q4tewrhsfghbdas453Q.png&amp;amp;userId=11733&#xD;
  [15]: /c/portal/getImageAttachment?filename=dsfg4wrtyhgfsgw45temyj.png&amp;amp;userId=11733&#xD;
  [16]: /c/portal/getImageAttachment?filename=asdd43gsrty54wyrht.gif&amp;amp;userId=11733&#xD;
  [17]: http://reference.wolfram.com/language/ref/LUVColor.html&#xD;
  [18]: /c/portal/getImageAttachment?filename=2015-02-02_17-22-39.png&amp;amp;userId=11733&#xD;
  [19]: /c/portal/getImageAttachment?filename=ScreenShot2015-02-02at5.29.43PM.png&amp;amp;userId=11733&#xD;
  [20]: /c/portal/getImageAttachment?filename=ScreenShot2015-02-02at5.44.37PM.png&amp;amp;userId=11733&#xD;
  [21]: /c/portal/getImageAttachment?filename=sdf34qeadfty65tyejnfsgd.png&amp;amp;userId=11733&#xD;
  [22]: http://en.wikipedia.org/wiki/Social_network&#xD;
  [23]: /c/portal/getImageAttachment?filename=ScreenShot2015-02-03at9.00.52AM.png&amp;amp;userId=11733&#xD;
  [24]: /c/portal/getImageAttachment?filename=ScreenShot2015-02-03at9.10.19AM.png&amp;amp;userId=11733&#xD;
  [25]: /c/portal/getImageAttachment?filename=ScreenShot2015-02-03at9.13.45AM.png&amp;amp;userId=11733&#xD;
  [26]: /c/portal/getImageAttachment?filename=lablelessnet.png&amp;amp;userId=11733&#xD;
  [27]: /c/portal/getImageAttachment?filename=ScreenShot2015-02-03at9.20.41AM.png&amp;amp;userId=11733&#xD;
  [28]: http://community.wolfram.com/c/portal/getImageAttachment?filename=awrsdfsd4345gsgs.jpg&amp;amp;userId=11733&#xD;
  [29]: /c/portal/getImageAttachment?filename=ezgif.com-optimize.gif&amp;amp;userId=11733&#xD;
  [30]: http://en.wikipedia.org/wiki/Percolation_theory&#xD;
  [31]: http://en.wikipedia.org/wiki/Percolation_theory&#xD;
  [32]: /c/portal/getImageAttachment?filename=ScreenShot2015-02-03at10.31.32AM.png&amp;amp;userId=11733&#xD;
  [33]: http://www.wolfram.com/mathematica/new-in-10/machine-learning/</description>
    <dc:creator>Vitaliy Kaurov</dc:creator>
    <dc:date>2015-02-02T23:52:47Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1907703">
    <title>Agent-Based Network Models for COVID-19</title>
    <link>https://community.wolfram.com/groups/-/m/t/1907703</link>
    <description>![enter image description here][1]&#xD;
&#xD;
&amp;amp;[Wolfram Notebook][2]&#xD;
&#xD;
&#xD;
  [1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=animation.gif&amp;amp;userId=24497&#xD;
  [2]: https://www.wolframcloud.com/obj/111b7fc9-47f8-4d2e-90ff-fe71265746fd</description>
    <dc:creator>Christopher Wolfram</dc:creator>
    <dc:date>2020-03-25T06:40:12Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/932548">
    <title>Beyond Four Corners, USA</title>
    <link>https://community.wolfram.com/groups/-/m/t/932548</link>
    <description>#Introduction&#xD;
I recently saw a TV show set at Four Corners USA, the point where Utah, Colorado, Arizona, and New Mexico meet:&#xD;
&#xD;
![enter image description here][1]&#xD;
&#xD;
It made me wonder how frequent 4 or more geographical borders meet at one point. According to [Wikipedia][2], 4 borders meeting at a point is called a ***quadripoint***, 5 borders meeting is called a ***quintipoint***, and in general it&amp;#039;s called a ***multipoint***. The entry only lists one quintipoint and goes on to say&#xD;
&#xD;
&amp;gt; Perhaps a dozen quintipoints of various levels of geopolitical subdivisions are scattered around the world;&#xD;
&#xD;
This piqued my interest to find all multipoints, using the Wolfram Language.&#xD;
&#xD;
--------&#xD;
#Results&#xD;
&#xD;
Before I give the details on how to detect multipoints, I&amp;#039;d like to showcase the results.&#xD;
&#xD;
###Summary&#xD;
 - Since borders are not always precise (or even well defined at times), I allowed for an error up to ~100 meters when classifying points.&#xD;
 - The polygons were obtained from the `&amp;#034;Country&amp;#034;` and `&amp;#034;AdministrativeDivision&amp;#034;` `Entity` types (about 40,000 in total).&#xD;
 - There are a total of **724 quadripoints** in this dataset.&#xD;
 - There are a total of **13 quintipoints** in this dataset.&#xD;
 - There is **1 *10-point*** in this dataset!&#xD;
 - There are **only 6 multipoints** in the dataset whose regions *don&amp;#039;t* share the same parent region.&#xD;
&#xD;
###Quadripoints&#xD;
With **724 quadripoints**, there are too many to list here, but here are a few interesting ones.&#xD;
&#xD;
 - The only countries to form a quadripoint are **Namibia, Botswana, Zambia, and Zimbabwe**.&#xD;
&#xD;
![enter image description here][3]&#xD;
&#xD;
 - There are a considerable amount of **counties in Iowa and Texas** that are apart of multiple quadripoints, i.e. more than one corner is a quadripoint. This is because they are roughly arranged in a rectangular grid.&#xD;
&#xD;
![enter image description here][4]&#xD;
&#xD;
 - There were only 6 quadripoints found whose parent regions differ:&#xD;
&#xD;
![enter image description here][5]&#xD;
&#xD;
 - Here&amp;#039;s a visual summary of all quadripoints found (note the level 3 regions were heavily thickened to become visible):&#xD;
&#xD;
![enter image description here][6]&#xD;
&#xD;
###Quintipoints&#xD;
Here are all **13 quintipoints** found:&#xD;
&#xD;
 - **Saint Kitts and Nevis**: Saint George Gingerland - Saint James Windward - Saint John Figtree - Saint Paul Charlestown - Saint Thomas Lowland&#xD;
 - **Boyaca, Colombia**: Chinavita - Garagoa - Miraflores - Ramiriquí - Zetaquirá&#xD;
 - **Counties in Florida, USA**: Glades - Hendry - Martin - Okeechobee - Palm Beach&#xD;
 - **Usulutan, El Salvador**: California - Ozatlán - Santa Elena - Tecapán - Usulután&#xD;
 - **Arequipa, Arequipa, Peru**: Alto Selva Alegre - Cayma - Chiguata - Miraflores - San Juan de Tarucani&#xD;
 - **Cuenca, Azuay, Ecuador**: Chiquintad - Cuenca - Ricaurte - Sidcay - Sinicay&#xD;
 - **Pea Reang, Prey Vêng, Cambodia**: Kampong Popil - Mesa Prachan - Prey Sralet - Reab - Roka&#xD;
 - **Rieti, Lazio, Italy**: Borgo Velino - Castel Sant&amp;#039; Angelo - Cittaducale - Micigliano - Rieti&#xD;
 - **Cosenza, Calabria, Italy**: Marano Marchesato - Marano Principato - Rende - San Fili - San Lucido&#xD;
 - **Napoli, Campania, Italy**: Boscotrecase - Ercolano - Ottaviano - Torre Del Greco - Trecase&#xD;
 - **Savona, Liguria, Italy**: Bardineto - Boissano - Giustenice - Loano - Pietra Ligure&#xD;
 - **Torino, Piemonte, Italy**: Cuceglio - Mercenasco - Montalenghe - Scarmagno - Vialfrè&#xD;
 - **Viterbo, Lazio, Italy**: Bolsena - Capodimonte - Gradoli - Montefiascone - San Lorenzo Nuovo&#xD;
&#xD;
As you can see, Italy takes the cake with 6 quintipoints! Here&amp;#039;s a visual of these quintipoints, along with the error allowing them to be classified as such:&#xD;
&#xD;
![enter image description here][7]&#xD;
&#xD;
###A Near 6-point&#xD;
Notice in the top right map above, it looks like there is room for one more region in Viterbo, Lazio, Italy, which would make it a 6-point. Here&amp;#039;s the 6th region (Grotte Di Castro) in black:&#xD;
&#xD;
![enter image description here][8]&#xD;
&#xD;
It turns out Grotte Di Castro is about 700 meters from the quintipoint, making this only a ***near* 6-point**:&#xD;
&#xD;
![enter image description here][9]&#xD;
&#xD;
###10-point&#xD;
As mentioned in the [Wikipedia entry][10], there is a 10-point in Italy at the summit of [Mount Etna][11]:&#xD;
&#xD;
 - **Catania, Sicily, Italy**: Adrano - Belpasso - Biancavilla - Bronte - Castiglione Di Sicilia - Maletto - Nicolosi - Randazzo - Sant&amp;#039; Alfio - Zafferana Etnea&#xD;
&#xD;
![enter image description here][12]&#xD;
&#xD;
###Allowing for more error&#xD;
If we allow for more error, we can find ***near-multipoints*** - regions that almost have a multipoint, but clearly don&amp;#039;t. For example, there is a near-quintipoint in Texas, USA:&#xD;
&#xD;
![enter image description here][13]&#xD;
&#xD;
--------&#xD;
#Code&#xD;
The idea to find multipoints within a collection of regions is as follows:&#xD;
&#xD;
 1. Obtain the `Polygon` for each region.&#xD;
 2. For each pair of regions, if there&amp;#039;s a vertex from one of the polygons which is &amp;#034;close&amp;#034; to the other, mark these regions as touching. `RegionDistance` can be used for this.&#xD;
 3. The relation of touching between pairs forms an adjacency matrix. From this, form a `Graph` and use `FindClique` to find all multipoints in this collection.&#xD;
&#xD;
Here is code that does just that:&#xD;
&#xD;
    discretize[Polygon[pts_?MatrixQ]] := &#xD;
        MeshRegion[pts, Polygon[Range[Length[pts]]]]&#xD;
    discretize[Polygon[pts_?(VectorQ[#, MatrixQ] &amp;amp;)]] :=&#xD;
      With[{pts2 = Select[pts, Length[#] &amp;gt; 2 &amp;amp;]},&#xD;
        MeshRegion[Join @@ pts2, &#xD;
          Polygon[Range[# + 1, #2] &amp;amp; @@@ Partition[Prepend[Accumulate[Map[Length, pts2]], 0], 2, 1]]]&#xD;
      ]&#xD;
    discretize[expr_] :=&#xD;
      With[{mr = DiscretizeGraphics[Graphics[expr]]},&#xD;
        mr /; MeshRegionQ[mr]&#xD;
      ]&#xD;
    discretize[_] = $Failed;&#xD;
&#xD;
    polyLookup = discretize /@ (Join[&#xD;
      EntityValue[&amp;#034;Country&amp;#034;, &amp;#034;Polygon&amp;#034;, &amp;#034;EntityAssociation&amp;#034;],&#xD;
      EntityValue[&amp;#034;AdministrativeDivision&amp;#034;, &amp;#034;Polygon&amp;#034;, &amp;#034;EntityAssociation&amp;#034;]&#xD;
    ] /. GeoPosition -&amp;gt; Identity);&#xD;
&#xD;
    MultiPoints[divs_List, n_] /; Length[divs] &amp;lt; n = {};&#xD;
    &#xD;
    MultiPoints[divs_List, n_] :=&#xD;
    	Block[{polys, disj, cands},&#xD;
    		polys = polyLookup /@ divs;&#xD;
    		(&#xD;
    			disj = Boole[Outer[CoordinateNear, polys, polys]] - IdentityMatrix[Length[divs]];&#xD;
    			(&#xD;
    				cands = FindClique[AdjacencyGraph[divs, disj], {n, Infinity}, All];&#xD;
    				&#xD;
    				resolveMultiPoints[cands, AssociationThread[divs, polys]]&#xD;
    				&#xD;
    			) /; MatrixQ[disj, IntegerQ]&#xD;
    			&#xD;
    		) /; VectorQ[polys, MeshRegionQ]&#xD;
    	]&#xD;
    MultiPoints[___] = {};&#xD;
    &#xD;
    $tol = 0.001;&#xD;
    CoordinateNear[mr1_, mr2_, tol_:$tol] :=&#xD;
    	With[{d = {{-tol, tol}, {-tol, tol}}},&#xD;
    		And[&#xD;
    			NoneTrue[Transpose[{d+RegionBounds[mr1], d+RegionBounds[mr2]}], #1[[2,1]] &amp;gt; #1[[1,2]] || #1[[1,1]] &amp;gt; #1[[2,2]]&amp;amp;],&#xD;
    			Min[RegionDistance[mr1, MeshCoordinates[mr2]]] &amp;lt; tol&#xD;
    		]&#xD;
    	]&#xD;
    &#xD;
    resolveMultiPoints[{}, _] = {};&#xD;
    resolveMultiPoints[cands_List, passoc_?AssociationQ] :=&#xD;
    	Select[cands, MultiPointQ[#, passoc]&amp;amp;]&#xD;
    &#xD;
    MultiPointQ[cands_, passoc_?AssociationQ, tol_:$tol] :=&#xD;
    	Block[{coords, mrs},&#xD;
    		mrs = passoc /@ cands;&#xD;
    		coords = Union @@ MeshCoordinates /@ mrs;&#xD;
    		&#xD;
    		Or @@ Thread[And @@ (Thread[RegionDistance[#, coords] &amp;lt; tol]&amp;amp; /@ mrs)]&#xD;
    	]&#xD;
Now here&amp;#039;s all multipoints formed from countries:&#xD;
&#xD;
![enter image description here][14]&#xD;
&#xD;
Now to explore all cases, we can start off by looking for multipoints in all subdivisions of a given region, e.g. given Florida, find all multipoints within the counties of Florida. This can be achieved by building a hierarchical graph connecting countries and administrative divisions. Then for a given region, this graph can be used to find all subdivisions and the above code can be used to find the multipoints.&#xD;
&#xD;
    ad = AdministrativeDivisionData[];&#xD;
    pr = EntityValue[&amp;#034;AdministrativeDivision&amp;#034;, &amp;#034;ParentRegion&amp;#034;];&#xD;
    &#xD;
    $ADNetwork = Graph[Join[&#xD;
        Thread[&amp;#034;NullPointer&amp;#034; -&amp;gt; EntityList[&amp;#034;Country&amp;#034;]],&#xD;
        DeleteCases[Thread[pr -&amp;gt; ad], Rule[_Missing, _]]&#xD;
    ]];&#xD;
    &#xD;
    ChildrenMultiPoints[reg_] := ChildrenMultiPoints[reg, 4]&#xD;
&#xD;
    ChildrenMultiPoints[reg_, o___] :=&#xD;
    	MultiPoints[Rest[VertexOutComponent[$ADNetwork, reg, 1]], o]&#xD;
&#xD;
![enter image description here][15]&#xD;
&#xD;
Lastly, to cover all cases we need to consider sets of regions that have differing parent regions. To do this, for a given parent region $P$, first find all other regions $R_i$ (on the same level) that touch this region. Then simply run `MultiPoints` on all subdivisions in $P \cup R_i$. I omit this code here, as there were only 6 instances that came out of this case.&#xD;
&#xD;
&#xD;
  [1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=7535fourcorners.png&amp;amp;userId=46025&#xD;
  [2]: https://en.wikipedia.org/wiki/Quadripoint&#xD;
  [3]: http://community.wolfram.com//c/portal/getImageAttachment?filename=countryquadripoint.png&amp;amp;userId=46025&#xD;
  [4]: http://community.wolfram.com//c/portal/getImageAttachment?filename=2008squarequadripoints.png&amp;amp;userId=46025&#xD;
  [5]: http://community.wolfram.com//c/portal/getImageAttachment?filename=crossregionquadripoints.png&amp;amp;userId=46025&#xD;
  [6]: http://community.wolfram.com//c/portal/getImageAttachment?filename=allquadripoints.png&amp;amp;userId=46025&#xD;
  [7]: http://community.wolfram.com//c/portal/getImageAttachment?filename=4697quintipoints.png&amp;amp;userId=46025&#xD;
  [8]: http://community.wolfram.com//c/portal/getImageAttachment?filename=8873almostsixpoint.png&amp;amp;userId=46025&#xD;
  [9]: http://community.wolfram.com//c/portal/getImageAttachment?filename=9086almostsixpointzoom.png&amp;amp;userId=46025&#xD;
  [10]: https://en.wikipedia.org/wiki/Quadripoint#Multipoints_of_greater_numerical_complexity&#xD;
  [11]: https://en.wikipedia.org/wiki/Mount_Etna#Geopolitical_oddity&#xD;
  [12]: http://community.wolfram.com//c/portal/getImageAttachment?filename=3719tenpoint.png&amp;amp;userId=46025&#xD;
  [13]: http://community.wolfram.com//c/portal/getImageAttachment?filename=4645almostquintpoint.png&amp;amp;userId=46025&#xD;
  [14]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshot2016-10-0117.18.37.png&amp;amp;userId=46025&#xD;
  [15]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshot2016-10-0117.27.16.png&amp;amp;userId=46025</description>
    <dc:creator>Greg Hurst</dc:creator>
    <dc:date>2016-10-01T22:56:22Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1321057">
    <title>Has Wolfram abandoned the Graphs and Networks functionality?</title>
    <link>https://community.wolfram.com/groups/-/m/t/1321057</link>
    <description>This is a cautionary tale for those who choose Mathematica as the main tool for their work.&#xD;
&#xD;
It is now clear to me that Wolfram has simply abandoned the [Graphs and Networks](http://reference.wolfram.com/language/guide/GraphsAndNetworks.html) functionality area and I am left high and dry. I have no recourse because Mathematica is closed source so there is only so much a user can do to fix or work around problems. Reporting bugs in this particular area has now clearly proven to be useless. Most simply do not get fixed, no matter how serious they are, or how great a hindrance they are to practical use. No new functionality has been added since version 10.0.  My colleagues who use other tools (mostly Python and R packages) are more productive at this point, but I have a handicap with those systems because I made the mistake of investing most of my time into Mathematica, and stayed optimistic about it even in the face of the most obvious warning signs.&#xD;
&#xD;
I am writing this post because those people who have not heavily invested in Mathematica, and in particular this functionality area of Mathematica, are not in a position to see this and may fall in the same trap I did.  What if the same thing happens to the functionality area that is critical to *your* work?&#xD;
&#xD;
Wolfram Research, of course, will not tell you that they gave up on `Graph`.  Thus, after my experience, I think I owe it to the community to warn you about the situation.&#xD;
&#xD;
----&#xD;
&#xD;
Some might ask me what specifically is wrong. I have made many posts on this forum about `Graph`-bugs (you only have to search), and I reported many more to WRI.  There is always a last strawit would be pointless to show it. Those who know me will know that I am not writing this admittedly emotional post out of ill will towards WRI. I have betted on Mathematica more than most, and have been advocating for it throughout the years. I even have a network analysis package with ~250 functions. If I am forced to abandon Mathematica for this type of work, then the countless hours that went into this package will all have been in vain.&#xD;
&#xD;
I admit that I am writing this public post partly out of desperation to try to get WRI to either fix the many serious `Graph`-problems, or otherwise publicly state that `Graph` is now abandoned so those of us who have been using it can stop wasting our time.</description>
    <dc:creator>Szabolcs Horvát</dc:creator>
    <dc:date>2018-04-16T09:54:42Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1264240">
    <title>[Numberphile] - The Square-Sum Problem</title>
    <link>https://community.wolfram.com/groups/-/m/t/1264240</link>
    <description>As part of my Numberphile series of posts:&#xD;
&#xD;
 - [\[Numberphile\] - Frog Jumping - Solving the puzzle][1]&#xD;
 - [\[Numberphile\] - The Illumination Problem][2]&#xD;
 - [\[Numberphile\] - Sandpiles - Done in the Wolfram Language][3]&#xD;
&#xD;
here is another one about a recent video called [The Square-Sum Problem][4]&#xD;
&#xD;
[![enter image description here][5]][6]&#xD;
&#xD;
The question is: if you have the integers 1 through n, can you arrange that list in such a way that every two adjacent ones sum to a square number. As seen in the video and the [extra footage][7].&#xD;
&#xD;
We can easily check this in the Wolfram Language:&#xD;
&#xD;
Let&amp;#039;s see which number can pair up to a pair:&#xD;
&#xD;
    SquareEdges[n_Integer?Positive]:=Reap[Do[If[IntegerQ[Sqrt[i+j]],Sow[{i,j}]],{i,n-1},{j,i+1,n}]][[2,1]]&#xD;
&#xD;
 Now let&amp;#039;s try for 15, as in the main video:&#xD;
&#xD;
    n = 15;&#xD;
    poss = SquareEdges[n];&#xD;
    gr = Graph[TwoWayRule @@@ poss, VertexLabels -&amp;gt; Automatic];&#xD;
    path = FindHamiltonianPath[gr, PerformanceGoal :&amp;gt; &amp;#034;Speed&amp;#034;]&#xD;
    HighlightGraph[gr, BlockMap[Rule @@ # &amp;amp;, path, 2, 1]]&#xD;
&#xD;
giving:&#xD;
&#xD;
    {9, 7, 2, 14, 11, 5, 4, 12, 13, 3, 6, 10, 15, 1, 8}&#xD;
&#xD;
![enter image description here][8]&#xD;
&#xD;
In the extra footage, it is revealed that they found the solution for up to n=299. Can we do better? Yes we can! Changing n to 300 in the above code and rerunning gives us the solution in 0.28 sec on my laptop.&#xD;
&#xD;
{289,35,65,259,30,294,67,257,32,292,69,100,44,125,71,154,135,189,211,113,248,8,281,119,205,195,166,158,283,6,250,191,133,156,285,4,252,277,12,244,117,207,193,168,273,16,240,160,164,236,20,269,131,94,230,59,197,92,232,57,199,90,234,22,267,217,224,137,152,73,123,46,150,75,121,48,148,77,179,110,214,270,19,237,163,161,239,17,272,128,41,103,297,27,262,62,227,97,99,190,210,114,175,50,146,79,177,112,212,188,253,3,286,155,134,266,23,233,91,198,58,231,93,196,60,229,95,130,159,165,276,13,243,118,206,194,167,274,15,241,288,1,255,186,138,223,218,143,181,108,88,201,55,170,86,203,53,172,84,37,107,182,142,299,25,264,220,221,140,184,216,225,64,36,85,171,54,202,87,169,56,200,89,235,21,268,132,157,284,5,251,278,11,245,116,208,192,249,7,282,247,9,280,204,120,136,153,72,124,45,151,74,122,47,149,76,180,109,215,185,139,222,219,265,24,300,141,183,106,38,83,173,52,144,81,40,104,296,28,261,63,226,98,127,42,102,298,26,263,61,228,96,129,271,18,238,162,279,10,246,115,209,275,14,242,287,2,254,187,213,111,178,78,147,49,176,80,145,51,174,82,39,105,295,29,260,101,43,126,70,291,33,256,68,293,31,258,66,34,290}&#xD;
&#xD;
and a completely mess of a graph:&#xD;
&#xD;
![enter image description here][9]&#xD;
&#xD;
&#xD;
Can we go beyond? Let&amp;#039;s optimize a code a bit, and let&amp;#039;s find the solution for larger n:&#xD;
&#xD;
Let&amp;#039;s store our intermediate results in the association **db**:&#xD;
&#xD;
    SetDirectory[NotebookDirectory[]];&#xD;
    $HistoryLength=1;&#xD;
    db=If[FileExistsQ[&amp;#034;squaresumdb.mx&amp;#034;],&#xD;
      Import[&amp;#034;squaresumdb.mx&amp;#034;]&#xD;
    ,&#xD;
      &amp;lt;||&amp;gt;&#xD;
    ];&#xD;
&#xD;
And now our main code:&#xD;
&#xD;
    ClearAll[SquareEdges,SquareEdges2,CheckSol,TryToFind]&#xD;
    SquareEdges[n_Integer?Positive]:=Reap[Do[If[IntegerQ[Sqrt[i+j]],Sow[{i,j}]],{i,n-1},{j,i+1,n}]][[2,1]]&#xD;
    SquareEdges2[n_Integer]:=Module[{tmp},&#xD;
        tmp=Table[&#xD;
           {i,#}&amp;amp;/@(Range[Ceiling[Sqrt[2 i]],Floor[Sqrt[i+n]]]^2-i)&#xD;
        ,&#xD;
           {i,1,n-1}&#xD;
        ];&#xD;
        tmp=Join@@tmp;&#xD;
        Select[tmp,Less@@#&amp;amp;]&#xD;
    ]&#xD;
    CheckSol[l_List]:=Sort[l]===Range[Length[l]]\[And](And@@BlockMap[IntegerQ@*Sqrt@*Total,l,2,1])&#xD;
    TryToFind[n_Integer?Positive]:=Module[{edges,out},&#xD;
        If[!KeyExistsQ[db,n],&#xD;
            edges=SquareEdges2[n];&#xD;
            If[Union[Flatten[edges]]===Range[n],&#xD;
                edges=TwoWayRule@@@edges;&#xD;
                edges=RandomSample[edges];&#xD;
                Do[&#xD;
                    out=TimeConstrained[FindHamiltonianPath[Graph[edges],PerformanceGoal:&amp;gt;&amp;#034;Speed&amp;#034;],5+i,$Failed];&#xD;
                    If[out=!=$Failed,&#xD;
                        If[Length[out]==0,&#xD;
                            Print[Style[&amp;#034;No solution for &amp;#034;,Red],n];&#xD;
                        ,&#xD;
                            status=Row[{&amp;#034;Found solution for &amp;#034;,n,&amp;#034;:&amp;#034;,i}];&#xD;
                        ];&#xD;
                        AssociateTo[db,n-&amp;gt;out];&#xD;
                        Break[]&#xD;
                    ];&#xD;
                    Print[&amp;#034;Failed &amp;#034;,n,&amp;#034;:&amp;#034;,i];&#xD;
                    edges=RandomSample[edges];&#xD;
                ,&#xD;
                    {i,5}&#xD;
                ]&#xD;
                ,&#xD;
                Print[&amp;#034;Edges are not connected for &amp;#034;,n];&#xD;
                AssociateTo[db,n-&amp;gt;{}]&#xD;
            ]&#xD;
        ]&#xD;
    ]&#xD;
&#xD;
Let&amp;#039;s scan the first 1000:&#xD;
&#xD;
    Dynamic[status]&#xD;
    status = &amp;#034;&amp;#034;;&#xD;
    Do[TryToFind[k], {k, 3, 1000}]&#xD;
    Export[&amp;#034;squaresumdb.mx&amp;#034;, db];&#xD;
&#xD;
Note that if finding the Hamiltonian path takes too long I mix the edges and try again, sometimes, seemingly random, it then finds the solution quickly.&#xD;
&#xD;
I can tell you now that all of them have a solution. In fact I went up to larger numbers and found that all up to 2667 have a solution, and possibly beyond. I attached the notebook and the solutions in form of a mx file.&#xD;
&#xD;
&#xD;
&#xD;
  [1]: http://community.wolfram.com/groups/-/m/t/1055504&#xD;
  [2]: http://community.wolfram.com/groups/-/m/t/1048489&#xD;
  [3]: http://community.wolfram.com/groups/-/m/t/1058615&#xD;
  [4]: https://www.youtube.com/watch?v=G1m7goLCJDY&#xD;
  [5]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2018-01-11at23.36.51.png&amp;amp;userId=73716&#xD;
  [6]: https://www.youtube.com/watch?v=G1m7goLCJDY&#xD;
  [7]: https://www.youtube.com/watch?v=7_ph5djCCnM&#xD;
  [8]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2018-01-11at23.43.52.png&amp;amp;userId=73716&#xD;
  [9]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2018-01-11at23.46.51.png&amp;amp;userId=73716</description>
    <dc:creator>Sander Huisman</dc:creator>
    <dc:date>2018-01-11T23:29:05Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1007290">
    <title>Idea-nets and uniqueness of US inaugural addresses</title>
    <link>https://community.wolfram.com/groups/-/m/t/1007290</link>
    <description>*NOTE: click on images to see high resolution*&#xD;
&#xD;
&#xD;
----------&#xD;
&#xD;
[![enter image description here][1]][2]&#xD;
&#xD;
&#xD;
What is common between a symphony and a novel? They both progress linearly in time. This is why songs match lyrics and music so well. This seems obvious but comprehension of spacial objects is different. You can look at a two-dimensional painting and your sense of art is driven by the simultaneous perception of different spacial regions and their properties: color, contrast, etc. The simultaneous comparison of many different parts is the very mechanism of spacial perception. In contrast an average person cannot read more than one sentence at a time. And listening to the same parts of melody simultaneously can create cacophony or at least shift from the intended by creator sound. Because our consciousness is forced to constantly move though time and not space, we perceive spacial and temporal structures differently. &#xD;
&#xD;
We use memory to improve comprehension of temporal phenomena. But it is till quite hard to remember and compare many different moments simultaneously. Remembering the secondary sense of &amp;#034;relations&amp;#034; or &amp;#034;correlations&amp;#034; between different moments is even harder. What if we could extract important information from a temporal structure and reflect it via a spacial visual representation?&#xD;
&#xD;
As an example let&amp;#039;s take US presidents inaugural addresses. They are short pieces of text that at times may seem very similar to each other. So there there are 2 levels of comparison:&#xD;
&#xD;
1. What are ideas and relations between them in a single speech? &#xD;
&#xD;
2. What is common and different between different speeches?&#xD;
&#xD;
It is possible to create some very simple tools of text processing that give some immediate insight. In the image above you see a take on Obama 2013 and Trump 2017 inauguration speeches. Top idea-networks reflect the top ideas and relationships between them inside a speech. The top-terms are also clustered to indicate which ideas are in the tighter relationships. And word clouds show common and unique top words for each presidential address. Also notice, that while the common words are &amp;#034;common&amp;#034; they have different weights for each address, which redistributes the meaningful stress between common ideas.&#xD;
&#xD;
The Wolfram Language code for building these objects is below. It works in a very simple way. For word clouds you find unique and common words and then find their statistical weights. For the idea networks it is just a little bit more subtle. First you find &amp;#034;top terms&amp;#034; by deleting stop words and tallying the rest. Than you say that only tally weighting greater than a specific threshold counts as a &amp;#034;main idea&amp;#034; on which you build your network. The edges are drown between top-terms that are direct neighbors in the text. Thresholding of tally could be a bit misleading as selection of this cutoff is subjective and per-candidate specific. This means that a threshold chosen for one candidate may not work as well for the other because they may generate different statistical distribution of top-terms in the speeches. For Obama and Trump in the image above I used slightly different thresholds to get nicer visualizations. As a counterexample, below are net-ideas of inaugural addresses for the rest of 56 US presidents thresholded at the same **&amp;#034;Obama-level&amp;#034;**. As you can see sometimes the nets are overloaded and sometimes they are too simple. Which in itself tells something about different structures of texts and prompt us for careful treatment of the threshold. &#xD;
&#xD;
The final code and more details are given below.&#xD;
&#xD;
[![enter image description here][3]][3]&#xD;
&#xD;
A unique feature of Wolfram Language a multitudes of built-in curated data. We can access all inauguration speeches as&#xD;
&#xD;
    allOBJ = SortBy[ResourceData[&amp;#034;Presidential Inaugural Addresses&amp;#034;], &amp;#034;Date&amp;#034;];&#xD;
&#xD;
This is a sample of the dataset:&#xD;
&#xD;
    Column[allOBJ /@ {1, -1}]&#xD;
&#xD;
![enter image description here][4]&#xD;
&#xD;
Extract all texts and names and dates:&#xD;
&#xD;
    allTEXT = Normal[allOBJ[All, &amp;#034;Text&amp;#034;]];&#xD;
    allNAME = Normal[allOBJ[All, DateString[#Date, &amp;#034;Year&amp;#034;] &amp;lt;&amp;gt; &amp;#034; &amp;#034; &amp;lt;&amp;gt; CommonName[#Name] &amp;amp;]];&#xD;
&#xD;
# Idea-network &#xD;
&#xD;
Idea-nets are built &#xD;
&#xD;
    ideaNET[text_String,order_]:=&#xD;
    Module[&#xD;
    	{wordsTOP, edges,resctal, words=TextWords[DeleteStopwords[ToLowerCase[text]]]},&#xD;
    	resctal=Transpose[MapAt[N[Rescale[#]]&amp;amp;,Transpose[Tally[words]],2]];&#xD;
    	wordsTOP=Select[resctal,Last[#]&amp;gt;=order &amp;amp;];&#xD;
    	edges=UndirectedEdge@@@DeleteDuplicates[Sort/@DeleteCases[&#xD;
    			Partition[Cases[words,Alternatives@@wordsTOP[[All,1]]],2,1],{x_String,x_String}]];&#xD;
    	CommunityGraphPlot[&#xD;
    		Graph[edges,&#xD;
    			VertexSize-&amp;gt;Thread[wordsTOP[[All,1]]-&amp;gt;.1+.9wordsTOP[[All,2]]],&#xD;
    			VertexLabels-&amp;gt;Automatic,VertexLabelStyle-&amp;gt;Directive[20,White,Opacity[.8]],&#xD;
    			GraphStyle-&amp;gt;&amp;#034;Prototype&amp;#034;,Background-&amp;gt;Black],&#xD;
    	CommunityBoundaryStyle-&amp;gt;Directive[GrayLevel[.4],Dashed],&#xD;
    	CommunityRegionStyle-&amp;gt;GrayLevel[.2],&#xD;
    	ImageSize-&amp;gt;800{1,1},&#xD;
    	PlotRangePadding-&amp;gt;{{.1,.3},{0.1,0.1}}]&#xD;
    ]&#xD;
&#xD;
## Example: JFK inaugural address:&#xD;
&#xD;
    ideaNET[allTEXT[[-15]], .17]&#xD;
&#xD;
[![enter image description here][5]][5]&#xD;
&#xD;
# Unique and common top-terms&#xD;
&#xD;
The code that makes very top graphics is:&#xD;
&#xD;
    plusCLOUD[allTEXT[[-2]], allTEXT[[-1]], &amp;#034;o b a m a  &amp;#039;13&amp;#034;, &amp;#034;t ru m p &amp;#039;17&amp;#034;]&#xD;
&#xD;
With idea-nets defined as above and `plusCLOUD` as below:&#xD;
&#xD;
    plusCLOUD[text1_String,text2_String,label1_String,label2_String]:=&#xD;
    Module[&#xD;
    	{same,&#xD;
    	words1=TextWords[DeleteStopwords[ToLowerCase[text1]]],&#xD;
    	words2=TextWords[DeleteStopwords[ToLowerCase[text2]]]},&#xD;
    	same=Intersection[words1,words2];&#xD;
    	Grid[&#xD;
    		{{&amp;#034;&amp;#034;,Column[{&#xD;
    				Style[label1,80,Blue,FontFamily-&amp;gt;&amp;#034;Phosphate&amp;#034;],&#xD;
    				Style[&amp;#034;inaugural address&amp;#034;,45,Gray,FontFamily-&amp;gt;&amp;#034;Copperplate&amp;#034;]&#xD;
    			},Alignment-&amp;gt;Center],&#xD;
    			Column[{&#xD;
    				Style[label2,80,Red,FontFamily-&amp;gt;&amp;#034;Phosphate&amp;#034;],&#xD;
    				Style[&amp;#034;inaugural address&amp;#034;,45,Gray,FontFamily-&amp;gt;&amp;#034;Copperplate&amp;#034;]&#xD;
    			},Alignment-&amp;gt;Center]},&#xD;
    		{Framed[Column[Style[#,35,FontFamily-&amp;gt;&amp;#034;DIN Condensed&amp;#034;]&amp;amp;/@Characters[&amp;#034;idea network&amp;#034;],&#xD;
    			Alignment-&amp;gt;Center],FrameStyle-&amp;gt;White,FrameMargins-&amp;gt;10],&#xD;
    		ideaNET[text1,.21],ideaNET[text2,.18]},&#xD;
    		{Framed[Column[Style[#,35,FontFamily-&amp;gt;&amp;#034;DIN Condensed&amp;#034;]&amp;amp;/@Characters[&amp;#034;unique words&amp;#034;],&#xD;
    			Alignment-&amp;gt;Center],FrameStyle-&amp;gt;White,FrameMargins-&amp;gt;10],&#xD;
    		WordCloud[DeleteCases[words1,Alternatives@@same],ImageSize-&amp;gt;800{1,1},&#xD;
    			ColorFunction-&amp;gt;(ColorData[&amp;#034;DeepSeaColors&amp;#034;][(.2+#)/1.2]&amp;amp;),Background-&amp;gt;Black],&#xD;
    		WordCloud[DeleteCases[words2,Alternatives@@same],ImageSize-&amp;gt;800{1,1},&#xD;
    			ColorFunction-&amp;gt;(ColorData[&amp;#034;ValentineTones&amp;#034;][(.2+#)/1.2]&amp;amp;),Background-&amp;gt;Black]},&#xD;
    		{Framed[Column[Style[#,35,FontFamily-&amp;gt;&amp;#034;DIN Condensed&amp;#034;]&amp;amp;/@Characters[&amp;#034;common words&amp;#034;],Alignment-&amp;gt;Center],FrameStyle-&amp;gt;White,FrameMargins-&amp;gt;10],&#xD;
    		WordCloud[Cases[words1,Alternatives@@same],ImageSize-&amp;gt;800{1,1},&#xD;
    			ColorFunction-&amp;gt;(ColorData[&amp;#034;AvocadoColors&amp;#034;][(.2+#)/1.2]&amp;amp;),Background-&amp;gt;Black],&#xD;
    		WordCloud[Cases[words2,Alternatives@@same],ImageSize-&amp;gt;800{1,1},&#xD;
    			ColorFunction-&amp;gt;(ColorData[&amp;#034;AvocadoColors&amp;#034;][(.2+#)/1.2]&amp;amp;),Background-&amp;gt;Black]&#xD;
    		}},&#xD;
    	Spacings-&amp;gt;{0, 0}]&#xD;
    ]&#xD;
&#xD;
&#xD;
  [1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=trump.png&amp;amp;userId=11733&#xD;
  [2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=trump.png&amp;amp;userId=11733&#xD;
  [3]: http://community.wolfram.com//c/portal/getImageAttachment?filename=qwe434tgwrefv.png&amp;amp;userId=11733&#xD;
  [4]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2017-02-03at8.09.19AM.png&amp;amp;userId=11733&#xD;
  [5]: http://community.wolfram.com//c/portal/getImageAttachment?filename=JFKiadss.png&amp;amp;userId=11733</description>
    <dc:creator>Vitaliy Kaurov</dc:creator>
    <dc:date>2017-02-03T14:29:00Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/227651">
    <title>Convergence of synonym networks</title>
    <link>https://community.wolfram.com/groups/-/m/t/227651</link>
    <description>Take a word and find its synonyms. Then find the synonyms of the synonyms from the previous step. And so on. [b]For how long will the number of synonyms continue to grow?[/b]

Language structures can take peculiar shapes. Code can be quite simple to compute and automate informative visualizations. Below vertex size is larger if the vertex has more connections, meaning a word has a greater number of synonyms. Note GraphLayout -&amp;gt; {&amp;#034;BalloonEmbedding&amp;#034;, &amp;#034;RootVertex&amp;#034; -&amp;gt; word} option to Graph is used to produce this specific layout. The code below is based on [url=http://wolfram.com/xid/0j49p2ci-ckbtad]an example from Documentation[/url].

Lets define a function:[mcode]SynonymNetwork[word_String, depth_Integer, labels_: Tooltip] :=
 
 Module[{ed, sz, g},
  
  (* list of edges *)
   ed = Union[Sort /@ Flatten[Rest[NestList[Union[Flatten[
           Thread[# &amp;lt;-&amp;gt; WordData[#, &amp;#034;Synonyms&amp;#034;, &amp;#034;List&amp;#034;]] &amp;amp; /@ #[[All, 2]]]] &amp;amp;, {&amp;#034;&amp;#034; &amp;lt;-&amp;gt; word}, depth]]]];
  
  (* size of vertices based on number of synonyms *)
   sz = Thread[VertexList[Graph[ed]] -&amp;gt; Map[{&amp;#034;Scaled&amp;#034;, #} &amp;amp;, 
           .05 (.01 + .99 N[Rescale[VertexDegree[g = Graph[ed]]]])^.5]];
  
  (* graph *)  
  SetProperty[g, 
   {GraphLayout -&amp;gt; {&amp;#034;BalloonEmbedding&amp;#034;, &amp;#034;RootVertex&amp;#034; -&amp;gt; word}, 
    EdgeStyle -&amp;gt; Directive[Opacity[.2], Red], 
    VertexStyle -&amp;gt; Directive[Opacity[.1], Black], 
    VertexStyle -&amp;gt; {word -&amp;gt; Directive[Opacity[1], Red]}, 
    VertexSize -&amp;gt; sz, VertexLabels -&amp;gt; Placed[&amp;#034;Name&amp;#034;, labels]}]
  
  ][/mcode]
Here how it works:[mcode]SynonymNetwork[&amp;#034;promise&amp;#034;, 3][/mcode]
[img=width: 479px; height: 727px;]/c/portal/getImageAttachment?filename=qw23rf5tef5gtbj7uyjthd.gif&amp;amp;userId=11733[/img]


Now as I asked earlier: will the number of synonyms continue to grow? This of course depends on a particular thesaurus dictionary at hand. But once we settled on one, what can we find? Obviously some very specific words have no synonyms at all:
[mcode]In[1]:= WordData[&amp;#034;transmogrification&amp;#034;, &amp;#034;Definitions&amp;#034;]
Out[1]= {{&amp;#034;transmogrification&amp;#034;, &amp;#034;Noun&amp;#034;} -&amp;gt; 
          &amp;#034;the act of changing into a different form or appearance (especially a fantastic or grotesque one)&amp;#034;}


In[2]:= WordData[&amp;#034;transmogrification&amp;#034;, &amp;#034;Synonyms&amp;#034;]
Out[2]= {{&amp;#034;transmogrification&amp;#034;, &amp;#034;Noun&amp;#034;} -&amp;gt; {}}[/mcode]
Some words will have very trivial small finite networks (note network depth is set 20, while even 100 or greater will not change it):[mcode]SynonymNetwork[&amp;#034;chemistry&amp;#034;, 20, Above][/mcode]
[img=width: 327px; height: 356px;]/c/portal/getImageAttachment?filename=sdf34erfdd43ergf.png&amp;amp;userId=11733[/img]

And of course many words will have networks that grow very fast. This applies not only for very general words such as fast or beautiful, but also for strange rare words such as &amp;#034;discombobulate&amp;#034;:[mcode]ParallelMap[Length[EdgeList[SynonymNetwork[&amp;#034;discombobulate&amp;#034;, #]]] &amp;amp;, Range[16]]
Out[]= {9, 97, 1097, 7644, 26051, 46671, 59440, 65187, 67805, 68798, 69274, 69456, 69565, 69587, 69592, 69592}

data = ParallelMap[Length[VertexList[SynonymNetwork[&amp;#034;discombobulate&amp;#034;, #]]] &amp;amp;, Range[16]
{10, 73, 787, 4293, 11646, 18858, 22931, 24911, 25743, 26096, 26238, 26302, 26321, 26330, 26330, 26330}

ListPlot[data, Filling -&amp;gt; Bottom, Joined -&amp;gt; True, Mesh -&amp;gt; All, AxesLabel -&amp;gt; {&amp;#034;Network depth&amp;#034;, &amp;#034;Synonyms&amp;#034;}][/mcode]
[img=width: 450px; height: 244px;]/c/portal/getImageAttachment?filename=ScreenShot2014-03-31at1.44.27AM.png&amp;amp;userId=11733[/img]


So we see [b]&amp;#034;discombobulate&amp;#034; synonym network gets saturated at depth 15 and attains 26330 vertices and 69592 edges[/b]. Quite magnificent result I think ;-) This is, btw, very inefficient way of computing the convergence  we repeat same computations many times while building the graph. Ideally we should introduce counting synonyms part into our SynonymNetwork function. This is how discombobulate network looks &amp;#034;big&amp;#034; already at depth 3:
[mcode]SynonymNetwork[&amp;#034;discombobulate&amp;#034;, 3]
[/mcode][img]/c/portal/getImageAttachment?filename=df45t6576rteyrsgdfaaasdf.png&amp;amp;userId=11733[/img]

How big do such networks get? Can we make some estimates? Well, lets first define set of all words that to belong to discombobulate network:[mcode]gr = SynonymNetwork[&amp;#034;discombobulate&amp;#034;, 15];
ver = VertexList[gr];[/mcode]
Then lets find all unique words in Alice in Wonderland:[mcode]alice = Union[ToLowerCase[StringSplit[ExampleData[{&amp;#034;Text&amp;#034;, &amp;#034;AliceInWonderland&amp;#034;}], RegularExpression[&amp;#034;[\\W_]+&amp;#034;]]]];
alice // Length

Out[]= 1484[/mcode]
Then select, say, only nouns that have synonyms [mcode]nouns = Select[alice, MemberQ[WordData[#, &amp;#034;PartsOfSpeech&amp;#034;], &amp;#034;Noun&amp;#034;] &amp;amp;&amp;amp; WordData[#, &amp;#034;Synonyms&amp;#034;, &amp;#034;List&amp;#034;] =!= {} &amp;amp;];
nouns // Length

Out[]= 809[/mcode]
We see that more than half of these nouns belong to the discombobulate network:
[mcode]MemberQ[ver, #] &amp;amp; /@ nouns // Tally
Out[]= {{False, 223}, {True, 586}}[/mcode]
I also would like to share some beautiful smaller CONVERGED (saturated) networks, which I found, - beautiful in structure and sets of words they gather (see below). They of course do not belong to huge &amp;#034;discombobulate&amp;#034; graph above. And as already mentioned I propose the following - comment if:
[list]
[*]you find some beautiful networks 
[*]you can figure out how we can make estimates on large networks or do any further digging 
[*]you can optimize code
[*]you have any ideas / comments at all ;-)
[/list]
[b]===&amp;gt; &amp;#034;dragonfly&amp;#034; - 23 synonyms, depth 3[/b]

[mcode]ParallelMap[Length[VertexList[SynonymNetwork[&amp;#034;dragonfly&amp;#034;, #]]] &amp;amp;, Range[7]]
Out[]= {8, 14, 23, 23}

SynonymNetwork[&amp;#034;dragonfly&amp;#034;, 20, Above][/mcode]
[img]/c/portal/getImageAttachment?filename=sdf43sfs7s683sdfs8239sf.png&amp;amp;userId=11733[/img]

[b]===&amp;gt; &amp;#034;benevolent&amp;#034; - 27 synonyms, depth 7[/b]

[mcode]ParallelMap[Length[VertexList[SynonymNetwork[&amp;#034;benevolent&amp;#034;, #]]] &amp;amp;, Range[9]]
Out[]= {11, 15, 19, 23, 25, 26, 27, 27}

SynonymNetwork[&amp;#034;benevolent&amp;#034;, 20, Below][/mcode]
[img]/c/portal/getImageAttachment?filename=GMLO35FVFVFDffdfdzg.png&amp;amp;userId=11733[/img]</description>
    <dc:creator>Vitaliy Kaurov</dc:creator>
    <dc:date>2014-03-30T05:26:37Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1793319">
    <title>Factorio - Visualizing construction material dependencies</title>
    <link>https://community.wolfram.com/groups/-/m/t/1793319</link>
    <description>![enter image description here][1]&#xD;
&#xD;
Factorio is a game where you crashed on a planet with your space-craft. You have to built a new rocket and leave this planet again. In order to do so you will need to mine metals and built yourself a factory, make labs to do research, and built machine that make other machines, and finally combine all of this to make rockets, satellites, rocket fuel, trains, flying robots, oil products, steam engines, plastics, electronic chips, iron, copper, uranium centrifuging, solar panels etc etc. An incredibly complicated game where the key idea is that you automate this entire process using machines in your factory.&#xD;
&#xD;
See https://www.youtube.com/watch?v=KVvXv1Z6EY8 .&#xD;
&#xD;
 To do research you need to manufacture research-packs which are created from other resources, which might also be created from other resources etc. etc. &#xD;
&#xD;
Here is some code that interprets the Factorio wiki:&#xD;
&#xD;
    baseurl = &amp;#034;https://wiki.factorio.com&amp;#034;;&#xD;
    ClearAll[GetImage]&#xD;
    ClearAll[FindDependencies]&#xD;
    GetImage[url_] := GetImage[url] = Import[url]&#xD;
    FindDependencies[url_String] := &#xD;
     FindDependencies[url] = Module[{xml, c, end, other, sel = 1},&#xD;
       xml = Import[url, &amp;#034;XMLObject&amp;#034;];&#xD;
       c = Cases[xml, &#xD;
         XMLElement[&amp;#034;table&amp;#034;, {}, {contents_}] :&amp;gt; contents, \[Infinity]];&#xD;
       c = Select[c, &#xD;
         MemberQ[#, XMLElement[&amp;#034;p&amp;#034;, {}, {&amp;#034;Recipe\n&amp;#034;}], \[Infinity]] &amp;amp;];&#xD;
       c = FirstCase[#, &#xD;
           XMLElement[&#xD;
             &amp;#034;tr&amp;#034;, {}, {XMLElement[&#xD;
               &amp;#034;td&amp;#034;, {___, &#xD;
                &amp;#034;class&amp;#034; -&amp;gt; &amp;#034;infobox-vrow-value&amp;#034;}, {x__}]}] :&amp;gt; {x}, &#xD;
           Missing[], \[Infinity]] &amp;amp; /@ c;&#xD;
       If[Length[c] &amp;gt; 0,&#xD;
        c = c[[sel]];&#xD;
        c = Cases[c, &#xD;
          XMLElement[&#xD;
            &amp;#034;div&amp;#034;, {&amp;#034;class&amp;#034; -&amp;gt; &amp;#034;factorio-icon&amp;#034;, &#xD;
             &amp;#034;style&amp;#034; -&amp;gt; &amp;#034;background-color:#999;&amp;#034;}, {XMLElement[&#xD;
              &amp;#034;a&amp;#034;, {&amp;#034;shape&amp;#034; -&amp;gt; &amp;#034;rect&amp;#034;, &amp;#034;href&amp;#034; -&amp;gt; hrefurl_, &#xD;
               &amp;#034;title&amp;#034; -&amp;gt; name_}, {XMLElement[&#xD;
                &amp;#034;img&amp;#034;, {&amp;#034;alt&amp;#034; -&amp;gt; _, &amp;#034;src&amp;#034; -&amp;gt; imgurl_, &amp;#034;width&amp;#034; -&amp;gt; &amp;#034;32&amp;#034;, &#xD;
                 &amp;#034;height&amp;#034; -&amp;gt; &amp;#034;32&amp;#034;,___}, {}]}], &#xD;
             XMLElement[&#xD;
              &amp;#034;div&amp;#034;, {&amp;#034;class&amp;#034; -&amp;gt; &amp;#034;factorio-icon-text&amp;#034;}, {num_}]}] :&amp;gt; &#xD;
           FactorioObject[baseurl &amp;lt;&amp;gt; hrefurl, name, &#xD;
            GetImage[baseurl &amp;lt;&amp;gt; imgurl], &#xD;
            ToExpression@StringTrim[StringReplace[num, &amp;#034;k&amp;#034; -&amp;gt; &amp;#034;000&amp;#034;]]], \[Infinity]];&#xD;
        &#xD;
        c = DeleteCases[c, FactorioObject[_, &amp;#034;Time&amp;#034;, _, _]];&#xD;
        {{end}, other} = TakeDrop[c, -1];&#xD;
        other -&amp;gt; end,&#xD;
        {}&#xD;
        ]&#xD;
       ]&#xD;
    ClearAll[FindDependencyTree]&#xD;
    FindDependencyTree[url_String, iterations_: 6] := &#xD;
     Module[{a, known, unknown, new, vlbls, vertices},&#xD;
      a = FindDependencies[url];&#xD;
      known = {a};&#xD;
      Do[&#xD;
       unknown = Join @@ known[[All, 1]];&#xD;
       unknown = DeleteDuplicates[Complement[unknown, known[[All, 2]]]];&#xD;
       new = DeleteDuplicates[FindDependencies@*First /@ unknown];&#xD;
       new = DeleteCases[new, {}];&#xD;
       known = DeleteDuplicates[Join[known, new]];&#xD;
       ,&#xD;
       {iterations}&#xD;
       ];&#xD;
      vlbls = &#xD;
       Cases[known, &#xD;
        FactorioObject[_, name_, &#xD;
          icon_, _] :&amp;gt; (name -&amp;gt; &#xD;
           Image[icon, ImageSize -&amp;gt; 32]), \[Infinity]];&#xD;
      vertices = &#xD;
       DeleteDuplicates[&#xD;
        Join @@ Table[(# -&amp;gt; k[[2, 2]]) &amp;amp; /@ k[[1, All, 2]], {k, known}]];&#xD;
      &amp;lt;|&amp;#034;LabelRules&amp;#034; -&amp;gt; vlbls, &amp;#034;Vertices&amp;#034; -&amp;gt; vertices, &#xD;
       &amp;#034;Dependencies&amp;#034; -&amp;gt; known|&amp;gt;&#xD;
      ]&#xD;
&#xD;
Let&amp;#039;s ask the dependency tree for the first science pack:&#xD;
&#xD;
    out1 = FindDependencyTree[&amp;#034;https://wiki.factorio.com/Science_pack_1&amp;#034;];&#xD;
    Graph[out1[&amp;#034;Vertices&amp;#034;], VertexShape -&amp;gt; out1[&amp;#034;LabelRules&amp;#034;], &#xD;
     VertexSize -&amp;gt; {&amp;#034;Scaled&amp;#034;, 0.05}]&#xD;
&#xD;
![enter image description here][2]&#xD;
&#xD;
To make Science pack 1, we need gears and copper plates. And to make gears we need iron plates. The iron and copper plates are made from iron and copper ore. &#xD;
&#xD;
This is still relatively simple, let&amp;#039;s look at the other science packs:&#xD;
&#xD;
    out2 = FindDependencyTree[&#xD;
       &amp;#034;https://wiki.factorio.com/Science_pack_2&amp;#034;];&#xD;
    Graph[out2[&amp;#034;Vertices&amp;#034;], VertexShape -&amp;gt; out2[&amp;#034;LabelRules&amp;#034;], &#xD;
     VertexSize -&amp;gt; {&amp;#034;Scaled&amp;#034;, 0.05}]&#xD;
    out3 = FindDependencyTree[&#xD;
       &amp;#034;https://wiki.factorio.com/Science_pack_3&amp;#034;];&#xD;
    Graph[out3[&amp;#034;Vertices&amp;#034;], VertexShape -&amp;gt; out3[&amp;#034;LabelRules&amp;#034;], &#xD;
     VertexSize -&amp;gt; {&amp;#034;Scaled&amp;#034;, 0.05}]&#xD;
    out4 = FindDependencyTree[&#xD;
       &amp;#034;https://wiki.factorio.com/Military_science_pack&amp;#034;];&#xD;
    Graph[out4[&amp;#034;Vertices&amp;#034;], VertexShape -&amp;gt; out4[&amp;#034;LabelRules&amp;#034;], &#xD;
     VertexSize -&amp;gt; {&amp;#034;Scaled&amp;#034;, 0.05}]&#xD;
    out5 = FindDependencyTree[&#xD;
       &amp;#034;https://wiki.factorio.com/Production_science_pack&amp;#034;];&#xD;
    Graph[out5[&amp;#034;Vertices&amp;#034;], VertexShape -&amp;gt; out5[&amp;#034;LabelRules&amp;#034;], &#xD;
     VertexSize -&amp;gt; {&amp;#034;Scaled&amp;#034;, 0.05}]&#xD;
    out6 = FindDependencyTree[&#xD;
       &amp;#034;https://wiki.factorio.com/High_tech_science_pack&amp;#034;];&#xD;
    Graph[out6[&amp;#034;Vertices&amp;#034;], VertexShape -&amp;gt; out6[&amp;#034;LabelRules&amp;#034;], &#xD;
     VertexSize -&amp;gt; {&amp;#034;Scaled&amp;#034;, 0.05}]&#xD;
&#xD;
Resulting in:&#xD;
&#xD;
![enter image description here][3]&#xD;
&#xD;
![enter image description here][4]&#xD;
![enter image description here][5]&#xD;
![enter image description here][6]&#xD;
![enter image description here][7]&#xD;
&#xD;
To summarize, let&amp;#039;s combine all the graphs:&#xD;
&#xD;
    o = {out1, out2, out3, out4, out5, out6};&#xD;
    Graph[Union @@ o[[All, &amp;#034;Vertices&amp;#034;]], &#xD;
     VertexShape -&amp;gt; Union @@ o[[All, &amp;#034;LabelRules&amp;#034;]], &#xD;
     VertexSize -&amp;gt; {&amp;#034;Scaled&amp;#034;, 0.02}, ImageSize -&amp;gt; 1000, &#xD;
     AspectRatio -&amp;gt; 1/GoldenRatio]&#xD;
&#xD;
![enter image description here][8]&#xD;
    &#xD;
As you can see the dependencies are very complex to get all the research packs. Of course there are many things you need to create with your machines, think of transport belts, trains, mining, steam generation, and energy production, water and other chemicals etc etc. &#xD;
&#xD;
One of the most expensive parts is a satellite (to guide your rocket):&#xD;
&#xD;
    out = FindDependencyTree[&amp;#034;https://wiki.factorio.com/Satellite&amp;#034;];&#xD;
    Graph[out[&amp;#034;Vertices&amp;#034;], VertexShape -&amp;gt; out[&amp;#034;LabelRules&amp;#034;], &#xD;
     VertexSize -&amp;gt; {&amp;#034;Scaled&amp;#034;, 0.05}]&#xD;
&#xD;
![enter image description here][9]&#xD;
&#xD;
I hope you like this little exploration on Graphs and Factorio. We could also use Mathematica&amp;#039;s Graph technology to design balanced belt splitter designs: http://i.imgur.com/tz2Jc3p.png ! I will leave that for some other time. For now, explore the different buildings or parts, for example have a look at the rocket silo:&#xD;
&#xD;
    out = FindDependencyTree[&amp;#034;https://wiki.factorio.com/Rocket_silo&amp;#034;];&#xD;
    Graph[out[&amp;#034;Vertices&amp;#034;], VertexShape -&amp;gt; out[&amp;#034;LabelRules&amp;#034;], &#xD;
     VertexSize -&amp;gt; {&amp;#034;Scaled&amp;#034;, 0.05}]&#xD;
&#xD;
If you haven&amp;#039;t played already be careful it is an incredibly addicting game!&#xD;
&#xD;
&#xD;
&#xD;
&#xD;
  [1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=fd1f632099404d13bb4a9c2ce3f1284e92058e00078b28baf5e6858887e5c505_product_card_v2_mobile_slider_639.jpg&amp;amp;userId=73716&#xD;
  [2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=2381Factorio_1.png&amp;amp;userId=73716&#xD;
  [3]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Factorio_2.png&amp;amp;userId=73716&#xD;
  [4]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Factorio_3.png&amp;amp;userId=73716&#xD;
  [5]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Factorio_4.png&amp;amp;userId=73716&#xD;
  [6]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Factorio_5.png&amp;amp;userId=73716&#xD;
  [7]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Factorio_6.png&amp;amp;userId=73716&#xD;
  [8]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Factorio_All.png&amp;amp;userId=73716&#xD;
  [9]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Factorio_Satellite.png&amp;amp;userId=73716</description>
    <dc:creator>Sander Huisman</dc:creator>
    <dc:date>2019-09-20T16:56:46Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/151105">
    <title>Plot a simple x vs. y plot from a table</title>
    <link>https://community.wolfram.com/groups/-/m/t/151105</link>
    <description>I have a table that I imported from a csv file with 15 columns of hippocampal subregion volumes and some memory tests. For some reason, mathematica does not make it easy to make a simple x vs. y plot. Any Ideas how I could simply refer to two colums that I want plotted against each other?

Extra:
I would really like to use headers in the csv, but I had to take them out because mathematica cannot handle them without what seems like a lot of extra work. Any advice?

I should probably just go back to r....

Thank you all in advance for any help!</description>
    <dc:creator>trodriguez2011</dc:creator>
    <dc:date>2013-11-09T05:36:23Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/497445">
    <title>Flags of all countries grouped by similarity</title>
    <link>https://community.wolfram.com/groups/-/m/t/497445</link>
    <description>Today I watched this TED talk &amp;#034;[Why city flags may be the worst-designed thing you&amp;#039;ve never noticed][1]&amp;#034; and it made me really curious about how the five basic principles of flag design apply to countries. Certainly, most country flags are so simple that a child can draw them from memory. But this principle increases the odds of having flag duplicates, and to show this I&amp;#039;ve written the following WL code:&#xD;
&#xD;
    countries = CountryData[&amp;#034;Countries&amp;#034;, &amp;#034;Name&amp;#034;];&#xD;
    flags = Rasterize /@ CountryData[&amp;#034;Countries&amp;#034;, &amp;#034;Flag&amp;#034;];&#xD;
    similarities = # -&amp;gt; First[Nearest[DeleteCases[flags, #], #]] &amp;amp; /@ flags;&#xD;
    g = Graph[Labeled[#[[2]],Placed[Tooltip[#[[2]],#[[1]]],{.7,.6}]]&amp;amp;/@Transpose[{countries,flags}],similarities,ImageSize-&amp;gt;3500]&#xD;
&#xD;
![Flags of all countries group by similarity][2]&#xD;
&#xD;
    ImageCollage[Length[#] -&amp;gt; ImageCollage[#] &amp;amp; /@ WeaklyConnectedComponents[g]]&#xD;
&#xD;
![Flags Collage by Similarity][3]&#xD;
&#xD;
    GraphicsGrid[Partition[Flatten[WeaklyConnectedComponents[g]], 6], Background -&amp;gt; Gray]&#xD;
&#xD;
![List of similar flags][4]&#xD;
&#xD;
Feel free to explore the similarity graph of flags in the CDF attached below.&#xD;
&#xD;
![Flag Similarity Graph][6]&#xD;
&#xD;
Are these similarities mere accidents or deliberate flag copies? &#xD;
Mapping the countries with similar flags might answer this question. To get started, here is how to [Map the Countries of Africa with Their Flags][5].&#xD;
&#xD;
&#xD;
  [1]: https://www.ted.com/talks/roman_mars_why_city_flags_may_be_the_worst_designed_thing_you_ve_never_noticed&#xD;
  [2]: /c/portal/getImageAttachment?filename=SimilarityCountryFlagsGraph.png&amp;amp;userId=56204&#xD;
  [3]: /c/portal/getImageAttachment?filename=SimilarityCountryFlagsCollage.png&amp;amp;userId=56204&#xD;
  [4]: /c/portal/getImageAttachment?filename=SimilarityFlagsGrid.png&amp;amp;userId=56204&#xD;
  [5]: http://www.wolfram.com/mathematica/new-in-10/entity-based-geocomputation/map-the-countries-of-africa-with-their-flags.html&#xD;
  [6]: /c/portal/getImageAttachment?filename=FlagGraph.gif&amp;amp;userId=56204</description>
    <dc:creator>Bernat Espigulé</dc:creator>
    <dc:date>2015-05-15T20:25:24Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/33771">
    <title>Visibility Graphs: Dualism of Time Series and Networks</title>
    <link>https://community.wolfram.com/groups/-/m/t/33771</link>
    <description>From a recent Complex System article [1] I found out about interesting mapping between Graphs and Time Series that currently gaining more and more attention. The main idea is being able to apply time series analysis methods to networks and vice versa. There is a hope of gaining new insights into familiar objects by approaching from different side. I thought it would be interesting to implement a toy example in Mathematica. I consider the simplest Horizontal Visibility Graph (HVG) algorithm which can be simply explained with the figure below.&#xD;
&#xD;
[img]http://i.imgur.com/uK2jT.png[/img]&#xD;
&#xD;
   1. Every event in time series correspond to a vertex in the graph&#xD;
   2. Two events are connected by edge in the graph if all events between them in time series a smaller then them in magnitude&#xD;
&#xD;
There are other more complex mapping algorithms (see references at the end), but well stick with this simple one. Lets consider three different types of time series to see what kind of networks they can produce:&#xD;
   1. Deterministic system: Cellular Automaton rule 54 with complex type 4 behavior&#xD;
   2. Stochastic system: Geometric Brownian Motion random process&#xD;
   3. Empirical system: Financial data of GE stock price&#xD;
[mcode]dataS = {FromDigits[#, 2] &amp;amp; /@ &#xD;
   CellularAutomaton[54, RandomInteger[1, 200], 49],&#xD;
   RandomFunction[GeometricBrownianMotionProcess[0, .1, 2], {1, 50, 1}][[2, 1, 1]],&#xD;
   FinancialData[&amp;#034;GE&amp;#034;, &amp;#034;Jan. 1, 2000&amp;#034;][[All, 2]][[1 ;; 50]]};&#xD;
&#xD;
ListPlot[#, Filling -&amp;gt; Bottom, AspectRatio -&amp;gt; 1/10, FillingStyle -&amp;gt; Thick, PlotStyle -&amp;gt; PointSize[.008], &#xD;
Axes -&amp;gt; {True, False}, GridLines -&amp;gt; {None, Automatic}, Ticks -&amp;gt; {Range[81], None}, ImageSize -&amp;gt; 800] &amp;amp; /@ dataS&#xD;
[/mcode]&#xD;
[img]http://i.imgur.com/aI72Q.png[/img]&#xD;
Define the mapping function&#xD;
[mcode]fied[m_, n_, data_] := If[(Min[#[[m]], #[[n]]] &amp;gt; Max[#[[m + 1 ;; n - 1]]]) &amp;amp;@data, m \[UndirectedEdge] n][/mcode]Compute the edges of the graph&#xD;
[mcode]edgesS = Cases[Flatten[Table[fied[m, n, #], {m, Length[#]}, {n, m + 1, Length[#]}]], _ \[UndirectedEdge] _] &amp;amp; /@ dataS;[/mcode]Build the graph and highlight vertexes based on vertex degree and the shortest path between initial and final events. &#xD;
[mcode]gS = Graph[#, GraphLayout -&amp;gt; &amp;#034;LayeredDigraphEmbedding&amp;#034;] &amp;amp; /@ edgesS;&#xD;
gSH = HighlightGraph[#, VertexList[#],&#xD;
VertexSize -&amp;gt; Thread[VertexList[#] -&amp;gt; Rescale[VertexDegree[#]]],&#xD;
ImageSize -&amp;gt; {Automatic, 500}, VertexLabels -&amp;gt; &amp;#034;Name&amp;#034;] &amp;amp; /@ gS;&#xD;
&#xD;
HighlightGraph[#, PathGraph[FindShortestPath[#, 1, 50]], GraphHighlightStyle -&amp;gt; &amp;#034;Thick&amp;#034;] &amp;amp; /@ gSH[/mcode][img]http://i.imgur.com/2bQU6.png[/img]&#xD;
I used LayeredDigraphEmbedding which kind of preserves chronological order of the series laying out networks nicely. I hope you enjoyed this little mapping and may apply a similar method for your own research. There are inverse mappings too - see the reference. Please feel free to share your ideas on the subject or possible algorithm optimization. &#xD;
&#xD;
   [1] [b][url=http://www.complex-systems.com/abstracts/v21_i03_a03.html]Discriminating Chaotic Visibility Graph Eigenvalues, Vincenzo Fioriti et al, Complex Systems, Vol 21, No 3, p193[/url][/b]&#xD;
   [2] [b][url=http://www.pnas.org/content/105/13/4972.full]From time series to complex networks: The visibility graph[/url][/b]&#xD;
   [3] [b][url=http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3154932/pdf/pone.0023378.pdf]Duality between Time Series and Networks[/url][/b]&#xD;
   [4] [b][url=http://arxiv.org/find/all/1/AND+abs:+AND+visibility+graph+abs:+AND+time+series/0/1/0/all/0/1?skip=0&amp;amp;query_id=701ef182d80b670f]Some related arXiv.org papers[/url][/b]</description>
    <dc:creator>Vitaliy Kaurov</dc:creator>
    <dc:date>2013-01-17T03:13:27Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1112012">
    <title>BVH Accelerated 3D Shadow Mapping</title>
    <link>https://community.wolfram.com/groups/-/m/t/1112012</link>
    <description>[Shadow mapping][1] is a process of applying shadows to a computer graphic.  `Graphics3D` allows the user to specify lighting conditions for the surfaces of 3D graphical primitives, however, visualising the shadow an object projects onto a surface requires the processes of shadow mapping.  Each pixel of the projection surface must check if it is visible from the light source; if this check returns false then the pixel forms a shadow.  This becomes a problem of geometric intersections, i.e., for this case, the intersection between a line and a triangle.  For a 3D model with 100s and more of polygons, repeated intersection tests across the entire model for each pixel is an extremely costly (and inefficient) task.  Now this becomes a problem of search optimisation.    &#xD;
&#xD;
![enter image description here][2]&#xD;
&#xD;
&#xD;
Obtaining Data&#xD;
--------------&#xD;
&#xD;
This project uses 3D models from [SketchUp&amp;#039;s online repository][3] which are converted to COLLADA files using SketchUp.  The functions used are held in a package, accessible via [github][4] along with all the data referenced throughout.&#xD;
&#xD;
    (* load package and 3D model *)&#xD;
    &amp;lt;&amp;lt; &amp;#034;https://raw.githubusercontent.com/b-goodman/\&#xD;
    GeometricIntersections3D/master/GeometricIntersections3D.wl&amp;#034;;&#xD;
    &#xD;
    modelPath = &#xD;
      &amp;#034;https://raw.githubusercontent.com/b-goodman/\&#xD;
    GeometricIntersections3D/master/Demo/House/houseModel4.dae&amp;#034;;&#xD;
    &#xD;
    (* vertices of model&amp;#039;s polygons *)&#xD;
    polyPoints = Delete[0]@Import[modelPath, &amp;#034;PolygonObjects&amp;#034;];&#xD;
    &#xD;
    (* import model as region *)&#xD;
    modelRegion = Import[modelPath, &amp;#034;MeshRegion&amp;#034;];&#xD;
    &#xD;
    (* use region to generate minimal bounding volume *)&#xD;
    cuboidPartition = Delete[0]@BoundingRegion[modelRegion, &amp;#034;MinCuboid&amp;#034;];&#xD;
    &#xD;
    (* verify *)&#xD;
    Graphics3D[{&#xD;
      Polygon[polyPoints],&#xD;
      {Hue[0, 0, 0, 0], EdgeForm[Black], Cuboid[cuboidPartition]}&#xD;
      }, Boxed -&amp;gt; False]&#xD;
&#xD;
![imported model data][5]&#xD;
&#xD;
Generate a Bounding Volume Hierarchy (BVH)&#xD;
------------------------------------------&#xD;
&#xD;
Shadow mapping (and more generally collision testing) may be optimised via space partitioning achieved by dividing the 3D model&amp;#039;s space into a hierarchy of bounding volumes (BV) stored as a graph, thus forming a [bounding volume hierarchy][6].  The simplest case uses the result of an intersection between a ray and a single BV for the entire model to discard all rays which don&amp;#039;t come close to any of the model&amp;#039;s polygons.  Of course, those which do pass the first test must still be tested against the entire model so the initial BV is subdivided with each sub BV assigned to a particular part of the model hence reducing the total amount of polygons to be tested against.  The initial BV forms the root of the tree and it&amp;#039;s subdivisions (leaf boxes) are joined via edges.  We can add more levels to the tree by repeating the subdivision for each of the leaf boxes and ultimately refining the search for potential intersecting polygons.   &#xD;
&#xD;
    (* Begin tree.  Initial AABB is root.  Subdivide root AABB and link returns to root *) &#xD;
    newBVH[cuboidPartitions_,polyPoints_]:=Block[{&#xD;
    newLevel,edges&#xD;
    },&#xD;
    newLevel=Quiet[cullIntersectingPartitions[cuboidSubdivide[cuboidPartitions],polyPoints]];&#xD;
    edges=cuboidPartitions\[DirectedEdge]#&amp;amp;/@newLevel;&#xD;
    Return[&amp;lt;|&#xD;
    &amp;#034;Tree&amp;#034;-&amp;gt;TreeGraph[edges],&#xD;
    &amp;#034;PolygonObjects&amp;#034;-&amp;gt;polyPoints&#xD;
    |&amp;gt;];&#xD;
    ];&#xD;
&#xD;
    bvh = newBVH[{cuboidPartition}, polyPoints];&#xD;
    &#xD;
The BVH is a tree graph with the model&amp;#039;s polygon vertices encapsulated within an association&#xD;
&#xD;
    Keys[bvh]&#xD;
    &#xD;
    {&amp;#034;Tree&amp;#034;, &amp;#034;PolygonObjects&amp;#034;}&#xD;
    &#xD;
The BVH consists of a root box derived from the model&amp;#039;s minimal  bounding volume and it&amp;#039;s 8 sub-divisions &#xD;
&#xD;
    bvh[&amp;#034;Tree&amp;#034;]&#xD;
&#xD;
![enter image description here][7]&#xD;
&#xD;
The boxes at the lowest level of the BVH are the leaf boxes &#xD;
&#xD;
    leafBoxesLV1 = &#xD;
      Select[VertexList[bvh[&amp;#034;Tree&amp;#034;]], &#xD;
       VertexOutDegree[bvh[&amp;#034;Tree&amp;#034;], #] == 0 &amp;amp;];&#xD;
    &#xD;
    Graphics3D[{&#xD;
      Polygon[polyPoints],&#xD;
      {Hue[0, 0, 0, 0], EdgeForm[Black], Cuboid /@ leafBoxesLV1}&#xD;
      }, Boxed -&amp;gt; False]&#xD;
&#xD;
![enter image description here][8]&#xD;
&#xD;
Adding a new level sub-divides each leaf box into 8 sub-divisions. &#xD;
&#xD;
    With[{&#xD;
      testCuboid = {{0, 0, 0}, {10, 10, 10}}&#xD;
      },&#xD;
     Manipulate[&#xD;
      Graphics3D[{&#xD;
        If[n == 0, Cuboid[testCuboid], &#xD;
         Cuboid /@ Nest[cuboidSubdivide, testCuboid, n]]&#xD;
        }, Boxed -&amp;gt; False, Axes -&amp;gt; {True, False}],&#xD;
      {{n, 0}, 0, 4, 1}&#xD;
      ]&#xD;
     ]&#xD;
&#xD;
![enter image description here][9]&#xD;
&#xD;
The time needed for each addition to the BVH increases dramatically.&#xD;
&#xD;
    Length /@ NestList[cuboidSubdivide, {{{0, 0, 0}, {1, 1, 1}}}, 5]&#xD;
    &#xD;
     {1, 8, 64, 512, 4096, 32768}&#xD;
&#xD;
1-2 added levels is usually enough for the models used in this project.&#xD;
&#xD;
    (* Each new subdivision acts as root.  For each, subdivide further and remove any non-intersecting boxes.  Link back to parent box as directed edge *)&#xD;
    addLevelBVH[BVH_]:=Block[{&#xD;
    tree=BVH[&amp;#034;Tree&amp;#034;],polyPoints=BVH[&amp;#034;PolygonObjects&amp;#034;],returnEdges&#xD;
    },&#xD;
    Module[{&#xD;
    subEdges=Map[&#xD;
    Function[{levelComponent},levelComponent\[DirectedEdge]#&amp;amp;/@Quiet@cullIntersectingPartitions[cuboidSubdivide[levelComponent],polyPoints]],&#xD;
    Pick[VertexList[tree],VertexOutDegree[tree],0]]&#xD;
    },&#xD;
    returnEdges=ConstantArray[0,Length[subEdges]];&#xD;
    Do[returnEdges[[i]]=EdgeAdd[tree,subEdges[[i]]],{i,1,Length[subEdges],1}];&#xD;
    ];&#xD;
    returnEdges=DeleteDuplicates[Flatten[Join[EdgeList/@returnEdges]]];&#xD;
    Return[&amp;lt;|&#xD;
    &amp;#034;Tree&amp;#034;-&amp;gt;TreeGraph[returnEdges],&#xD;
    &amp;#034;PolygonObjects&amp;#034;-&amp;gt;polyPoints&#xD;
    |&amp;gt;]&#xD;
    ];&#xD;
&#xD;
 &#xD;
    bvh2 = addLevelBVH[bvh];&#xD;
    bvh2[&amp;#034;Tree&amp;#034;]&#xD;
&#xD;
![enter image description here][10]&#xD;
&#xD;
Any subs which don&amp;#039;t intersect with the model don&amp;#039;t contribute to the BVH and so are removed as part of the process.&#xD;
&#xD;
    cullIntersectingPartitions=Compile[{&#xD;
    {cuboidPartitions,_Real,3},&#xD;
    {polyPoints,_Real,3}&#xD;
    },&#xD;
    Select[cuboidPartitions,Function[{partitions},MemberQ[ParallelMap[Quiet@intersectTriangleBox[partitions,#]&amp;amp;,polyPoints],True]]],&#xD;
    CompilationTarget-&amp;gt;&amp;#034;C&amp;#034;&#xD;
    ];&#xD;
&#xD;
&#xD;
Visualising the leaf boxes shows that empty BVs are removed.  &#xD;
&#xD;
    leafBoxesLV2 = &#xD;
      Select[VertexList[bvh2[&amp;#034;Tree&amp;#034;]], &#xD;
       VertexOutDegree[bvh2[&amp;#034;Tree&amp;#034;], #] == 0 &amp;amp;];&#xD;
    &#xD;
    Graphics3D[{&#xD;
      Polygon[polyPoints],&#xD;
      {Hue[0, 0, 0, 0], EdgeForm[Black], Cuboid /@ leafBoxesLV2}&#xD;
      }, Boxed -&amp;gt; False]&#xD;
&#xD;
![enter image description here][11]&#xD;
&#xD;
Once  all levels are added, the BVH is finalised by linking each leaf box to its associated polygons.  This does not effect the tree structure as the link association is held seperate.&#xD;
&#xD;
    (*For each outermost subdivision (leaf box), find intersecting polygons.  Link to intersecting box via directed edge.  Append to graph *)&#xD;
    finalizeBVH[BVH_]:=Block[{&#xD;
    (* all leaf boxes for BVH *)&#xD;
    leafBoxes=Select[&#xD;
    VertexList[BVH[&amp;#034;Tree&amp;#034;]],&#xD;
    VertexOutDegree[BVH[&amp;#034;Tree&amp;#034;],#]==0&amp;amp;&#xD;
    ],&#xD;
    (* setup temp association *)&#xD;
    temp=&amp;lt;||&amp;gt;,&#xD;
    (* block varaibles *)&#xD;
    leafPolygons,&#xD;
    leafPolygonsEdges&#xD;
    },&#xD;
    (* For each BVH leaf box *)&#xD;
    Do[&#xD;
    (* 3.1. intersecitng polygons for specified BVH leaf box *)&#xD;
    leafPolygons=Select[&#xD;
    BVH[&amp;#034;PolygonObjects&amp;#034;],&#xD;
    Quiet@intersectTriangleBox[leafBoxes[[i]],#]==True&amp;amp;&#xD;
    ];&#xD;
    (* 3.2. associate each specified BVH leaf box to its intersecting polygon(s) *)&#xD;
    AppendTo[temp,leafBoxes[[i]]-&amp;gt;leafPolygons],&#xD;
    {i,1,Length[leafBoxes],1}&#xD;
    ];&#xD;
    Return[&amp;lt;|&#xD;
    &amp;#034;Tree&amp;#034;-&amp;gt;BVH[&amp;#034;Tree&amp;#034;],&#xD;
    &amp;#034;LeafObjects&amp;#034;-&amp;gt;temp,&#xD;
    &amp;#034;PolygonObjects&amp;#034;-&amp;gt;BVH[&amp;#034;PolygonObjects&amp;#034;]&#xD;
    |&amp;gt;]&#xD;
    ];&#xD;
&#xD;
    bvh2 = finalizeBVH[bvh2];&#xD;
&#xD;
While it only needs doing once, generating the BVH is often the longest part of the procedure so it&amp;#039;s a good idea to export it on completion.&#xD;
&#xD;
&#xD;
Generating The Scene&#xD;
--------------------&#xD;
&#xD;
The scene is an encapsulation of all data and parameters used for the ray caster.  It&amp;#039;s initially structured as: &#xD;
    &#xD;
    scene=&amp;lt;|&#xD;
    &amp;#034;BVH&amp;#034;-&amp;gt;BVHobj,                               -- (*The BVH previously generated*)&#xD;
    &amp;#034;SourcePositions&amp;#034;-&amp;gt;lightingPath,      -- (*The 3D position(s) of the light source*)&#xD;
    &amp;#034;FrameCount&amp;#034;-&amp;gt;frameCount,            -- (*A timestep for animation and a parameter if lightingPath is continuous*)&#xD;
    &amp;#034;Refinement&amp;#034;-&amp;gt;rayRefinement,        -- (*Ray density; smaller values give finer results.*)&#xD;
    &amp;#034;ProjectionPoints&amp;#034;-&amp;gt;planeSpec,       -- (*3D points forming surface(s) that shadow(s) are cast onto.*)&#xD;
    &amp;#034;FrameData&amp;#034;-&amp;gt;&amp;lt;||&amp;gt;                           -- (*Initially empty, data from the ray caster will be stored here.*)&#xD;
    |&amp;gt;&#xD;
&#xD;
&#xD;
Generating The Projection Surface&#xD;
-----------------------------&#xD;
&#xD;
The house should look like its casting it&amp;#039;s shadow onto the earth so we define a list of points which represent the discrete plane it stands on.  Each ray is a line drawn between each point on the projection surface and the position of the scene&amp;#039;s light source.&#xD;
&#xD;
    (* rayRefinement *)&#xD;
    ref = 20;&#xD;
    (* the height of the projection surface *)&#xD;
    planeZoffset = 0;&#xD;
    (* the discrete projection surface - each point is the origin of a \&#xD;
    ray *)&#xD;
    projectionPts = &#xD;
      Catenate[Table[{x, y, planeZoffset}, {x, -900, 1200, ref}, {y, -600,&#xD;
          1000, ref}]];&#xD;
    &#xD;
    Graphics3D[{&#xD;
      Polygon[polyPoints],&#xD;
      Cuboid /@ ({##, ## + {ref, ref, 0}} &amp;amp; /@ projectionPts)&#xD;
      }, Axes -&amp;gt; True, AxesLabel -&amp;gt; {&amp;#034;X&amp;#034;, &amp;#034;Y&amp;#034;, &amp;#034;Z&amp;#034;}, ImageSize -&amp;gt; Large]&#xD;
&#xD;
![enter image description here][12]&#xD;
&#xD;
&#xD;
Specifying A Light Source&#xD;
-------------------------&#xD;
&#xD;
The light source is typically a continuous BSplineFunction which is sampled according to the number of frames the user wants.  But it may also be a discrete list of 3D points too (in which case the number of frames is equal to the length of the list).&#xD;
&#xD;
Using a modification of  a `SunPosition` example in the documentation, a list of the 3D Cartesian positions of the sun between sunrise and sunset, with a time step 30 minutes, is produced.&#xD;
&#xD;
![enter image description here][13]&#xD;
&#xD;
    solarPositionPts0[location_:Here, date_:DateValue[Now,{&amp;#034;Year&amp;#034;,&amp;#034;Month&amp;#034;,&amp;#034;Day&amp;#034;}],tSpec_:{30,&amp;#034;Minute&amp;#034;}]:=&#xD;
    Evaluate[CoordinateTransformData[&amp;#034;Spherical&amp;#034;-&amp;gt;&amp;#034;Cartesian&amp;#034;,&amp;#034;Mapping&amp;#034;,{1,\[Pi]/2-(#2 Degree),2Pi-(#1 Degree)}]]&amp;amp;@@@(Function[{series},Map[QuantityMagnitude,series[&amp;#034;Values&amp;#034;],{2}]]@SunPosition[location,DateRange[Sunrise[#],Sunset[#],tSpec]&amp;amp;[DateObject[date]]])&#xD;
&#xD;
    solarPositionPts[Here, DateObject[{2017, 6, 1}], {30, &amp;#034;Minute&amp;#034;}]&#xD;
    &#xD;
    {{0.4700, -0.88253, -0.0155}, {0.4026, -0.91178, 0.0809},...,{0.4219, 0.90493, 0.0554}}&#xD;
&#xD;
&#xD;
It&amp;#039;s easier to rotate the sun&amp;#039;s path rather than the model and projection plane.  Different transforms may also be applied to best-fit the path into the scene.&#xD;
&#xD;
    solarXoffset = 0;&#xD;
    solarYoffset = 0;&#xD;
    solarZoffset = 0;&#xD;
    zRotation = \[Pi]/3.5;&#xD;
    scale = 1300;&#xD;
    &#xD;
    sourceSpec = &#xD;
      RotationTransform[zRotation, {0, 0, 1}][&#xD;
        # + {solarXoffset, solarYoffset, solarZoffset} &amp;amp; /@ (solarPositionPts[Here, DateObject[{2017, 6, 1}], {30, &amp;#034;Minute&amp;#034;}] scale)&#xD;
      ];&#xD;
    &#xD;
    lightingPath = BSplineCurve[sourceSpec];&#xD;
&#xD;
&#xD;
&#xD;
Specify A Frame Count&#xD;
---------------------&#xD;
&#xD;
A frame count must be specified to discretize the light path into 3D points.  Each of these points forms the end of each ray.&#xD;
If the light source is a discrete list, then its length is used to infer the frame count instead and does not need specifying by the user.&#xD;
&#xD;
    frameCount = 30;&#xD;
&#xD;
&#xD;
Constructing The Scene&#xD;
----------------------&#xD;
&#xD;
Now we can preview the scene&#xD;
&#xD;
    Graphics3D[{&#xD;
      Polygon[polyPoints],&#xD;
      Cuboid /@ ({##, ## + {ref, ref, 0}} &amp;amp; /@ projectionPts),&#xD;
      lightingPath,&#xD;
      {Darker@Yellow, PointSize[0.03], &#xD;
       Point[BSplineFunction[sourceSpec] /@ Range[0, 1, N[1/frameCount]]]}&#xD;
      }, Axes -&amp;gt; True, AxesLabel -&amp;gt; {&amp;#034;X&amp;#034;, &amp;#034;Y&amp;#034;, &amp;#034;Z&amp;#034;}, ImageSize -&amp;gt; Large]&#xD;
&#xD;
![enter image description here][14]&#xD;
&#xD;
 All paramaters have been set, it&amp;#039;s time to construct the scene.  Specifying a continuous lighting path must be done using a `BSPlineCurve`.&#xD;
&#xD;
    scene = newScene[bvh2, lightingPath, frameCount, ref, projectionPts]&#xD;
&#xD;
![enter image description here][15]&#xD;
&#xD;
&#xD;
&#xD;
Processing A Scene For Shadow Mapping&#xD;
-------------------------------------&#xD;
&#xD;
The BVH optimises the ray caster by reducing the number of polygons to search against for an intersection.  If the ray intersects with the BVH root box then a breadth-first search along the BVH tree is initiated.  Starting with the root box,the out-components are selected by their intersection with a ray and are used as roots for the search&amp;#039;s next level.&#xD;
&#xD;
    (* select peripheral out-components of root box that intersect with ray *)&#xD;
    intersectingSubBoxes[BVHObj_,initialVertex_,rayOrigin_,raySource_]:=Select[Rest[VertexOutComponent[BVHObj[&amp;#034;Tree&amp;#034;],{initialVertex},1]],intersectRayBox[#,rayOrigin,raySource]==True&amp;amp;];&#xD;
&#xD;
    (* for root box intersecting rays, find which leaf box(es) intersect with ray *)&#xD;
    BVHLeafBoxIntersection[BVHObj_,rayInt_,rayDest_]:=Block[{v0},&#xD;
    (*initialize search *)v0=intersectingSubBoxes[BVHObj,VertexList[BVHObj[&amp;#034;Tree&amp;#034;]][[1]],rayInt,rayDest];&#xD;
    (* breadth search *)&#xD;
    If[v0=={},Return[v0],&#xD;
    While[&#xD;
    (* check that vertex isn&amp;#039;t a polygon - true if !0.  Check that intersection isn&amp;#039;t empty *)&#xD;
    AllTrue[VertexOutDegree[BVHObj[&amp;#034;Tree&amp;#034;],#]&amp;amp;/@v0,#=!=0&amp;amp;],&#xD;
    v0=Flatten[intersectingSubBoxes[BVHObj,#,rayInt,rayDest]&amp;amp;/@v0,1];&#xD;
    If[v0==={},Break[]]&#xD;
    ];&#xD;
    Return[v0];&#xD;
    ]&#xD;
    ];&#xD;
    &#xD;
&#xD;
The code below generates a visualisation of this process using the input data from the scene generated.&#xD;
&#xD;
    raySource = scene[&amp;#034;ProjectionPoints&amp;#034;][[3700]];&#xD;
    rayDestination = scene[&amp;#034;FrameData&amp;#034;][16][&amp;#034;SourcePosition&amp;#034;];&#xD;
    &#xD;
    lv1Intersection = &#xD;
      BVHLeafBoxIntersection[bvh, raySource, rayDestination];&#xD;
    lv2Intersection = &#xD;
      BVHLeafBoxIntersection[bvh2, raySource, rayDestination];&#xD;
    &#xD;
    lv1Subgraph = &#xD;
      Subgraph[Graph[EdgeList[bvh2[&amp;#034;Tree&amp;#034;]]], &#xD;
       First[VertexList[bvh2[&amp;#034;Tree&amp;#034;]]] \[DirectedEdge] # &amp;amp; /@ &#xD;
        lv1Intersection];&#xD;
    lv2Subgraphs = Subgraph[Graph[EdgeList[bvh2[&amp;#034;Tree&amp;#034;]]], Flatten[Table[&#xD;
         lv1Intersection[[&#xD;
             i]] \[DirectedEdge] # &amp;amp; /@ (Intersection[#, &#xD;
               lv2Intersection] &amp;amp; /@ ((Rest@&#xD;
                  VertexOutComponent[bvh2[&amp;#034;Tree&amp;#034;], #] &amp;amp; /@ &#xD;
                lv1Intersection)))[[i]],&#xD;
         {i, 1, Length[lv1Intersection], 1}&#xD;
         ], 1]];&#xD;
    lbl = ((#[[1]] -&amp;gt; #[[2]]) &amp;amp; /@ (Transpose[{lv2Intersection, &#xD;
           ToString /@ Range[Length[lv2Intersection]]}]));&#xD;
    edgeStyle = Join[&#xD;
       ReleaseHold@&#xD;
        Thread[(# -&amp;gt; HoldForm@{Thick, Blue}) &amp;amp;[EdgeList[lv2Subgraphs]]],&#xD;
       ReleaseHold@&#xD;
        Thread[(# -&amp;gt; HoldForm@{Thick, Red}) &amp;amp;[EdgeList[lv1Subgraph]]]&#xD;
       ];&#xD;
    &#xD;
    rayBVHTraversal = Graph[EdgeList[bvh2[&amp;#034;Tree&amp;#034;]], EdgeStyle -&amp;gt; edgeStyle,&#xD;
       VertexLabels -&amp;gt; lbl,&#xD;
       GraphHighlight -&amp;gt; lv2Intersection,&#xD;
       ImageSize -&amp;gt; Medium];&#xD;
    &#xD;
    rayModelIntersection = Graphics3D[{&#xD;
        {Green, Thickness[0.01], &#xD;
         Line[{raySource, rayDestination - {220, -400, 400}}]},&#xD;
        {Hue[0, 0, 0, 0], EdgeForm[{Thick, Red}], &#xD;
         Cuboid /@ lv1Intersection},&#xD;
        {Hue[.6, 1, 1, .3], EdgeForm[{Thick, Blue}], &#xD;
         Cuboid /@ lv2Intersection},&#xD;
        {Opacity[0.5], Polygon[polyPoints]},&#xD;
        Inset @@@ &#xD;
         Transpose[{ToString /@ Range[Length[lv2Intersection]], &#xD;
           RegionCentroid /@ Cuboid @@@ lv2Intersection}]&#xD;
        }];&#xD;
    &#xD;
    Column[{&#xD;
      Row[&#xD;
       Show[rayModelIntersection, ViewPoint -&amp;gt; #, Boxed -&amp;gt; False, &#xD;
          ImageSize -&amp;gt; Medium] &amp;amp; /@ {{-\[Infinity], 0, &#xD;
          0}, {0, -\[Infinity], 0}}&#xD;
       ],&#xD;
      rayBVHTraversal&#xD;
      }]&#xD;
&#xD;
![enter image description here][17]&#xD;
&#xD;
At the centre of the graph lies the vertex representing the root BV where all searches originate from.  The search continues out form all vertices which have intersected with the ray.&#xD;
&#xD;
&#xD;
    (* test intersection between ray and object polygon via BVH search *)&#xD;
    intersectionRayBVH[BVHObj_,rayOrigin_,rayDest_]:=With[{&#xD;
    intersectionLeafBoxes=BVHLeafBoxIntersection[BVHObj,rayOrigin,rayDest]&#xD;
    },&#xD;
    Block[{i},If[intersectionLeafBoxes=!={},&#xD;
    Return[Catch[For[i=1,i&amp;lt;Length[#],i++,&#xD;
    Function[{thowQ},If[thowQ,Throw[thowQ]]][intersectRayTriangle[#[[1]],#[[2]],#[[3]],rayOrigin,rayDest]&amp;amp;@#[[i]]]&#xD;
    ]&amp;amp;[DeleteDuplicates[Flatten[Lookup[BVHObj[&amp;#034;LeafObjects&amp;#034;],intersectionLeafBoxes],1]]]]===True],&#xD;
    Return[False]&#xD;
    ]]&#xD;
    ];&#xD;
&#xD;
Once the tree has been fully searched, the remaining boxes are used to lookup their associated polygons.  Since the same polygon may intersect more than one box, any duplicates are deleted.  A line-triangle intersection test is iteratively applied over the resultant list, breaking at the first instance of a True return.  This ray has now been found to intersect a part of the 3D model thus its origin point (from the `projectionPts` list) will represent a single point of shadow on the projection surface.  This point is stored in a list which will be used to draw the shadow for a single frame.  &#xD;
&#xD;
    candidatePolys = DeleteDuplicates[Flatten[Lookup[&#xD;
         bvh2[&amp;#034;LeafObjects&amp;#034;],&#xD;
         BVHLeafBoxIntersection[bvh2, raySource, rayDestination]&#xD;
         ], 1]];&#xD;
    &#xD;
    intersectingPolys = &#xD;
      Select[candidatePolys,PrimitiveIntersectionQ3D[Line[{raySource, rayDestination}],Triangle[#]] &amp;amp;];&#xD;
    &#xD;
    rayModelIntersectionPolys = Graphics3D[{&#xD;
        {Green, Thickness[0.01], &#xD;
         Line[{raySource, rayDestination - {220, -400, 400}}]},&#xD;
        {Hue[1, 1, 1, .5], EdgeForm[Black], Polygon[candidatePolys]},&#xD;
        {Hue[0.3, 1, 1, .5], Polygon[intersectingPolys]}&#xD;
        }, Boxed -&amp;gt; False];&#xD;
    &#xD;
    Row[Show[rayModelIntersectionPolys, ViewPoint -&amp;gt; #, ImageSize -&amp;gt; Medium] &amp;amp; /@ {{0, 0, \[Infinity]}, {0, \[Infinity], 0}}]&#xD;
&#xD;
Highlighted in green, the ray has been found to intersect with 2 polygons.&#xD;
&#xD;
![enter image description here][18]&#xD;
&#xD;
The BVH search is performed for each ray, for each frame.&#xD;
&#xD;
A scene is the input for the ray caster.  If a scene is to be re-processed with different parameters then a new scene must be made.&#xD;
The output of the ray caster is held within a scene object.  The data for each frame is associated to its frame index and is all held in the scene&amp;#039;s &amp;#034;FrameData&amp;#034; field.&#xD;
&#xD;
Begin processing.  A status bar will indicate progress in terms of frames rendered.&#xD;
&#xD;
    scene = renderScene[scene];&#xD;
&#xD;
it&amp;#039;s best to save any progress by exporting afterwards.&#xD;
&#xD;
    Export[&amp;#034;House_scene.txt&amp;#034;, Compress[scene]]&#xD;
&#xD;
&#xD;
Reviewing Processed Scenes&#xD;
--------------------------&#xD;
&#xD;
Each frame holds the shadow and ground data separately and have been expressed as zero-thickness cuboids (tiles) and each with side length equal to the `rayRefinement` parameter (recall that smaller values yield finer results).&#xD;
&#xD;
Individual frames are accessed by their frame index.  This examines frame 10.&#xD;
&#xD;
    Keys[scene[&amp;#034;FrameData&amp;#034;][10]]&#xD;
    &#xD;
    {&amp;#034;ShadowPts&amp;#034;, &amp;#034;SourcePosition&amp;#034;, &amp;#034;GroundPts&amp;#034;}&#xD;
&#xD;
&#xD;
Accessing the processed scene&amp;#039;s &amp;#034;FrameData&amp;#034; field allows a single specified frame to be drawn in Graphics3D.&#xD;
&#xD;
    Graphics3D[{&#xD;
      Polygon[scene[&amp;#034;BVH&amp;#034;][&amp;#034;PolygonObjects&amp;#034;]],&#xD;
      {GrayLevel[0.3], EdgeForm[], &#xD;
       Cuboid /@ scene[&amp;#034;FrameData&amp;#034;][10][&amp;#034;ShadowPts&amp;#034;]},&#xD;
      {EdgeForm[], Cuboid /@ scene[&amp;#034;FrameData&amp;#034;][10][&amp;#034;GroundPts&amp;#034;]},&#xD;
      {Darker@Yellow, PointSize[0.04], &#xD;
       Point[scene[&amp;#034;FrameData&amp;#034;][10][&amp;#034;SourcePosition&amp;#034;]]}&#xD;
      }, Boxed -&amp;gt; False, Background -&amp;gt; LightBlue]&#xD;
&#xD;
![enter image description here][23]&#xD;
&#xD;
&#xD;
`viewSceneFrame` does the task above for any processed scene and specified frame.  It inherits Graphics3D options as well as custom ones affecting the scene elements (shadow and ground style, toggle source drawing and gridlines).&#xD;
&#xD;
    viewSceneFrame[scene, 10, DrawGrid -&amp;gt; False, ShadowColor -&amp;gt; GrayLevel[0.3], SurfaceColor -&amp;gt; Lighter@Orange,  DrawSource -&amp;gt; True, Boxed -&amp;gt; False, Background -&amp;gt; LightBlue]&#xD;
&#xD;
![enter image description here][24]&#xD;
&#xD;
    Show[viewSceneFrame[scene, 10, DrawGrid -&amp;gt; False, &#xD;
      ShadowColor -&amp;gt; GrayLevel[0.3], SurfaceColor -&amp;gt; Lighter@Orange, &#xD;
      DrawSource -&amp;gt; True, Boxed -&amp;gt; False, Background -&amp;gt; LightBlue], &#xD;
     ViewPoint -&amp;gt; {0, 0, \[Infinity]}]&#xD;
&#xD;
![enter image description here][25]&#xD;
&#xD;
&#xD;
    sceneBounds = Join[&#xD;
       Most[MinMax /@ Transpose[scene[&amp;#034;ProjectionPoints&amp;#034;]]],&#xD;
       {MinMax[&#xD;
         Last /@ Values[scene[&amp;#034;FrameData&amp;#034;][[All, &amp;#034;SourcePosition&amp;#034;]]]]}&#xD;
       ];&#xD;
    viewSceneFrame[scene, 10, DrawGrid -&amp;gt; False, &#xD;
     ShadowColor -&amp;gt; GrayLevel[0.3], SurfaceColor -&amp;gt; Lighter@Orange, &#xD;
     DrawSource -&amp;gt; True, Boxed -&amp;gt; False, Background -&amp;gt; LightBlue, &#xD;
     Axes -&amp;gt; True, AxesLabel -&amp;gt; {&amp;#034;X&amp;#034;, &amp;#034;Y&amp;#034;, &amp;#034;Z&amp;#034;}, PlotRange -&amp;gt; sceneBounds]&#xD;
&#xD;
![enter image description here][26]&#xD;
&#xD;
&#xD;
Retaining the same options, the scene may also be animated.  To ensure a smooth playback, each frame is exported as .gif into `$TemporaryDirectory`, imported back as a list and animated.  The animation is also exported for future use.&#xD;
&#xD;
    animateScene[scene,&#xD;
     DrawGrid -&amp;gt; False,&#xD;
     ShadowColor -&amp;gt; GrayLevel[0.3],&#xD;
     SurfaceColor -&amp;gt; Lighter@Orange,&#xD;
     DrawSource -&amp;gt; True,&#xD;
     Boxed -&amp;gt; False,&#xD;
     Background -&amp;gt; LightBlue,&#xD;
     PlotRange -&amp;gt; sceneBounds,&#xD;
     ImageSize -&amp;gt; {{800}, {600}}&#xD;
     ]&#xD;
&#xD;
![enter image description here][27]&#xD;
&#xD;
&#xD;
We can also plot the cumulative solar exposure.&#xD;
&#xD;
All points from the projection plane which don&amp;#039;t intersect with the model (i.e, aren&amp;#039;t shadow points) are extracted from the scene&amp;#039;s frames&#xD;
&#xD;
    exposure = Values[scene[&amp;#034;FrameData&amp;#034;][[All, &amp;#034;GroundPts&amp;#034;]]]&#xD;
&#xD;
![enter image description here][28]&#xD;
&#xD;
&#xD;
&#xD;
The occurrences of each exposure point is tallied&#xD;
&#xD;
    tally = Tally[Flatten[exposure, 1]]&#xD;
&#xD;
![enter image description here][29]&#xD;
&#xD;
&#xD;
And the range of frequencies from which is generated&#xD;
&#xD;
    tallyRange = &#xD;
     Range @@ Insert[MinMax[Last /@ SortBy[tally, Last]], 1, -1]&#xD;
    &#xD;
    {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, \&#xD;
    20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30}&#xD;
&#xD;
&#xD;
A color scale corresponding to the range of frequencies from above will be used to colorize the plot&#xD;
&#xD;
    colorScale = &#xD;
     ColorData[&amp;#034;SolarColors&amp;#034;, &amp;#034;ColorFunction&amp;#034;] /@ Rescale[tallyRange]&#xD;
&#xD;
![enter image description here][30]&#xD;
&#xD;
&#xD;
Replacement rules are used to replace each exposure point&amp;#039;s frequency with it&amp;#039;s corresponding color&#xD;
&#xD;
    colorScaleRules = Thread @@ {tallyRange -&amp;gt; colorScale}&#xD;
&#xD;
![enter image description here][31]&#xD;
&#xD;
&#xD;
The resultant exposure map is a list of tiles, each coloured according to it&amp;#039;s positional frequency.&#xD;
&#xD;
    heatMap = &#xD;
     Insert[MapAt[Cuboid, &#xD;
         Reverse@MapAt[Replace[colorScaleRules], #, -1], -1], EdgeForm[], &#xD;
        2] &amp;amp; /@ tally&#xD;
&#xD;
![enter image description here][32]&#xD;
&#xD;
Finally, the map is drawn.  It&amp;#039;s still a `Graphics3D` object so it may be rotated and viewed from any angle.&#xD;
&#xD;
    Row[{&#xD;
      Show[Graphics3D[{&#xD;
         {Opacity[0.3], Green, Polygon[scene[&amp;#034;BVH&amp;#034;][&amp;#034;PolygonObjects&amp;#034;]]},&#xD;
         heatMap&#xD;
         }, Boxed -&amp;gt; False, ImageSize -&amp;gt; Large], ViewPoint -&amp;gt; Above],&#xD;
      BarLegend[{&amp;#034;SolarColors&amp;#034;, MinMax[tallyRange]}]&#xD;
      }]&#xD;
&#xD;
![enter image description here][33]&#xD;
&#xD;
The process of generating an exposure map forms a function within the `GeometricIntersections3D` package.  &#xD;
Alternative color schemes may also be specified.&#xD;
&#xD;
    sceneExposureMap[scene, &amp;#034;TemperatureMap&amp;#034;]&#xD;
&#xD;
![enter image description here][34]&#xD;
&#xD;
&#xD;
The bar scale for the exposure plot measures duration in frames but a time scale may be recovered.&#xD;
Given that the solar path used to light the scene lasts about 14 hours and the scene was rendered for 30 frames, that gives about 30 minutes per frame.&#xD;
&#xD;
    dailySunHours = &#xD;
     UnitConvert[DateDifference[Sunrise[], Sunset[]], &#xD;
      MixedRadix[&amp;#034;Hours&amp;#034;, &amp;#034;Minutes&amp;#034;, &amp;#034;Seconds&amp;#034;]]&#xD;
&#xD;
![enter image description here][35]&#xD;
&#xD;
&#xD;
    dailySunHours/30&#xD;
&#xD;
![enter image description here][36]&#xD;
&#xD;
&#xD;
&#xD;
&#xD;
&#xD;
&#xD;
&#xD;
&#xD;
This has been a very rewarding project with some exciting potentials beyond computer graphics.  Indeed, much optimisations can be made to the intersections package.  &#xD;
The different methods of space partitioning for BVH construction should be investigated as the one currently employed is rather rudimentary.&#xD;
Anti-aliasing methods to be investigated also.&#xD;
&#xD;
Both the House and Sundial processes are documented in the notebooks attached.  All necessary data may also be downloaded to save time.&#xD;
&#xD;
&#xD;
&#xD;
&#xD;
 &#xD;
&#xD;
&#xD;
  [1]: https://en.wikipedia.org/wiki/Shadow_mapping&#xD;
  [2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=animation.gif&amp;amp;userId=605083&#xD;
  [3]: https://3dwarehouse.sketchup.com/&#xD;
  [4]: https://github.com/b-goodman/GeometricIntersections3D&#xD;
  [5]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Process_House_Import.png&amp;amp;userId=605083&#xD;
  [6]: https://en.wikipedia.org/wiki/Bounding_volume_hierarchy&#xD;
  [7]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Process_House_TreeLV1.png&amp;amp;userId=605083&#xD;
  [8]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Process_House_leafBoxesLV1.png&amp;amp;userId=605083&#xD;
  [9]: http://community.wolfram.com//c/portal/getImageAttachment?filename=cuboidSubdivide.gif&amp;amp;userId=605083&#xD;
  [10]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Process_House_TreeLV2.png&amp;amp;userId=605083&#xD;
  [11]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Process_House_leafBoxesLV2.png&amp;amp;userId=605083&#xD;
  [12]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Process_House_projectionPoints.png&amp;amp;userId=605083&#xD;
  [13]: http://community.wolfram.com//c/portal/getImageAttachment?filename=solarPosition.PNG&amp;amp;userId=605083&#xD;
  [14]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Process_House_scenePreview.png&amp;amp;userId=605083&#xD;
  [15]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Process_House_sceneConstructor.png&amp;amp;userId=605083&#xD;
  [16]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Process_House_projectionPoints.png&amp;amp;userId=605083&#xD;
  [17]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Process_House_raySearch.png&amp;amp;userId=605083&#xD;
  [18]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Process_House_rayIntersection.png&amp;amp;userId=605083&#xD;
  [19]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Process_House_projectionPoints.png&amp;amp;userId=605083&#xD;
  [20]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Process_House_projectionPoints.png&amp;amp;userId=605083&#xD;
  [21]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Process_House_projectionPoints.png&amp;amp;userId=605083&#xD;
  [22]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Process_House_projectionPoints.png&amp;amp;userId=605083&#xD;
  [23]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Process_House_singleFrame_1.png&amp;amp;userId=605083&#xD;
  [24]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Process_House_singleFrame_2.png&amp;amp;userId=605083&#xD;
  [25]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Process_House_singleFrame_3.png&amp;amp;userId=605083&#xD;
  [26]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Process_House_singleFrame_4.png&amp;amp;userId=605083&#xD;
  [27]: http://community.wolfram.com//c/portal/getImageAttachment?filename=animation_House.gif&amp;amp;userId=605083&#xD;
  [28]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Process_House_exposureStep_A.png&amp;amp;userId=605083&#xD;
  [29]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Process_House_exposureStep_B.png&amp;amp;userId=605083&#xD;
  [30]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Process_House_exposureStep_C.png&amp;amp;userId=605083&#xD;
  [31]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Process_House_exposureStep_D.png&amp;amp;userId=605083&#xD;
  [32]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Process_House_exposureStep_E.png&amp;amp;userId=605083&#xD;
  [33]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Process_House_solarMap_A.png&amp;amp;userId=605083&#xD;
  [34]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Process_House_solarMap_B.png&amp;amp;userId=605083&#xD;
  [35]: http://community.wolfram.com//c/portal/getImageAttachment?filename=sunHours.png&amp;amp;userId=605083&#xD;
  [36]: http://community.wolfram.com//c/portal/getImageAttachment?filename=sunHoursPerFrame.png&amp;amp;userId=605083</description>
    <dc:creator>Benjamin Goodman</dc:creator>
    <dc:date>2017-06-01T07:01:10Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/560469">
    <title>IGraph/M: graph theory and network analysis with Mathematica</title>
    <link>https://community.wolfram.com/groups/-/m/t/560469</link>
    <description>*WOLFRAM MATERIALS for the ARTICLE:*&#xD;
&amp;gt; Szabolcs Horvát, Jakub Podkalicki, Gábor Csárdi, Tamás Nepusz, Vincent Traag, Fabio Zanini, Daniel Noom, (2022).&#xD;
&#xD;
&amp;gt; *IGraph/M: graph theory and network analysis for Mathematica*.&#xD;
&#xD;
&amp;gt; arXiv:2209.09145 **[physics.soc-ph]**.&#xD;
&#xD;
&amp;gt; https://doi.org/10.48550/arXiv.2209.09145&#xD;
&#xD;
&#xD;
[![Discourse topics](https://img.shields.io/discourse/topics?color=limegreen&amp;amp;server=https%3A%2F%2Figraph.discourse.group)](https://igraph.discourse.group)&#xD;
[![GitHub (pre-)release](https://img.shields.io/github/release/szhorvat/IGraphM/all.svg)](https://github.com/szhorvat/IGraphM/releases)&#xD;
[![Contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)](https://github.com/szhorvat/IGraphM#contributions)&#xD;
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1134932.svg)](https://doi.org/10.5281/zenodo.1134932)&#xD;
&#xD;
----&#xD;
&#xD;
##Article abstract&#xD;
&#xD;
IGraph/M is an efficient general purpose graph theory and network analysis package for Mathematica. IGraph/M serves as the Wolfram Language interfaces to the igraph C library, and also provides several unique pieces of functionality not yet present in igraph, but made possible by combining its capabilities with Mathematica&amp;#039;s. The package is designed to support both graph theoretical research as well as the analysis of large-scale empirical networks.&#xD;
&#xD;
----&#xD;
&#xD;
##Introduction&#xD;
&#xD;
The post below was written for the original release of IGraph/M. The package has come a long way since then and now contains ~300 functions. See http://szhorvat.net/mathematica/IGraphM for more details on the current release.&#xD;
&#xD;
Compatibility: 64-it Windows/macOS/Linux or Raspberry Pi; Mathematica &amp;lt;del&amp;gt;10.0&amp;lt;/del&amp;gt; 11.0 or later.&#xD;
&#xD;
&amp;lt;a href=&amp;#034;http://szhorvat.net/mathematica/IGraphM&amp;#034;&amp;gt;&amp;lt;img src=&amp;#034;https://community.wolfram.com//c/portal/getImageAttachment?filename=IGraphM-ad-3.png&amp;amp;userId=38370&amp;#034; width=&amp;#034;300&amp;#034;&amp;gt;&amp;lt;/a&amp;gt;&#xD;
&#xD;
----&#xD;
&#xD;
I would like to announce IGraph/M, a new igraph interface for Mathematica: http://szhorvat.net/mathematica/IGraphM&#xD;
&#xD;
[igraph](http://igraph.org/) is a graph manipulation and analysis package.  IGraph/M makes its functionality available from Mathematica.&#xD;
&#xD;
This initial release, version 0.1, covers only some igraph functions, as I focused on the things that I need personally.  However the main framework is complete, and new functions can be added quickly.  If anyone would like to contribute, please contact me.&#xD;
&#xD;
Binary packages for OS X (10.9 or later) and Linux can be downloaded [from GitHub](https://github.com/szhorvat/IGraphM/releases).  Unfortunately, I was unable to compile the development version of igraph for Windows, so I cannot provide a Windows version. If you can help with compiling igraph itself (not IGraph/M) on Windows, please let me know!&#xD;
&#xD;
Functionality in this release that is not built into Mathematica:&#xD;
&#xD;
 * Vertex betweenness centrality for weighted graphs&#xD;
 * Estimates of vertex betweenness, edge betweenness and closeness centrality; for large graphs&#xD;
 * Minimum feedback arc set for weighted and unweighted graphs&#xD;
 * Find all cliques (not just maximal ones)&#xD;
 * Count 3- and 4-motifs&#xD;
 * Rewire edges, keeping either the density or the degree sequence&#xD;
 * Alternative algorithms for isomorphism testing: Bliss, VF2&#xD;
 * Subgraph isomorphism&#xD;
 * Test if a degree sequence is graphical&#xD;
 * Alternative algorithms for generating random graphs with given degree sequence&#xD;
 * Layout algorithms that take weights into account&#xD;
&#xD;
Note that IGraph/M is *not a replacement* for Mathematica&amp;#039;s graphs and networks functionality.  It is meant to complement what is already available in Mathematica, thus it primarily focuses on adding functionality that is not already present.&#xD;
&#xD;
Why did I release the package before covering most of the igraph functionality?  I do not have time to work on things I do not personally need or use, so I am unlikely to extend it further unless the need comes up.  I do think that the functions that are included in v0.1 can already be useful to others too.  I would also like to give the opportunity for people to contribute to the project if they wish to.  The groundwork has been laid, so further extensions should be quick and relatively easy.&#xD;
&#xD;
Also check out a related project, [IGraphR](https://github.com/szhorvat/IGraphR), which makes igraph available for Mathematica users through RLink.  I wrote IGraph/M because I needed higher performance and greater reliability (especially for parallel computing) than what RLink could provide.&#xD;
&#xD;
----&#xD;
&#xD;
**A request:** If any of you have used IGraphR in the past to access igraph from Mathematica, please post a response to this thread and let me know which specific functions you were using.&#xD;
&#xD;
&amp;amp;[Wolfram Notebook][1]&#xD;
&#xD;
&#xD;
  [1]: https://www.wolframcloud.com/obj/94639221-60b4-47e3-8862-d996caa40388</description>
    <dc:creator>Szabolcs Horvát</dc:creator>
    <dc:date>2015-09-06T12:55:14Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/2983903">
    <title>Solving Sudoku puzzles with Graph Theory</title>
    <link>https://community.wolfram.com/groups/-/m/t/2983903</link>
    <description>![enter image description here][1]&#xD;
&#xD;
&amp;amp;[Wolfram Notebook][2]&#xD;
&#xD;
&#xD;
  [1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=SudokuBlog-heroimage.png&amp;amp;userId=2028758&#xD;
  [2]: https://www.wolframcloud.com/obj/b9ea0b6a-1200-4c69-bd69-1e27edaa0a1b</description>
    <dc:creator>Alejandra Ortiz Duran</dc:creator>
    <dc:date>2023-08-04T23:54:58Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/943673">
    <title>Wikipedia Knowledge: Everything leads to Philosophy</title>
    <link>https://community.wolfram.com/groups/-/m/t/943673</link>
    <description>Some time ago I saw a beautiful BBC documentary presented by an outstanding presenter, [Hannah Fry][1], on &amp;#034;[The Joy of Data][2]&amp;#034;. She discussed a fascinating observation: If you start at a random wikipedia page, click on the first link in the main body of the article and then iterate, you will (with a probability of over 95%) end up at the [Wikipedia article on Philosophy][3]. There is a [wiki article that explains the phenomenon][4]; it also contains a link to an [online tool to check this observation][5] for a small number of starting pages. I think that one of the best descriptions of this phenomenon are in this [short clip from Hannah Fry&amp;#039;s program][6]. &#xD;
&#xD;
Now, in this post I will show how to write a very crude crawler to generate networks like this:&#xD;
&#xD;
![enter image description here][7]&#xD;
&#xD;
In a certain sense this post is in a similar spirit to a post by [@Sander Huisman][at0] on [Roads to Lyon][8] and another one by [@Bernat Espigulé Pons][at1] on the [Roads to Rome][9]. There is this article on [Letter Frequencies in Wikipedia][10] by [@Vitaliy Kaurov][at2] that animated me to write this post up now. Wikipedia is very special. It is fluid, keeps changing all the time and is a community effort that grows. &#xD;
&#xD;
First, primitive crawler&#xD;
------------------------&#xD;
&#xD;
The first thing we need to do is find the first link in each article. The Wolfram Language has Wikipedia data right built in, but I did not quite see a way of extracting the first link of the main body of the article. In&#xD;
&#xD;
    WikipediaData[&amp;#034;Scotland&amp;#034;, &amp;#034;LinksRules&amp;#034;]&#xD;
&#xD;
the links are ordered alphabetically and therefore do not solve your problem. &#xD;
&#xD;
A first example&#xD;
---------------&#xD;
&#xD;
Using a lit of (quite ugly) parsing and the powerful NestList we can get a sequence of links:&#xD;
&#xD;
    NestList[(Select[Table[Quiet[(&amp;#034;https://en.wikipedia.org/wiki&amp;#034; &amp;lt;&amp;gt; StringSplit[StringSplit[StringSplit[#, &amp;#034;&amp;lt;p&amp;gt;&amp;#034;][[k]], &amp;#034;&amp;lt;a href=\&amp;#034;/wiki&amp;#034;][[2]], &amp;#034;\&amp;#034;&amp;#034;][[1]])], {k, 2, 10}], &#xD;
    StringQ[#] &amp;amp;][[1]] &amp;amp;@ Import[#, &amp;#034;Source&amp;#034;]) &amp;amp;, &amp;#034;https://en.wikipedia.org/wiki/Germany&amp;#034;, 30]&#xD;
&#xD;
Here we start at the article for Germany and &amp;#034;walk&amp;#034; for 30 steps. Here&amp;#039;s the result:&#xD;
&#xD;
![enter image description here][11]&#xD;
&#xD;
You actually see that we reach the article on Philosophy then move away and come back to it. So we end up at a sort of loop. Another problem is that we do not know for how long we have to walk before getting there (or not getting there?). We should rather use this function&#xD;
&#xD;
    startGermany = &#xD;
     NestWhileList[(Select[Table[Quiet[(&amp;#034;https://en.wikipedia.org/wiki&amp;#034; &amp;lt;&amp;gt; StringSplit[StringSplit[StringSplit[#, &amp;#034;&amp;lt;p&amp;gt;&amp;#034;][[k]], &amp;#034;&amp;lt;a href=\&amp;#034;/wiki&amp;#034;][[2]], &amp;#034;\&amp;#034;&amp;#034;][[1]])], {k, 2, 10}], StringQ[#] &amp;amp;][[1]] &amp;amp;@Import[#, &amp;#034;Source&amp;#034;]) &amp;amp;, &amp;#034;https://en.wikipedia.org/wiki/Germany&amp;#034;, UnsameQ, All]&#xD;
&#xD;
![enter image description here][12]&#xD;
&#xD;
We can plot this now:&#xD;
&#xD;
    Graph[Rule @@@ Partition[StringDelete[startGermany, &amp;#034;https://en.wikipedia.org/wiki/&amp;#034;], 2, 1], VertexLabels -&amp;gt; &amp;#034;Name&amp;#034;, ImageSize -&amp;gt; Full]&#xD;
&#xD;
![enter image description here][13]&#xD;
&#xD;
We can clearly see how we move from the first article onto a loop. The loop is a sort of attractor of the system. In fact, what we really want to study is the &amp;#034;basin of attraction&amp;#034; of this attractor, i.e. which initial pages end up on this attractor.&#xD;
&#xD;
    More systematic crawling approach&#xD;
&#xD;
The next thing is to find suitable starting pages. Here is an implementation which uses the &amp;#034;random page&amp;#034; function built into wikipedia:&#xD;
&#xD;
    startingpages = &#xD;
      Table[RandomChoice[Select[Import[&amp;#034;https://en.wikipedia.org/wiki/Special:Random&amp;#034;, &amp;#034;Hyperlinks&amp;#034;], (StringContainsQ[#, &#xD;
      &amp;#034;https://en.wikipedia.org/wiki/&amp;#034;] &amp;amp;&amp;amp; ! StringContainsQ[StringDelete[#, &amp;#034;https://en.wikipedia.org/wiki/&amp;#034;], &amp;#034;:&amp;#034;]) &amp;amp;]], {100}];&#xD;
&#xD;
These are the articles that were randomly chosen when I ran the code:&#xD;
&#xD;
    DeleteDuplicates[StringDelete[startingpages, &amp;#034;https://en.wikipedia.org/wiki/&amp;#034;]]&#xD;
&#xD;
![enter image description here][14]&#xD;
&#xD;
Now we need to get the data. The paths of the 100 pages are relatively quick to generate:&#xD;
&#xD;
    Monitor[paths = &#xD;
       Table[NestWhileList[(Select[Table[Quiet[(&amp;#034;https://en.wikipedia.org/wiki&amp;#034; &amp;lt;&amp;gt; &#xD;
       StringSplit[StringSplit[StringSplit[#, &amp;#034;&amp;lt;p&amp;gt;&amp;#034;][[k]], &amp;#034;&amp;lt;a href=\&amp;#034;/wiki&amp;#034;][[2]], &amp;#034;\&amp;#034;&amp;#034;][[1]])], {k, 2, 10}],&#xD;
       StringQ[#] &amp;amp;][[1]] &amp;amp;@Import[#, &amp;#034;Source&amp;#034;]) &amp;amp;, startingpages[[m]], UnsameQ, All], {m, 1, &#xD;
       Length[startingpages]}];, m]&#xD;
&#xD;
Note, that when you run the code you should add a Pause[...] so that you do not put the Wikipedia server under pressure. Just to be safe, I would rather also export the data, after the download:&#xD;
&#xD;
    Export[&amp;#034;~/Desktop/startingpagessmall.mx&amp;#034;, startingpages];&#xD;
    Export[&amp;#034;~/Desktop/paths.mx&amp;#034;, paths];&#xD;
&#xD;
We can now plot the result of our first analysis.&#xD;
&#xD;
    HighlightGraph[&#xD;
     Graph[DeleteDuplicates[&#xD;
     Flatten[Rule @@@ Partition[StringDelete[#, &amp;#034;https://en.wikipedia.org/wiki/&amp;#034;], 2,1] &amp;amp; /@ paths]], Background -&amp;gt; Black, VertexStyle -&amp;gt; Yellow, &#xD;
      EdgeStyle -&amp;gt; LightYellow, VertexSize -&amp;gt; 2, ImageSize -&amp;gt; Full], &amp;#034;Philosophy&amp;#034;]&#xD;
&#xD;
![enter image description here][15]&#xD;
&#xD;
The red vertex represents the Philosophy article. It becomes clear that it is on a cycle - the same cycle we have observed for the case of Germany as initial page. If we remove the link from Philosophy to Greek_language we end up with images like these:&#xD;
&#xD;
    HighlightGraph[&#xD;
     Graph[DeleteCases[DeleteDuplicates[&#xD;
     Flatten[Rule @@@ Partition[StringDelete[#, &amp;#034;https://en.wikipedia.org/wiki/&amp;#034;], 2, 1] &amp;amp; /@ paths]], &amp;#034;Philosophy&amp;#034; -&amp;gt; &amp;#034;Greek_language&amp;#034;], &#xD;
      Background -&amp;gt; Black, VertexStyle -&amp;gt; Yellow, &#xD;
      EdgeStyle -&amp;gt; LightYellow, VertexSize -&amp;gt; 2, ImageSize -&amp;gt; Full, &#xD;
      GraphLayout -&amp;gt; &amp;#034;RadialEmbedding&amp;#034;], &amp;#034;Philosophy&amp;#034;]&#xD;
&#xD;
![enter image description here][16]&#xD;
&#xD;
All paths on the largest component of the graph end up at the red point. Plotting this as a rooted graph makes the structure a bit clearer:&#xD;
&#xD;
    HighlightGraph[Graph[WeaklyConnectedGraphComponents[Graph[DeleteCases[DeleteDuplicates[Flatten[Rule @@@ &#xD;
    Partition[StringDelete[#, &amp;#034;https://en.wikipedia.org/wiki/&amp;#034;], 2, 1] &amp;amp; /@ paths]], &amp;#034;Philosophy&amp;#034; -&amp;gt; &amp;#034;Greek_language&amp;#034;]]][[1]],&#xD;
    Background -&amp;gt; Black, VertexStyle -&amp;gt; Yellow, EdgeStyle -&amp;gt; LightYellow, VertexSize -&amp;gt; 0.4, ImageSize -&amp;gt; Full, &#xD;
    GraphLayout -&amp;gt; {&amp;#034;LayeredEmbedding&amp;#034;, &amp;#034;RootVertex&amp;#034; -&amp;gt; &amp;#034;Philosophy&amp;#034;}], &amp;#034;Philosophy&amp;#034;]&#xD;
&#xD;
![enter image description here][17]&#xD;
&#xD;
We can of course label the nodes, but this overloads the image somewhat:&#xD;
&#xD;
    Graph[DeleteDuplicates[Flatten[Rule @@@ Partition[StringDelete[#, &amp;#034;https://en.wikipedia.org/wiki/&amp;#034;], 2, 1] &amp;amp; /@ paths]], VertexLabels -&amp;gt; &amp;#034;Name&amp;#034;, &#xD;
    VertexLabelStyle -&amp;gt; Directive[7], VertexSize -&amp;gt; 2, ImageSize -&amp;gt; Full]&#xD;
&#xD;
![enter image description here][18]&#xD;
&#xD;
Here&amp;#039;s a 3D version:&#xD;
&#xD;
    Graph3D[DeleteDuplicates[Flatten[Rule @@@ Partition[StringDelete[#, &amp;#034;https://en.wikipedia.org/wiki/&amp;#034;], 2, 1] &amp;amp; /@ paths]], VertexSize -&amp;gt; 2, ImageSize -&amp;gt; Full]&#xD;
&#xD;
![enter image description here][19]&#xD;
&#xD;
A more comprehensive dataset&#xD;
----------------------------&#xD;
&#xD;
&#xD;
For a slightly more detailed analysis I will need more starting wiki pages.&#xD;
&#xD;
    startingpages1000 = &#xD;
      DeleteDuplicates[Table[RandomChoice[Select[Import[&amp;#034;https://en.wikipedia.org/wiki/Special:Random&amp;#034;, &#xD;
      &amp;#034;Hyperlinks&amp;#034;], (StringContainsQ[#, &amp;#034;https://en.wikipedia.org/wiki/&amp;#034;] &amp;amp;&amp;amp; ! StringContainsQ[StringDelete[#, &amp;#034;https://en.wikipedia.org/wiki/&amp;#034;], &amp;#034;:&amp;#034;]) &amp;amp;]], {1200}]];&#xD;
&#xD;
The next function should only be run with an appropriate Pause between the calls - **Be nice to Wikipedia!** It is an absolutely brilliant resource for everyone. &#xD;
&#xD;
    Monitor[paths1000 = &#xD;
       Table[NestWhileList[(Select[Table[Quiet[(&amp;#034;https://en.wikipedia.org/wiki&amp;#034; &amp;lt;&amp;gt; &#xD;
       StringSplit[StringSplit[StringSplit[#, &amp;#034;&amp;lt;p&amp;gt;&amp;#034;][[k]], &amp;#034;&amp;lt;a href=\&amp;#034;/wiki&amp;#034;][[2]], &amp;#034;\&amp;#034;&amp;#034;][[1]])], {k, 2, 10}],&#xD;
       StringQ[#] &amp;amp;][[1]] &amp;amp;@Import[#, &amp;#034;Source&amp;#034;]) &amp;amp;, startingpages1000[[m]], UnsameQ, All], {m, 1, Length[startingpages1000]}];, m]&#xD;
&#xD;
The code will run for many hours or days if you choose a good waiting time between calls. Let&amp;#039;s save that again:&#xD;
&#xD;
    Export[&amp;#034;~/Desktop/startingpages1000.mx&amp;#034;, startingpages1000];&#xD;
    Export[&amp;#034;~/Desktop/paths1000.mx&amp;#034;, paths1000];&#xD;
&#xD;
Let&amp;#039;s prepare the data for further analysis:&#xD;
&#xD;
    paths1000clean = (Select[Select[Select[#, StringQ], ! StringContainsQ[#, &amp;#034;wiki&amp;lt;a href=&amp;#034;] &amp;amp;], (StringContainsQ[#, &amp;#034;https://en.wikipedia.org/wiki/&amp;#034;] &amp;amp;&amp;amp; ! &#xD;
    StringContainsQ[StringDelete[#, &amp;#034;https://en.wikipedia.org/wiki/&amp;#034;], &amp;#034;:&amp;#034;]) &amp;amp;]) &amp;amp; /@ paths1000;&#xD;
&#xD;
Here&amp;#039;s the resulting graph:&#xD;
&#xD;
    HighlightGraph[Graph[WeaklyConnectedGraphComponents[Graph[DeleteDuplicates[Flatten[(Rule @@@ &#xD;
    Partition[StringDelete[#, &amp;#034;https://en.wikipedia.org/wiki/&amp;#034;], 2, 1]) &amp;amp; /@ paths1000clean]]]][[1]], VertexStyle -&amp;gt; Yellow, &#xD;
    EdgeStyle -&amp;gt; Yellow], Graph[(Rule @@@ Partition[StringDelete[startGermany, &amp;#034;https://en.wikipedia.org/wiki/&amp;#034;], 2,1])[[6 ;;]]], Background -&amp;gt; Black]&#xD;
&#xD;
![enter image description here][20]&#xD;
&#xD;
As a matter of fact, this is only the largest connected component of the graph. If we cut again the outgoing link from the Philosophy article and plot everything we get:&#xD;
&#xD;
    HighlightGraph[Graph[DeleteCases[DeleteDuplicates[Flatten[(Rule @@@ &#xD;
    Partition[StringDelete[#, &amp;#034;https://en.wikipedia.org/wiki/&amp;#034;], 2, 1]) &amp;amp; /@ paths1000clean]], &amp;#034;Philosophy&amp;#034; -&amp;gt; &amp;#034;Greek_language&amp;#034;], ImageSize -&amp;gt; Full, &#xD;
    Background -&amp;gt; Black, EdgeStyle -&amp;gt; Yellow, VertexStyle -&amp;gt; Yellow], &amp;#034;Philosophy&amp;#034;]&#xD;
&#xD;
![enter image description here][21]&#xD;
&#xD;
We have&#xD;
&#xD;
    Length[paths1000]&#xD;
&#xD;
1073 starting pages and there are &#xD;
&#xD;
    Length[WeaklyConnectedComponents[Graph[DeleteCases[DeleteDuplicates[Flatten[(Rule @@@ &#xD;
    Partition[StringDelete[#, &amp;#034;https://en.wikipedia.org/wiki/&amp;#034;],2, 1]) &amp;amp; /@ paths1000clean]], &amp;#034;Philosophy&amp;#034; -&amp;gt; &amp;#034;Greek_language&amp;#034;], ImageSize -&amp;gt; Full, &#xD;
    Background -&amp;gt; Black, EdgeStyle -&amp;gt; Yellow, VertexStyle -&amp;gt; Yellow]]]&#xD;
&#xD;
65 weakly connected components. This allows us to estimate (it is actually not the true value) that about &#xD;
&#xD;
    (1073 - 64)/1073.&#xD;
&#xD;
or 94% of all websites lead to the Philosophy article, which is in relatively good agreement with the [data on this website][22], where they obtain 97% - the difference might be in part due to my crude parsing and also because I use slightly different rules than they do. Also, I only use only a very small subset of all 5 million plus pages. Nevertheless, there is evidence for a large attractor. &#xD;
&#xD;
    HighlightGraph[Graph[WeaklyConnectedGraphComponents[Graph[DeleteCases[DeleteDuplicates[Flatten[(UndirectedEdge @@@ &#xD;
    Partition[StringDelete[#, &amp;#034;https://en.wikipedia.org/wiki/&amp;#034;], 2, 1]) &amp;amp; /@ paths1000clean]], &amp;#034;Philosophy&amp;#034; -&amp;gt; &amp;#034;Greek_language&amp;#034;]]][[1]], Background -&amp;gt; Black, &#xD;
    VertexStyle -&amp;gt; Yellow, EdgeStyle -&amp;gt; LightYellow, VertexSize -&amp;gt; 0.1, ImageSize -&amp;gt; Full, GraphLayout -&amp;gt; {&amp;#034;LayeredEmbedding&amp;#034;, &amp;#034;RootVertex&amp;#034; -&amp;gt; &amp;#034;Philosophy&amp;#034;}], &amp;#034;Philosophy&amp;#034;, ImagePadding -&amp;gt; 10, AspectRatio -&amp;gt; 1/2]&#xD;
&#xD;
![enter image description here][23]&#xD;
&#xD;
Note that we could of course take any other page on our attractor&#xD;
&#xD;
    Graph[(Rule @@@ Partition[StringDelete[startGermany, &amp;#034;https://en.wikipedia.org/wiki/&amp;#034;], 2, 1])[[6 ;;]], VertexLabels -&amp;gt; Placed[&amp;#034;Name&amp;#034;, Above], &#xD;
     VertexStyle -&amp;gt; Yellow, EdgeStyle -&amp;gt; Yellow, VertexLabelStyle -&amp;gt; Directive[Yellow, 20], Background -&amp;gt; Black]&#xD;
&#xD;
![enter image description here][24]&#xD;
&#xD;
as the target state. But it sounds much nicer to claim that ***the greatest collection of human knowledge all leads to Philosophy***. If you were inclined to do so you could also claim that it leads to the &amp;#034;international phonetic alphabet&amp;#034; or to &amp;#034;science&amp;#034;. I have a tendency for the latter and therefore want to add the respective graph plot:&#xD;
&#xD;
    HighlightGraph[Graph[WeaklyConnectedGraphComponents[Graph[DeleteCases[DeleteDuplicates[Flatten[(UndirectedEdge @@@ &#xD;
    Partition[StringDelete[#, &amp;#034;https://en.wikipedia.org/wiki/&amp;#034;], 2, 1]) &amp;amp; /@ paths1000clean]], &amp;#034;Science&amp;#034; -&amp;gt; &amp;#034;Knowledge&amp;#034;]]][[1]], Background -&amp;gt; Black, &#xD;
    VertexStyle -&amp;gt; Yellow, EdgeStyle -&amp;gt; LightYellow, VertexSize -&amp;gt; 0.1, ImageSize -&amp;gt; Full, GraphLayout -&amp;gt; {&amp;#034;LayeredEmbedding&amp;#034;, &amp;#034;RootVertex&amp;#034; -&amp;gt; &amp;#034;Science&amp;#034;}], &amp;#034;Science&amp;#034;, ImagePadding -&amp;gt; 10, AspectRatio -&amp;gt; 1/2]&#xD;
&#xD;
![enter image description here][25]&#xD;
&#xD;
Some basic characteristics of the network&#xD;
-----------------------------------------&#xD;
&#xD;
We can now also make some simple calculations about properties of these graphs. First we try to find out which node represents the Philosophy article:&#xD;
&#xD;
    Position[VertexList[WeaklyConnectedGraphComponents[Graph[DeleteCases[DeleteDuplicates[Flatten[(Rule @@@ &#xD;
    Partition[StringDelete[#, &amp;#034;https://en.wikipedia.org/wiki/&amp;#034;], 2, 1]) &amp;amp; /@ paths1000clean]], &amp;#034;Philosophy&amp;#034; -&amp;gt; &amp;#034;Greek_language&amp;#034;]]][[1]]], &amp;#034;Philosophy&amp;#034;]&#xD;
&#xD;
which gives 320. Next we can calculate the distance matrix between all nodes:&#xD;
&#xD;
    distmatrix = &#xD;
      GraphDistanceMatrix[WeaklyConnectedGraphComponents[Graph[DeleteCases[DeleteDuplicates[Flatten[(Rule @@@ &#xD;
      Partition[StringDelete[#, &amp;#034;https://en.wikipedia.org/wiki/&amp;#034;], 2, 1]) &amp;amp; /@ paths1000clean]], &amp;#034;Philosophy&amp;#034; -&amp;gt; &amp;#034;Greek_language&amp;#034;]]][[1]]];&#xD;
&#xD;
and check the distance of all other articles to the Philosophy article:&#xD;
&#xD;
    dist2philosophy = Transpose[distmatrix][[320]];&#xD;
&#xD;
What&amp;#039;s the mean path length?&#xD;
&#xD;
    N@Mean[dist2philosophy]&#xD;
&#xD;
which gives 14.6.&#xD;
&#xD;
The median&#xD;
&#xD;
    N@Median[dist2philosophy]&#xD;
&#xD;
is 15. These values are lower than the ones reported on the [page above][26], which gives a median length of 23. We can also plot a histogram&#xD;
&#xD;
    Histogram[dist2philosophy, PlotTheme -&amp;gt; &amp;#034;Marketing&amp;#034;, FrameLabel -&amp;gt; {&amp;#034;Path length&amp;#034;, &amp;#034;Number of paths&amp;#034;}, &#xD;
     LabelStyle -&amp;gt; Directive[Bold, Medium], ChartStyle -&amp;gt; Red, ImageSize -&amp;gt; Large]&#xD;
&#xD;
![enter image description here][27]&#xD;
&#xD;
Well, this is not too bad, but it does not seem to correspond perfectly to what is reported either. I do use slightly different rules though. *I am currently working on a much more efficient way of doing this with the Wolfram Language. If it works I might post it later.* &#xD;
&#xD;
Disclaimer &amp;amp; what to do if you want to reproduce that&#xD;
-----------------------------------------------------&#xD;
&#xD;
Note, that you should not run the crawler without a delay between consecutive requests. To allow you to run the code, I will add the files with the data I have downloaded. &#xD;
&#xD;
Discussion&#xD;
----------&#xD;
&#xD;
*The explanation for this curious structure of the nearly global attractor is still not quite clear. There are hypothesis such as the fact that authors are encouraged to start an article by a definition of the topic of the article. This might lead to a sort of classification chain which ends up at areas such as Philosophy and Science. Differently from the standard procedure my paring does maintain links to the phonetical transcription. What is interesting is that in spite of several differences between my and the standard procedure the main effect of ending up at Philosophy (or Science) is still there and hence appears to be robust with respect to smaller changes in the algorithm - and that&amp;#039;s quite cool.* &#xD;
&#xD;
Cheers,&#xD;
&#xD;
Marco&#xD;
&#xD;
 [at0]: http://community.wolfram.com/web/sghuisman&#xD;
&#xD;
&#xD;
 [at1]: http://community.wolfram.com/web/bernatep&#xD;
&#xD;
&#xD;
 [at2]: http://community.wolfram.com/web/vitaliyk&#xD;
&#xD;
&#xD;
  [1]: http://www.hannahfry.co.uk&#xD;
  [2]: http://www.bbc.co.uk/programmes/b07lk6tj&#xD;
  [3]: https://en.wikipedia.org/wiki/Philosophy&#xD;
  [4]: https://en.wikipedia.org/wiki/Wikipedia:Getting_to_Philosophy&#xD;
  [5]: http://xefer.com//wikipedia&#xD;
  [6]: http://www.bbc.co.uk/programmes/p0418hfr&#xD;
  [7]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2016-10-14at23.54.44.png&amp;amp;userId=48754&#xD;
  [8]: http://community.wolfram.com/groups/-/m/t/758828&#xD;
  [9]: http://community.wolfram.com/groups/-/m/t/758936&#xD;
  [10]: http://community.wolfram.com/groups/-/m/t/942423&#xD;
  [11]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2016-10-15at00.04.18.png&amp;amp;userId=48754&#xD;
  [12]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2016-10-15at00.07.31.png&amp;amp;userId=48754&#xD;
  [13]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2016-10-15at00.08.27.png&amp;amp;userId=48754&#xD;
  [14]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2016-10-15at00.14.20.png&amp;amp;userId=48754&#xD;
  [15]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2016-10-15at00.19.53.png&amp;amp;userId=48754&#xD;
  [16]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2016-10-15at00.23.03.png&amp;amp;userId=48754&#xD;
  [17]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2016-10-15at00.25.55.png&amp;amp;userId=48754&#xD;
  [18]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2016-10-15at00.27.27.png&amp;amp;userId=48754&#xD;
  [19]: http://community.wolfram.com//c/portal/getImageAttachment?filename=3DWiki.gif&amp;amp;userId=48754&#xD;
  [20]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2016-10-15at00.38.13.png&amp;amp;userId=48754&#xD;
  [21]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2016-10-15at00.40.45.png&amp;amp;userId=48754&#xD;
  [22]: https://en.wikipedia.org/wiki/Wikipedia:Getting_to_Philosophy&#xD;
  [23]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2016-10-15at00.49.48.png&amp;amp;userId=48754&#xD;
  [24]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2016-10-15at00.51.22.png&amp;amp;userId=48754&#xD;
  [25]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2016-10-15at00.54.59.png&amp;amp;userId=48754&#xD;
  [26]: https://en.wikipedia.org/wiki/Wikipedia:Getting_to_Philosophy&#xD;
  [27]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2016-10-15at01.02.53.png&amp;amp;userId=48754</description>
    <dc:creator>Marco Thiel</dc:creator>
    <dc:date>2016-10-15T00:25:30Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1707390">
    <title>[WSS19] World Oldest People: Age, Gender, Racial, Geographical Composition</title>
    <link>https://community.wolfram.com/groups/-/m/t/1707390</link>
    <description>![mapplot1: place of death of the oldest people][6]&#xD;
&#xD;
Abstract&#xD;
--------&#xD;
&#xD;
The world&amp;#039;s oldest people reflect the underlying medical, technological, and socio-economical conditions of their places of residence. The oldest people on record are ten times more likely to be females than males, supporting the traditional hypothesis that females make less risky social choices. Although all broad racial groups are represented, more than half of the oldest people on record since 1842 are white, and eighty percent was born in G8 countries, indicating the earlier advancement of Western European and North American&amp;#039;s healthcare system. Similarly, the oldest people are clustered in Eastern United States, Japan, Britain, and France, justifying the correlation between socio-economical development and increased life-span. Furthermore, the world&amp;#039;s oldest people are living longer - by an average of 1.11 years each decade, which demonstrates the overall improvement of global living conditions. The influence of socio-economic conditions on longevity suggests many directions to improve life-span around the world.&#xD;
&#xD;
&#xD;
----------&#xD;
&#xD;
&#xD;
I. Data Import&#xD;
--------------&#xD;
&#xD;
The list of worlds&amp;#039; oldest people, curated by Gerontology Research Group, was imported directly into Wolfram Mathematica using the following code:&#xD;
&#xD;
    ClearAll[&amp;#034;Global`*&amp;#034;];&#xD;
    rawData1 = Import[&amp;#034;http://archive.is/4kwbk&amp;#034;, &amp;#034;Data&amp;#034;];&#xD;
&#xD;
The data table - the only element of interest from the website - was located by trial and error: it is in the level [[2,2,1]], from position 8 to position 71. In case the data table would be updated in the future, a While loop was implemented to locate the table&amp;#039;s last line:&#xD;
&#xD;
    count = 71;&#xD;
    continue = True;&#xD;
    While[And[continue == True, count &amp;lt; Length[rawData1[[2, 1, 1]]]],&#xD;
      If[NumberQ[First[rawData1[[2, 1, 1]][[count]]]],&#xD;
       count++,&#xD;
       continue = False&#xD;
       ]];&#xD;
&#xD;
Since the last line of the data table describes the current oldest person, with missing date of death/Most recent alive date, it was separately processed - adding the current date, and manually appended into the table:&#xD;
&#xD;
    rawData2 = Take[rawData1[[2, 1, 1]], {8, count - 2}];&#xD;
    lastLine = &#xD;
      Insert[rawData1[[2, 1, 1, count - 1]], DateString[&amp;#034;ISODate&amp;#034;], 5];&#xD;
    AppendTo[rawData2, lastLine];&#xD;
&#xD;
This raw data table was not usable, as it contained disparage type of data in one cell or column: separating the years and days of age, mixing up cities and countries, including annotation [] and parentheses () within data. Furthermore, it gave secondary/derived data: age, which could be obtained from date of birth and most recent alive date. Hence, the data was cleaned up:&#xD;
&#xD;
    rawData3 = &#xD;
      Extract[Transpose[&#xD;
        Sort[rawData2, #1[[4]] &amp;lt; #2[[4]] &amp;amp;]], {#} &amp;amp; /@ {1, 2, 3, 4, 5, 8, &#xD;
         9, 10}];&#xD;
    cleanfunc[s_] := &#xD;
      StringReplace[&#xD;
       s, {&amp;#034; [&amp;#034; ~~ x___ ~~ &amp;#034;]&amp;#034; -&amp;gt; &amp;#034;&amp;#034;, &amp;#034;(&amp;#034; ~~ x___ ~~ &amp;#034;)&amp;#034; -&amp;gt; x}];&#xD;
    cleanfuncRace[s_] := &#xD;
      StringReplace[&#xD;
       s, {&amp;#034;W&amp;#034; -&amp;gt; &amp;#034;white&amp;#034;, &amp;#034;B&amp;#034; -&amp;gt; &amp;#034;black&amp;#034;, &amp;#034;EA&amp;#034; -&amp;gt; &amp;#034;asian&amp;#034;, &#xD;
        &amp;#034;O&amp;#034; -&amp;gt; &amp;#034;asian&amp;#034;, &amp;#034;M&amp;#034; -&amp;gt; &amp;#034;multiracial&amp;#034;, &amp;#034;H&amp;#034; -&amp;gt; &amp;#034;hispanic&amp;#034;}];&#xD;
    cleanfuncSex[s_] := StringReplace[s, {&amp;#034;M&amp;#034; -&amp;gt; &amp;#034;male&amp;#034;, &amp;#034;F&amp;#034; -&amp;gt; &amp;#034;female&amp;#034;}];&#xD;
    &#xD;
    cleanStrings = {&amp;#034;Que&amp;#034; -&amp;gt; &amp;#034;Quebec&amp;#034;, &amp;#034;GA&amp;#034; -&amp;gt; &amp;#034;Georgia&amp;#034;, &#xD;
       &amp;#034;now Poland&amp;#034; -&amp;gt; &amp;#034;&amp;#034;, &amp;#034;British West Indies now Jamaica&amp;#034; -&amp;gt; &amp;#034;Jamaica&amp;#034;,&#xD;
        &amp;#034;U.S. MI&amp;#034; -&amp;gt; &amp;#034;Michigan&amp;#034;, &amp;#034;Cape Verde Portugal&amp;#034; -&amp;gt; &amp;#034;Cape Verde&amp;#034;, &#xD;
       &amp;#034;France St. Barts&amp;#034; -&amp;gt; &amp;#034;Saint Barthelemy&amp;#034;};&#xD;
&#xD;
The data table received additional attributes - Date Object or City/Country Entity - thanks to SemanticInterpretation[]. In order to implement SemanticInterpretation[], certain strings were removed or clarified, as detailed above. Nevertheless, SemanticInterpretation[] may fail in some instance, which then requires the re-implementation of the following block of code:&#xD;
&#xD;
    rawData4 = &#xD;
      Transpose[{rawData3[[1]], cleanfunc[rawData3[[3]]], &#xD;
        SemanticInterpretation[cleanfunc[rawData3[[4]]]], &#xD;
        SemanticInterpretation[rawData3[[5]]], &#xD;
        cleanfuncRace[cleanfunc[rawData3[[6]]]], rawData3[[7]], &#xD;
        SemanticInterpretation[&#xD;
         StringReplace[cleanfunc[rawData3[[2]]], cleanStrings]], &#xD;
        SemanticInterpretation[&#xD;
         StringReplace[cleanfunc[rawData3[[8]]], cleanStrings]]}];&#xD;
    dataNoHeading = &#xD;
      Transpose[&#xD;
       Insert[Transpose[rawData4], &#xD;
        Table[DateDifference[rawData4[[i, 3]], &#xD;
          rawData4[[i, 4]], {&amp;#034;Year&amp;#034;, &amp;#034;Day&amp;#034;}], {i, 1, Length[rawData4]}], &#xD;
        5]];&#xD;
    &#xD;
    headings = {&amp;#034;No.&amp;#034;, &amp;#034;Name&amp;#034;, &amp;#034;Date of birth&amp;#034;, &amp;#034;Most recent alive date&amp;#034;, &#xD;
       &amp;#034;Age&amp;#034;, &amp;#034;Race&amp;#034;, &amp;#034;Sex&amp;#034;, &amp;#034;Birthplace&amp;#034;, &amp;#034;Deathplace&amp;#034;};&#xD;
    data = Prepend[dataNoHeading, headings];&#xD;
    &#xD;
    data // TableForm&#xD;
&#xD;
Upon successful running of SemanticInterpretation[], the data table appeared as follow:&#xD;
![Part of the data table][1]&#xD;
&#xD;
II. Data Visualizations and Analysis&#xD;
-----------------------&#xD;
The oldest people are more likely to be women than men, with a ratio of ten-to-one (pieChart1). This discrepancy underscores socio-environmental choices of each gender: men tend to engage in more risky activities: smoking, drinking, using drugs, reckless driving, ignoring health issues, working in dangerous occupations, participating in war, etc. (This gender discrepancy might be attributed to biological differences between male and female also: women were observed to have more resistance to infections and degenerative diseases than men.)&#xD;
&#xD;
    genderCounts = &#xD;
      Counts[Transpose[dataNoHeading][[7]] //. {&amp;#034;F&amp;#034; -&amp;gt; &amp;#034;Female&amp;#034;, &#xD;
         &amp;#034;M&amp;#034; -&amp;gt; &amp;#034;Male&amp;#034;}];&#xD;
    genderPercentage = genderCounts/Total[Values[genderCounts]];&#xD;
    pieChartLabel1 = &#xD;
      Table[Style[&#xD;
        StringJoin[Keys[genderPercentage][[n]], &amp;#034; &amp;#034;, &#xD;
         ToString[Round[Values[genderPercentage][[n]]*100, 1]], &amp;#034;%&amp;#034;], &#xD;
        Bold, 14], {n, 1, Length[genderPercentage]}];&#xD;
    &#xD;
    pieChart1 = &#xD;
     PieChart[Counts[Transpose[dataNoHeading][[7]]], &#xD;
      ChartLabels -&amp;gt; pieChartLabel1, &#xD;
      ChartStyle -&amp;gt; {Lighter[Pink], Lighter[Blue]}, &#xD;
      PlotLabel -&amp;gt; &#xD;
       Style[Framed[&amp;#034;Gender distribution of the worlds&amp;#039; oldest people&amp;#034;], &#xD;
        16]]&#xD;
&#xD;
![pieChart1: the gender composition of the oldest people][2]&#xD;
&#xD;
Among all the racial groups - Black, White, Asian, Hispanic, the oldest people are more than half as likely to be White (barChart1). This skewed racial representation may attest to the fact that North American and European countries industrialized earlier than the rest of the world.&#xD;
&#xD;
Accordingly, the oldest people are four times as likely to have been born in G8 countries - the more developed, more resourceful nations of the world (barChart2). Furthermore, the oldest people who come from the same country tend to have similar age, which suggests some influence of environmental conditions (clusterImage1).&#xD;
&#xD;
Following the trend, the oldest people&amp;#039;s last place of residence tend to cluster around Eastern United States, Europe, or Japan, where advance, life-extending medical services are available. Hence, the racial, place-of-birth, and place-of-death composition of the oldest people all imply that socio-economic conditions greatly affect life-span. (Again, the contribution of genetic, biological factors cannot be discounted - neither is the fact that more develop countries keep better record/census of their people.)&#xD;
&#xD;
    raceCounts = Counts[Transpose[dataNoHeading][[6]]];&#xD;
    racePercentage = raceCounts/Total[Values[raceCounts]];&#xD;
    barChartLabel1 = &#xD;
      Table[Style[&#xD;
        Framed[StringJoin[Keys[racePercentage][[n]], &amp;#034; &amp;#034;, &#xD;
          ToString[Round[Values[racePercentage][[n]]*100, 1]], &amp;#034;%&amp;#034;]&#xD;
         ], 12], {n, 1, Length[racePercentage]}];&#xD;
    barChart1 = &#xD;
     BarChart[raceCounts, ChartLabels -&amp;gt; barChartLabel1, &#xD;
      AxesLabel -&amp;gt; {&amp;#034;Race&amp;#034;, &amp;#034;Counts&amp;#034;}, &#xD;
      ChartStyle -&amp;gt; {White, Orange, Black, Brown, Gray}, &#xD;
      PlotLabel -&amp;gt; &#xD;
       Style[Framed[&amp;#034;Racial distribution of the worlds&amp;#039; oldest people&amp;#034;], &#xD;
        16], ImageSize -&amp;gt; Large]&#xD;
&#xD;
![barChart1: racial distribution of the world oldest people][3]&#xD;
&#xD;
    EntityValue[Entity[&amp;#034;HistoricalCountry&amp;#034;, &amp;#034;Czechoslovakia&amp;#034;], &amp;#034;Flag&amp;#034;] = &#xD;
      EntityValue[Entity[&amp;#034;Country&amp;#034;, &amp;#034;CzechRepublic&amp;#034;], &amp;#034;Flag&amp;#034;];&#xD;
    birthPlaceList = Transpose[dataNoHeading][[8]];&#xD;
    birthCountryList = &#xD;
      Table[If[EntityTypeName[birthPlaceList[[i]]] == &amp;#034;Country&amp;#034; || &#xD;
         EntityTypeName[birthPlaceList[[i]]] == &amp;#034;HistoricalCountry&amp;#034;, &#xD;
        birthPlaceList[[i]], birthPlaceList[[i]][&amp;#034;Country&amp;#034;]], {i, 1, &#xD;
        Length[birthPlaceList]}];&#xD;
    deathPlaceList = Transpose[dataNoHeading][[9]];&#xD;
    deathCountryList = &#xD;
      Table[If[EntityTypeName[deathPlaceList[[i]]] == &amp;#034;Country&amp;#034; || &#xD;
         EntityTypeName[deathPlaceList[[i]]] == &amp;#034;HistoricalCountry&amp;#034;, &#xD;
        deathPlaceList[[i]], deathPlaceList[[i]][&amp;#034;Country&amp;#034;]], {i, 1, &#xD;
        Length[deathPlaceList]}];&#xD;
    &#xD;
    f[x_] := Magnify[Framed[x], 0.1];&#xD;
    chartList2 = &#xD;
      Sort[Counts[#]] &amp;amp; /@ &#xD;
       GatherBy[birthCountryList, &#xD;
        MemberQ[EntityList[EntityClass[&amp;#034;Country&amp;#034;, &amp;#034;G8&amp;#034;]], #] &amp;amp;];&#xD;
    chartList2Flag = Map[f, EntityValue[Keys[chartList2], &amp;#034;Flag&amp;#034;], {2}];&#xD;
    chartList2ForPlot = &#xD;
      Table[Table[&#xD;
        Labeled[chartList2[[n, m]], chartList2Flag[[n, m]]], {m, 1, &#xD;
         Length[chartList2[[n]]]}], {n, 1, Length[chartList2]}];&#xD;
    &#xD;
    barChart2GroupLabel = {Placed[{Style[Framed[&amp;#034;G8&amp;#034;], 14], &#xD;
         Style[Framed[&amp;#034;non G8&amp;#034;], 14]}, Above], Automatic};&#xD;
    &#xD;
    barChart2 = &#xD;
     BarChart[chartList2ForPlot, ChartStyle -&amp;gt; &amp;#034;Pastel&amp;#034;, &#xD;
      ChartLabels -&amp;gt; barChart2GroupLabel, &#xD;
      AxesLabel -&amp;gt; {&amp;#034;Country&amp;#034;, &amp;#034;Counts&amp;#034;}, &#xD;
      PlotLabel -&amp;gt; &#xD;
       Style[Framed[&amp;#034;Birth country of the worlds&amp;#039; oldest people&amp;#034;], 16], &#xD;
      ImageSize -&amp;gt; Large]&#xD;
&#xD;
![barChart2: birth country of the oldest people][4]&#xD;
&#xD;
    clusterFlagLabel = &#xD;
      Magnify[Framed[#], 0.1] &amp;amp; /@ EntityValue[birthCountryList, &amp;#034;Flag&amp;#034;];&#xD;
    clusterImage1 = &#xD;
     ClusteringTree[&#xD;
      UnitConvert[Drop[data[[All, 5]], 1], &amp;#034;Year&amp;#034;] -&amp;gt; clusterFlagLabel, &#xD;
      ClusterDissimilarityFunction -&amp;gt; &amp;#034;Centroid&amp;#034;, &#xD;
      GraphLayout -&amp;gt; &amp;#034;RadialEmbedding&amp;#034;, &#xD;
      PlotLabel -&amp;gt; &#xD;
       Style[Framed[&#xD;
         &amp;#034;Cluster by age of the oldest people\nwith respect to their \&#xD;
    birthplace &amp;#034;], 16], ImageSize -&amp;gt; Large]&#xD;
&#xD;
![clusterImage1: cluster by age of the oldest people][5]&#xD;
&#xD;
    mapPlot1 = &#xD;
     GeoGraphics[{GeoMarker[deathPlaceList, &#xD;
        EntityValue[Entity[&amp;#034;Icon&amp;#034;, &amp;#034;MensRoom&amp;#034;], &amp;#034;Image&amp;#034;]]}, &#xD;
      GeoRange -&amp;gt; &amp;#034;World&amp;#034;, GeoBackground -&amp;gt; &amp;#034;Coastlines&amp;#034;, &#xD;
      GeoProjection -&amp;gt; &amp;#034;Robinson&amp;#034;, ImageSize -&amp;gt; Full, &#xD;
      PlotLabel -&amp;gt; &#xD;
       Style[Framed[&#xD;
         &amp;#034;Current residence or place of death since 1955\nof the world&amp;#039;s \&#xD;
    oldest people&amp;#034;], 20]]&#xD;
&#xD;
![mapplot1: place of death of the oldest people][6]&#xD;
&#xD;
Finally, the oldest people are living longer: the linear model for date of birth and age predicts that age would increase by 1.11 years each decade (listPlot1). This trend of increment in the oldest people&amp;#039;s life-span correlates with better living conditions worldwide.&#xD;
&#xD;
    dateOfBirthAgeList = &#xD;
      TimeSeries[&#xD;
       Transpose[&#xD;
        Append[{Transpose[dataNoHeading][[3]]}, &#xD;
         QuantityMagnitude[&#xD;
          UnitConvert[Transpose[dataNoHeading][[5]], &amp;#034;Year&amp;#034;]]]]];&#xD;
    datePairList = dateOfBirthAgeList[&amp;#034;Path&amp;#034;];&#xD;
    modelFit = LinearModelFit[dateOfBirthAgeList, x, x];&#xD;
    modelFitList = &#xD;
      Table[{x, modelFit[x]}, {x, First[datePairList][[1]], &#xD;
        Last[datePairList][[1]], (&#xD;
        Last[datePairList][[1]] - First[datePairList][[1]])/50}];&#xD;
    &#xD;
    plotlabel = &#xD;
      Style[Framed[&#xD;
        &amp;#034;Date of birth and age of the oldest people, in blue\nwith \&#xD;
    best-fitted line in dashed orange&amp;#034;], 16];&#xD;
    listPlot1 = &#xD;
     DateListPlot[{dateOfBirthAgeList, modelFitList}, &#xD;
      PlotLabel -&amp;gt; plotlabel, FrameLabel -&amp;gt; {&amp;#034;Date of Birth&amp;#034;, &amp;#034;Age&amp;#034;}, &#xD;
      PlotStyle -&amp;gt; {Thick, {Thick, Dashed}}, Joined -&amp;gt; {False, True}, &#xD;
      PlotMarkers -&amp;gt; {All, None}, ImageSize -&amp;gt; Large]&#xD;
    &#xD;
    ageDifference = modelFit[10*365.25*24*60*60] - modelFit[0];&#xD;
    rSquare = modelFit[&amp;#034;RSquared&amp;#034;];&#xD;
    Print[&amp;#034;The best-fitted linear model predicts that the oldest people&amp;#039;s \&#xD;
    age would increase by &amp;#034;, ageDifference, &amp;#034; years each decade.&amp;#034;];&#xD;
&#xD;
![listPlot1: Date of birth and age of oldest people][7]&#xD;
&#xD;
In conclusion, the oldest people are predominantly women, are mostly white, and are very likely to be born or lived in developed countries. The gender, racial, and geographical distribution of the oldest people show the impact of socio-economical conditions on life-span. The age of the oldest people is increasing, correlating with the overall advances in technology and healthcare.&#xD;
&#xD;
The correlation between (the number of) oldest people and improved living conditions suggests certain directions to improve life-span in less-developed parts of the world: providing healthcare, improving living conditions, discouraging/alleviating (male) idiosyncratic choices, investing in research and development, etc.&#xD;
&#xD;
Bonus&#xD;
-----&#xD;
Dynamic plot/video of the oldest people:&#xD;
&#xD;
    ClearAll[beginDate, endDate, beginYear, endYear, listLiveDeath, &#xD;
      listLive, listDeath, plotMap, geoLive, geoGold, geoRed, geoBlue, &#xD;
      listDate, listDateValue];&#xD;
    beginDate = First[dataNoHeading][[3]] - Quantity[1, &amp;#034;years&amp;#034;];&#xD;
    endDate = Last[data][[4]] + Quantity[0, &amp;#034;years&amp;#034;];&#xD;
    beginYear = DateObject[beginDate, &amp;#034;Year&amp;#034;];&#xD;
    endYear = DateObject[endDate, &amp;#034;Year&amp;#034;];&#xD;
    dayRange = QuantityMagnitude[UnitConvert[endDate - beginDate, &amp;#034;Days&amp;#034;]];&#xD;
    listDate = &#xD;
      Union[Transpose[dataNoHeading][[3]], Transpose[dataNoHeading][[4]]];&#xD;
    listDateValue = &#xD;
      QuantityMagnitude[&#xD;
       UnitConvert[DateDifference[beginDate, #] &amp;amp; /@ listDate, &amp;#034;Days&amp;#034;]];&#xD;
    &#xD;
    plotMap[time_] := &#xD;
      plotMap[time] = &#xD;
       Module[{t = time, listDeath, listLive, timeDeathPlaceListDeath, &#xD;
         timeDeathPlaceListLive, geoLive, geoBlue, plotLabel},&#xD;
        {listLive = &#xD;
          Select[dataNoHeading, &#xD;
           And[QuantityMagnitude[&#xD;
               DateDifference[#[[3]], beginYear + Quantity[t, &amp;#034;days&amp;#034;]]] &amp;gt;=&#xD;
               0, QuantityMagnitude[&#xD;
               &#xD;
               DateDifference[#[[4]], &#xD;
                beginYear + Quantity[t, &amp;#034;days&amp;#034;]]] &amp;lt;=  0] &amp;amp;];&#xD;
         plotLabel = &#xD;
          Style[Framed[&#xD;
            &amp;#034;The world&amp;#039;s oldest people who are still alive at time t\n\&#xD;
    Blue: the oldest person, Red: people who are going to be oldest&amp;#034;], 20];&#xD;
         &#xD;
         Which[&#xD;
          Length[listLive] == 0,&#xD;
          {GeoGraphics[GeoRange -&amp;gt; &amp;#034;World&amp;#034;, GeoBackground -&amp;gt; &amp;#034;Coastlines&amp;#034;,&#xD;
             GeoProjection -&amp;gt; &amp;#034;Robinson&amp;#034;, ImageSize -&amp;gt; Full, &#xD;
            PlotLabel -&amp;gt; plotLabel]&#xD;
           },&#xD;
          &#xD;
          Length[listLive] == 1,&#xD;
          {timeDeathPlaceListLive = Transpose[listLive][[9]];&#xD;
           geoBlue = &#xD;
            GeoMarker[First[timeDeathPlaceListLive], &#xD;
             EntityValue[Entity[&amp;#034;Icon&amp;#034;, &amp;#034;MensRoom&amp;#034;], &amp;#034;Image&amp;#034;], &#xD;
             &amp;#034;Color&amp;#034; -&amp;gt; Blue, &amp;#034;Scale&amp;#034; -&amp;gt; Scaled[0.04]];&#xD;
           GeoGraphics[{geoBlue}, GeoRange -&amp;gt; &amp;#034;World&amp;#034;, &#xD;
            GeoBackground -&amp;gt; &amp;#034;Coastlines&amp;#034;, GeoProjection -&amp;gt; &amp;#034;Robinson&amp;#034;, &#xD;
            ImageSize -&amp;gt; Full, PlotLabel -&amp;gt; plotLabel]&#xD;
           },&#xD;
          &#xD;
          Length[listLive] &amp;gt; 1,&#xD;
          {timeDeathPlaceListLive = Transpose[listLive][[9]];&#xD;
           geoBlue = &#xD;
            GeoMarker[First[timeDeathPlaceListLive], &#xD;
             EntityValue[Entity[&amp;#034;Icon&amp;#034;, &amp;#034;MensRoom&amp;#034;], &amp;#034;Image&amp;#034;], &#xD;
             &amp;#034;Color&amp;#034; -&amp;gt; Blue, &amp;#034;Scale&amp;#034; -&amp;gt; Scaled[0.04]];&#xD;
           geoLive = &#xD;
            GeoMarker[Drop[timeDeathPlaceListLive, 1], &#xD;
             EntityValue[Entity[&amp;#034;Icon&amp;#034;, &amp;#034;MensRoom&amp;#034;], &amp;#034;Image&amp;#034;]];&#xD;
           GeoGraphics[{geoBlue, geoLive}, GeoRange -&amp;gt; &amp;#034;World&amp;#034;, &#xD;
            GeoBackground -&amp;gt; &amp;#034;Coastlines&amp;#034;, GeoProjection -&amp;gt; &amp;#034;Robinson&amp;#034;, &#xD;
            ImageSize -&amp;gt; Full, PlotLabel -&amp;gt; plotLabel]&#xD;
           }]&#xD;
         }];&#xD;
    Table[plotMap[t], {t, listDateValue}];&#xD;
    &#xD;
    Hold[&#xD;
      plotMap[time_] := &#xD;
       plotMap[time] = &#xD;
        Module[{t = time, listDeath, listLive, timeDeathPlaceListDeath, &#xD;
          timeDeathPlaceListLive, geoLive},&#xD;
         {listLive = &#xD;
           Select[dataNoHeading, &#xD;
            And[QuantityMagnitude[&#xD;
                DateDifference[#[[3]], &#xD;
                 beginYear + Quantity[t, &amp;#034;days&amp;#034;]]] &amp;gt;= 0, &#xD;
              QuantityMagnitude[&#xD;
                DateDifference[#[[4]], &#xD;
                 beginYear + Quantity[t, &amp;#034;days&amp;#034;]]] &amp;lt;=  0] &amp;amp;];&#xD;
          If[listLive == {},&#xD;
           {GeoGraphics[GeoRange -&amp;gt; &amp;#034;World&amp;#034;, &#xD;
             GeoBackground -&amp;gt; &amp;#034;Coastlines&amp;#034;, GeoProjection -&amp;gt; &amp;#034;Robinson&amp;#034;, &#xD;
             ImageSize -&amp;gt; Full, &#xD;
             PlotLabel -&amp;gt; &#xD;
              Style[Framed[&#xD;
                &amp;#034;The world&amp;#039;s oldest people who are still alive at time \&#xD;
    t&amp;#034;], 20]]},&#xD;
           &#xD;
           {timeDeathPlaceListLive = Transpose[listLive][[9]];&#xD;
            geoLive = {GeoMarker[timeDeathPlaceListLive, &#xD;
               EntityValue[Entity[&amp;#034;Icon&amp;#034;, &amp;#034;MensRoom&amp;#034;], &amp;#034;Image&amp;#034;]]};&#xD;
            GeoGraphics[geoLive, GeoRange -&amp;gt; &amp;#034;World&amp;#034;, &#xD;
             GeoBackground -&amp;gt; &amp;#034;Coastlines&amp;#034;, GeoProjection -&amp;gt; &amp;#034;Robinson&amp;#034;, &#xD;
             ImageSize -&amp;gt; Full, &#xD;
             PlotLabel -&amp;gt; &#xD;
              Style[Framed[&#xD;
                &amp;#034;The world&amp;#039;s oldest people who are still alive at time \&#xD;
    t&amp;#034;], 20]]&#xD;
            }]&#xD;
          }];&#xD;
      Table[plotMap[t], {t, 0, dayRange, 2000}];&#xD;
      ];&#xD;
&#xD;
    mapAnimate = &#xD;
     Animate[plotMap[t], {t, listDateValue}, DefaultDuration -&amp;gt; 20, &#xD;
      AnimationRunning -&amp;gt; False]&#xD;
&#xD;
  [1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=2019-06-06problemT1datatable.PNG&amp;amp;userId=1707333&#xD;
  [2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=2019-06-06ProblemT1pieChart1.png&amp;amp;userId=1707333&#xD;
  [3]: https://community.wolfram.com//c/portal/getImageAttachment?filename=2019-06-06ProblemT1barChart1.png&amp;amp;userId=1707333&#xD;
  [4]: https://community.wolfram.com//c/portal/getImageAttachment?filename=2019-06-06ProblemT1barChart2.png&amp;amp;userId=1707333&#xD;
  [5]: https://community.wolfram.com//c/portal/getImageAttachment?filename=2019-06-06ProblemT1clusterImage1.png&amp;amp;userId=1707333&#xD;
  [6]: https://community.wolfram.com//c/portal/getImageAttachment?filename=2019-06-06ProblemT1mapPlot.png&amp;amp;userId=1707333&#xD;
  [7]: https://community.wolfram.com//c/portal/getImageAttachment?filename=2019-06-06ProblemT1listPlot1.png&amp;amp;userId=1707333</description>
    <dc:creator>Nam Tran</dc:creator>
    <dc:date>2019-06-19T06:12:55Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1561288">
    <title>3D version of the built-in VoronoiDiagram</title>
    <link>https://community.wolfram.com/groups/-/m/t/1561288</link>
    <description>**[Open in Cloud][1] | [See Original][2] | Download to Desktop via Attachments Below**&#xD;
&#xD;
![enter image description here][3]&#xD;
&#xD;
&amp;amp;[Wolfram Notebook][4]&#xD;
&#xD;
&#xD;
  [1]: https://www.wolframcloud.com/objects/wolfram-community/3D-version-of-the-built-in-VoronoiDiagram-by-Chip-Hurst&#xD;
  [2]: https://mathematica.stackexchange.com/questions/18893/how-can-i-define-a-3d-version-of-the-built-in-voronoidiagram-voronoimesh-in-v10&#xD;
  [3]: https://community.wolfram.com//c/portal/getImageAttachment?filename=chip2.png&amp;amp;userId=20103&#xD;
  [4]: https://www.wolframcloud.com/obj/fcd0f8eb-5939-43fa-a040-4b0705220700</description>
    <dc:creator>Greg Hurst</dc:creator>
    <dc:date>2018-11-28T19:03:50Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/559849">
    <title>How do I change the colors and styles of two functions?</title>
    <link>https://community.wolfram.com/groups/-/m/t/559849</link>
    <description>How do I change the colors and styles of two functions that are graphed on the same set of axes? The color and style needs to be different for each function, but they must be on the same graph. The screenshot I attached is what I have graphed so far. F[x] needs to be purple and dashed. And H[x] needs to be red and thick.&#xD;
(please help I&amp;#039;ve been trying to figure this out for 4 hours!)</description>
    <dc:creator>kendra s</dc:creator>
    <dc:date>2015-09-04T20:37:32Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1065956">
    <title>Computational Lichtenberg figures</title>
    <link>https://community.wolfram.com/groups/-/m/t/1065956</link>
    <description>![enter image description here][1]&#xD;
&#xD;
&amp;amp;[Wolfram Notebook][2]&#xD;
&#xD;
&#xD;
  [1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=lichtenberg.gif&amp;amp;userId=32203&#xD;
  [2]: https://www.wolframcloud.com/obj/2775a340-5dcd-445e-8949-2d92d2fa1aed</description>
    <dc:creator>Henrik Schachner</dc:creator>
    <dc:date>2017-04-19T10:34:55Z</dc:date>
  </item>
</rdf:RDF>

