<?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 questions tagged with Computational Humanities sorted by most replies.</description>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/520009" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1383246" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/796831" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/565816" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/3156766" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/841486" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/2608592" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/2452694" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1757394" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1256480" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/813769" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/558518" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/2638404" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/2103451" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1900563" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1136926" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/908823" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/3030120" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1862900" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1382958" />
      </rdf:Seq>
    </items>
  </channel>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/520009">
    <title>Create a 3D WordCloud ?</title>
    <link>https://community.wolfram.com/groups/-/m/t/520009</link>
    <description>Hi, I was wondering how a 3D version of WordCloud could be made :&#xD;
&#xD;
    WordCloud[EntityValue[CountryData[],{&amp;#034;Name&amp;#034;,&amp;#034;Population&amp;#034;}]]</description>
    <dc:creator>nfaterpe</dc:creator>
    <dc:date>2015-06-28T23:31:56Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1383246">
    <title>[WSC18] Voice sentiment classification using neural networks</title>
    <link>https://community.wolfram.com/groups/-/m/t/1383246</link>
    <description>## Introduction ##&#xD;
Hello Wolfram community! My name is Ryan Heo and I am a student at the Wolfram high school summer camp where over the past two weeks I was able to work on and complete a project called &amp;#034;Voice Sentiment classification&amp;#034;. The goal of this project was to be able to take an input of an audio speech file and be able to classify that into one of the 8 different categories of emotion using machine learning. Down below is are the steps and the procedure I followed in the completion of my project.&#xD;
&#xD;
##Dataset##&#xD;
For this project I used the Ryerson Audio-Visual Database of Emotional Speech which consisted of varying tones or emotion of speech recordings from voice actors.Down below is the importation of the speech audio files that I have downloaded&#xD;
&#xD;
    folders = Select[FileNames[&amp;#034;*&amp;#034;, NotebookDirectory[]], &#xD;
       DirectoryQ[#] &amp;amp;&amp;amp; StringContainsQ[#, &amp;#034;Actor&amp;#034;] &amp;amp;];&#xD;
    fileNames = FileNames[&amp;#034;*.wav&amp;#034;, #] &amp;amp; /@ folders // Flatten;&#xD;
    audio = Import /@ fileNames;&#xD;
&#xD;
## Encoding the data ##&#xD;
After I have imported all the data files I took extracted the number section of the file name that matches the different emotion categories.&#xD;
I then separated these numbers into eight sections which corresponded with the emotional category of these files.&#xD;
Additionally, I threaded these sections to their corresponding emotion and after flattening the list and random sampling the data I inserted the data into the net encoder. I converted the data into a mel-frequency cepstrum which is based on the log power spectrum and does a better job modeling the human auditory system than the a normal cepstrum. In the net encoder I set my sampling rate and the number of filters I had to a high number in order to create more data points and to be able to extract more features respectively.&#xD;
&#xD;
    enc = NetEncoder[{&amp;#034;AudioMelSpectrogram&amp;#034;, &amp;#034;WindowSize&amp;#034; -&amp;gt; 4096, &#xD;
        &amp;#034;Offset&amp;#034; -&amp;gt; 1024, &amp;#034;SampleRate&amp;#034; -&amp;gt; 44100, &amp;#034;MinimumFrequency&amp;#034; -&amp;gt; 1, &#xD;
        &amp;#034;MaximumFrequency&amp;#034; -&amp;gt; 22050, &amp;#034;NumberOfFilters&amp;#034; -&amp;gt; 128}] ;&#xD;
After encoding the data I separated it into sections consisting of length 41 and reshaped the array to be inputted into neural net for training.&#xD;
Down below is a representation of the mel spectrogram represented by a matrix plot&#xD;
![enter image description here][1]&#xD;
&#xD;
&#xD;
##Neural Networks ##&#xD;
I used a combination of a convolutional neural network and a recurrent network for classification.&#xD;
Down below is the convolutional neural network architecture that I used&#xD;
&#xD;
    convNet = NetChain[&#xD;
      {&#xD;
       conv[32],&#xD;
       conv[32],&#xD;
       PoolingLayer[{3, 3}, &amp;#034;Stride&amp;#034; -&amp;gt; 3, &amp;#034;Function&amp;#034; -&amp;gt; Max],&#xD;
       BatchNormalizationLayer[],&#xD;
       Ramp,&#xD;
       conv[64],&#xD;
       conv[64],&#xD;
       PoolingLayer[{3, 3}, &amp;#034;Stride&amp;#034; -&amp;gt; 3, &amp;#034;Function&amp;#034; -&amp;gt; Max],&#xD;
       BatchNormalizationLayer[],&#xD;
       Ramp,&#xD;
       conv[128],&#xD;
       conv[128],&#xD;
       PoolingLayer[{3, 3}, &amp;#034;Stride&amp;#034; -&amp;gt; 3, &amp;#034;Function&amp;#034; -&amp;gt; Max],&#xD;
       BatchNormalizationLayer[],&#xD;
       Ramp,&#xD;
       conv[256],&#xD;
       conv[256],&#xD;
       PoolingLayer[{3, 3}, &amp;#034;Stride&amp;#034; -&amp;gt; 3, &amp;#034;Function&amp;#034; -&amp;gt; Max],&#xD;
       BatchNormalizationLayer[],&#xD;
       Ramp,&#xD;
       LinearLayer[1024],&#xD;
       Ramp,&#xD;
       DropoutLayer[0.5],&#xD;
       LinearLayer[8],&#xD;
       SoftmaxLayer[]&#xD;
       },&#xD;
      &amp;#034;Input&amp;#034; -&amp;gt; {1, 41, 128},&#xD;
      &amp;#034;Output&amp;#034; -&amp;gt; NetDecoder[{&amp;#034;Class&amp;#034;, newClasses}]&#xD;
      ]&#xD;
&#xD;
This is the architecture for the recurrent network with LSTM layers&#xD;
&#xD;
    recurrentNet = NetChain[{&#xD;
       LongShortTermMemoryLayer[128, &amp;#034;Dropout&amp;#034; -&amp;gt; 0.3],&#xD;
       LongShortTermMemoryLayer[128, &amp;#034;Dropout&amp;#034; -&amp;gt; 0.3],&#xD;
       SequenceLastLayer[],&#xD;
       LinearLayer[Length@newClasses],&#xD;
       SoftmaxLayer[]&#xD;
       },&#xD;
      &amp;#034;Input&amp;#034; -&amp;gt; {&amp;#034;Varying&amp;#034;, 8},&#xD;
      &amp;#034;Output&amp;#034; -&amp;gt; NetDecoder[{&amp;#034;Class&amp;#034;, newClasses}]&#xD;
      ]&#xD;
I then combined these two nets&#xD;
&#xD;
    netCombined = NetChain[{&#xD;
       NetMapOperator[cnnTrainedNet],&#xD;
       lstmTrained&#xD;
       }]&#xD;
&#xD;
I inputted the section of the dataset files I reserved for testing and validation and inputted these files into the combined neural net achieving an accuracy of 85 percent.Down below would be a good representation of how accurate my net was in in classifying these files into their respective emotional categories.&#xD;
&#xD;
For example in the neutral category out of the 38 samples of the randomly distributed data it was able to correctly match these files into neutral 28 times. As shown below the net seems to confuse the neutral emotion with the sadness emotion as seen by guessing sad 4 times out of 38 files.&#xD;
&#xD;
![enter image description here][2]&#xD;
&#xD;
&#xD;
  [1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Spectrogram.jpg&amp;amp;userId=1372518&#xD;
  [2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ConfusionMatrixPlot.jpg&amp;amp;userId=1372518&#xD;
&#xD;
## Deploying the Microsite ##&#xD;
&#xD;
    MicroFunc[aud_Audio] := Module[{net, enc},&#xD;
      net = Import[CloudObject[&#xD;
        &amp;#034;https://www.wolframcloud.com/objects/ryanheo2001/CombinedNet.\&#xD;
    wlNet&amp;#034;], &amp;#034;WLNET&amp;#034;];&#xD;
      enc = NetEncoder[{&amp;#034;AudioMelSpectrogram&amp;#034;, &amp;#034;WindowSize&amp;#034; -&amp;gt; 4096, &#xD;
         &amp;#034;Offset&amp;#034; -&amp;gt; 1024, &amp;#034;SampleRate&amp;#034; -&amp;gt; 44100, &amp;#034;MinimumFrequency&amp;#034; -&amp;gt; 1,&#xD;
          &amp;#034;MaximumFrequency&amp;#034; -&amp;gt; 22050, &amp;#034;NumberOfFilters&amp;#034; -&amp;gt; 128}];&#xD;
      net[Transpose[{Partition[enc[aud], 41]}, {2, 1, 3, 4}]]&#xD;
      ]&#xD;
    CloudDeploy[&#xD;
     FormPage[{&amp;#034;Audio&amp;#034; -&amp;gt; &amp;#034;CachedFile&amp;#034; -&amp;gt; &amp;#034;&amp;#034;, &amp;#034;URL&amp;#034; -&amp;gt; &amp;#034;URL&amp;#034; -&amp;gt; &amp;#034;&amp;#034;}, Which[&#xD;
        #Audio =!= &amp;#034;&amp;#034;, MicroFunc[Audio[#Audio]],&#xD;
        #URL =!= &amp;#034;&amp;#034;, MicroFunc[Import[#URL, &amp;#034;Audio&amp;#034;]],&#xD;
        True, &amp;#034;&amp;#034;] &amp;amp;, PageTheme -&amp;gt; &amp;#034;Red&amp;#034;, &#xD;
      AppearanceRules -&amp;gt; &amp;lt;|&amp;#034;Title&amp;#034; -&amp;gt; &amp;#034;Voice Sentiment Classifier&amp;#034;|&amp;gt;],&#xD;
     &amp;#034;VoiceSentiment&amp;#034;, Permissions -&amp;gt; &amp;#034;Public&amp;#034;]&#xD;
&#xD;
The final microsite can be found here at: https://www.wolframcloud.com/objects/ryanheo2001/VoiceSentiment&#xD;
&#xD;
Lastly, I want to thank my mentor Michael and all the instructors and staff at the wolfram summer camp. They have been very helpful and I have learned valuable lessons from them these past two weeks.</description>
    <dc:creator>Ryan Heo</dc:creator>
    <dc:date>2018-07-13T20:57:43Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/796831">
    <title>[Call] for talks at Oxford&amp;#039;s Digital Humanities Summer School [Oxford]</title>
    <link>https://community.wolfram.com/groups/-/m/t/796831</link>
    <description>[Martin Hadley][1] and I are organizing a 5-day Wolfram Language workshop at Oxfords [Digital Humanities Summer School][2] Analysing Humanities Data: An Introduction to Knowledge-Based Computing with the Wolfram Language. Heres a brief overview from the course description:&#xD;
&#xD;
&amp;gt; This example-led workshop will provide a comprehensive introduction to techniques for analysing a wide range of humanities data with the Wolfram Language; from text analysis, image processing, and visualization, to network analysis, time-related and geographic computation, and machine learning. The course assumes no prior knowledge of any programming language. Participants will learn the concepts needed to import, manipulate, and analyse humanities data using both the natural-language input and scripted interfaces to the Wolfram Language and to share their data and applications in the cloud. Part of the material in the course will be drawn from William Turkels open-access textbook, *[Digital Research Methods with Mathematica][3]* &#xD;
&#xD;
Were looking for one or two experienced WL users who would be interested in coming to Oxford between July 4th and 8th (at our expense, naturally) to give a c. 3/4 or hour long presentation/talk on some aspect of the WL relevant to the humanities. This need not be text related! Yes, we do more than just read old books :^) Potential topics for your presentation might include geodata &amp;amp; geocomputation, network analysis, general graphing &amp;amp; plotting, time series analysis, an intro. to machine learning, sound analysis &amp;amp; sonification, using MMA with R-Link etc. &#xD;
 &#xD;
Martin (who is a data scientist for Oxford University IT Services, and previously worked as a consultant for Wolfram Research,([https://uk.linkedin.com/in/martinjohnhadley][4]) will be teaching the course. My research background is in the humanities (Im digital project manager for [http://culturesofknowledge.org][5]) and I am still a WL beginner, so I&amp;#039;m collaborating with Martin to make our examples and data as relevant as possible to our predominantly &amp;#039;newbie&amp;#039; humanities/social sciences audience. &#xD;
&#xD;
If youre at all interested or curious to learn more, please let us know sooner rather than later, as wed like to firm up the syllabus quite soon. We can host you for one or two nights in Oxford (including travel) if youd like to give one presentation, or for as long as 5 days if youd like to stay longer and give two talks (or perhaps even assist us with running the class itself). &#xD;
&#xD;
Although we didnt plan this, this is a particularly auspicious time to be learning the WL for the first time, with lots of new resources newly available from WR and elsewhere, and huge potential for applying it in the humanities. &#xD;
&#xD;
&#xD;
  [1]: https://uk.linkedin.com/in/martinjohnhadley&#xD;
  [2]: http://digital.humanities.ox.ac.uk/dhoxss/2016&#xD;
  [3]: http://williamjturkel.net/digital-research-methods-with-mathematica&#xD;
  [4]: https://uk.linkedin.com/in/martinjohnhadley&#xD;
  [5]: http://culturesofknowledge.org</description>
    <dc:creator>Arno Bosse</dc:creator>
    <dc:date>2016-02-19T20:05:22Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/565816">
    <title>English Braille font  for Wolfram Language?</title>
    <link>https://community.wolfram.com/groups/-/m/t/565816</link>
    <description>I am collaborating in ethnomusicological research with a colleague who is blind and I want to generate graphics which can be printed on tactile paper, so that she can feel the graphics. In this context, I need to write text  (e. g. in plot labels) in English Braille language. I can generate the Braille glyphs as graphics (see attached file),  but I don´t know how to  generate my own Braille font which could be used with any text such as the plot labels, etc. Help would highly be appreciated....&#xD;
&#xD;
![enter image description here][1]&#xD;
&#xD;
&#xD;
  [1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=2015-10-22_03-27-43.png&amp;amp;userId=11733</description>
    <dc:creator>Frank Scherbaum</dc:creator>
    <dc:date>2015-09-16T05:52:02Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/3156766">
    <title>Help needed --- Every Japanese to be called SATO by 2531&amp;#034;</title>
    <link>https://community.wolfram.com/groups/-/m/t/3156766</link>
    <description>Hello!&#xD;
&#xD;
I&amp;#039;m a teacher of journalism at the international EDJ school in Nice FR&#xD;
&#xD;
My students have access to Mathematica 14 (but they mainly use chat-driven notebooks as the wolfram language is sort of complicated to them).&#xD;
&#xD;
Anyway. As part of the &amp;#034;Data Journalism&amp;#034; course I want to give them the assignment to read this article  https://www.dailymail.co.uk/news/article-13266707/Everyone-Japan-called-Sato-year-2531-countrys-marriage-laws.html&#xD;
&#xD;
It tells the story of a Tohoku University economics professor that concluded that, given how married couples in jpn  drop one of their family names in favour of both individuals taking the same one everyone will be called &amp;#034;SATO&amp;#034; by 2531.&#xD;
&#xD;
I&amp;#039;d like the students to perform  the same simulation for their own country (after finding out the candidate family name -- for Italy that would probably be &amp;#034;Rossi&amp;#034;)&#xD;
&#xD;
Now, after some digging I&amp;#039;ve found in this PDF https://think-name.jp/assets/pdf/Sato_estimation_yoshida_hiroshi.pdf&#xD;
&#xD;
the method used to perform the calculation for Japan:&#xD;
&#xD;
Handling of Past Data&#xD;
&#xD;
First, we obtained the number of people with the Sato surname in Japan from the data provided and published by &amp;#034;Myoji-yurai.net&amp;#034; (https://myoji-yurai.net/), which covers more than 99.04% of Japanese surnames.&#xD;
&#xD;
Next, we divided the number of people with the Sato surname by the total population of Japan for each year (estimated by the Ministry of Internal Affairs and Communications) * 99.04% to obtain the &amp;#034;ratio of the Sato surname in a given year t&amp;#034;: x(t).&#xD;
&#xD;
From the change in the Sato surname between the latest years of 2022 and 2023, we calculated the one-year growth rate \[Rho] in the Sato surname ratio.&#xD;
Estimation Results (1) Growth Rate \[Rho] of the Sato Surname It is found that the ratio of the Sato surname x(t) increased from 1.480% in 2013 to 1.530% in 2023, an increase of 0.05 percentage points over more than 10 years. Calculating from the data for the most recent points of 2022 and 2023, the growth rate \[Rho] of the Sato surname ratio is (1+\[Rho]) = 1.0083.&#xD;
&#xD;
(2) Future Simulation&#xD;
Assuming that the ratio of the Sato surname to the Japanese population will grow at a rate of 1.0083 each year, starting from 1.530% as of March 2023, and repeating the calculation of x(t+1) = (1+\[Rho]) x(t), it was calculated that the ratio will reach 100% in approximately 500 years, in 2531.&#xD;
&#xD;
-----&#xD;
&#xD;
**And the question is : Is anyone kind enough to write me the Wolfram Language generic code to perform the same**  ? Ideally, students could get their own country basic data (if possible directly with WolfrmaLanguage functions, if not possible from outside sources) and have the system perform the simulation for them (of course, forcing the Japanese role &amp;#034;select one family name&amp;#034;  even if not the case for the specific country)&#xD;
&#xD;
&#xD;
&#xD;
It is also possible that it will not converge and we will never have a &amp;#034;Rossi only&amp;#034; country not even in year 3500...or maybe yes. But that&amp;#039;s also the point of the simulation.&#xD;
&#xD;
Thanks!!</description>
    <dc:creator>Marco Barsotti</dc:creator>
    <dc:date>2024-04-11T09:01:38Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/841486">
    <title>Large corpus of parsed sentences in English</title>
    <link>https://community.wolfram.com/groups/-/m/t/841486</link>
    <description>Hello, for a project in visual scene understanding I&amp;#039;m looking for a large corpus with parsed sentences from text (books, etc), from which I could extract Subject-Verb-Object (SVO) statistics. I would like to know for example frequencies of SVO triplets such as boy-play-girl in &amp;#039;The boy in white is playing with the nice girl&amp;#039;. Thank you.</description>
    <dc:creator>Yair Lakretz</dc:creator>
    <dc:date>2016-04-18T13:57:28Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/2608592">
    <title>More about visual motion illusions</title>
    <link>https://community.wolfram.com/groups/-/m/t/2608592</link>
    <description>![enter image description here][1]&#xD;
&#xD;
After my previous previous [community contribution][2], I looked deeper into this type of illusion by further analysing existing illusions and creating exciting new ones.&#xD;
&#xD;
**1. Video as a spatio-temporal object**&#xD;
&#xD;
A video can be represented as an x-y-t space. The frames are periodic cross sections perpendicular to the t-axis. They show motion over time. To detect motion in the x- or y-direction, one needs cross sections perpendicular to the x- or y-axis.&#xD;
This is simple video containing 32 frames of 120 by 120 pixels with a static (blue circle) and moving (red propeller) part:&#xD;
&#xD;
    aV = AnimationVideo[&#xD;
       Graphics[{AbsoluteThickness[10], Red, &#xD;
         Rotate[Line[{{0, -.99}, {0, .99}}], -\[Phi]], Blue, Circle[]}, &#xD;
        Background -&amp;gt; LightGray, PlotRange -&amp;gt; 1.2], {\[Phi], 0, &#xD;
        6.28, \[Pi]/16}, RasterSize -&amp;gt; 120];&#xD;
&#xD;
![enter image description here][3]&#xD;
&#xD;
Here is the same  video represented as an x-y-t space. The 32 Cross sections perpendicular to the t-axis are the video frames.&#xD;
&#xD;
![enter image description here][4]&#xD;
&#xD;
The frames are 120 by 120 pixels  and the above video can also be defined by its 120 cross sections perpendicular to the x- or y-axis. Here is a function *ytSectionFromVideo* for making a cross section perpendicular to the y-axis at pixel position yf.&#xD;
&#xD;
    ytSectionFromVideo[v_, yf_] := &#xD;
     Module[{frames, count, size}, frames = VideoFrameList[v, All]; &#xD;
      size = ImageDimensions[frames[[1]]]; count = Length[frames]; &#xD;
      Raster[ParallelTable[&#xD;
        PixelValue[frames[[frm]], {x, yf}], {x, size[[1]]}, {frm, &#xD;
         count}]]]&#xD;
&#xD;
Here are some of the y-t sections at pixel positions 35, 45 and 55 along the y-axis:&#xD;
&#xD;
![enter image description here][5]&#xD;
&#xD;
Reversely, the function *videoFromYtSections* makes a complete set of video frames of size sz from the full set of  y-t sections (one for each pixel in the y direction). &#xD;
&#xD;
    videoFromYtSections[ytSections_, sz_] := &#xD;
     Module[{xSize, ySize}, {xSize, ySize} = &#xD;
       ImageDimensions[ytSections[[1]]]; &#xD;
      Table[ImageRotate[&#xD;
        ImageReflect[&#xD;
         ImageResize[&#xD;
          Image[ParallelTable[(PixelValue[#1, {frm, xf}] &amp;amp;) /@ &#xD;
             ytSections, {xf, ySize}]], {sz, sz}]], -Pi/2], {frm, xSize}]]&#xD;
&#xD;
This is a re-creation of the original video aV from its y-t sections:&#xD;
&#xD;
    avFrames = videoFromYtSections[avYTs, 100];&#xD;
    Video[FrameListVideo[Reverse@avFrames], ImageSize -&amp;gt; 100]&#xD;
&#xD;
![enter image description here][6]&#xD;
&#xD;
**2. Motion and motion illusion in videos**&#xD;
&#xD;
The y-t sections (or x-t sections) are essential to detect and create motion in videos. First we look at the completely motionless video of a landscape and 3 of its by-t sections: (landscape still.jpg&amp;#034;, attached from &amp;#034;[Banff NP images][7]&amp;#034;&#xD;
&#xD;
   landscapeV = FrameListVideo[Table[banff, 10]]&#xD;
&#xD;
![enter image description here][8]&#xD;
&#xD;
    GraphicsRow[&#xD;
     Graphics[ytSectionFromVideo[landscapeV, #], AspectRatio -&amp;gt; 1, &#xD;
        Frame -&amp;gt; True, FrameLabel -&amp;gt; {&amp;#034;t&amp;#034;, &amp;#034;x&amp;#034;}] &amp;amp; /@ {50, 70, 90}, &#xD;
     ImageSize -&amp;gt; 600]&#xD;
&#xD;
![enter image description here][9]&#xD;
&#xD;
Since there is no motion at all, the pixels form parallel lines to the x-axis (if we made x-t sections, lines would be parallel to the y-axis)&#xD;
&#xD;
This is a video and some of the y-t sections of the real motion in a bouncing ball video: (bouncing balls video.mp4 (attached) taken from: [depositphotos][10]&amp;#034;&#xD;
&#xD;
![enter image description here][11]&#xD;
&#xD;
    GraphicsRow[&#xD;
     Graphics[ytSectionFromVideo[landscapeV, #], AspectRatio -&amp;gt; 1, &#xD;
        Frame -&amp;gt; True, FrameLabel -&amp;gt; {&amp;#034;t&amp;#034;, &amp;#034;x&amp;#034;}] &amp;amp; /@ {50, 70, 90}, &#xD;
     ImageSize -&amp;gt; 600]&#xD;
&#xD;
![enter image description here][12]&#xD;
The background is static and forms parallel lines to the x-axis but the bouncing balls trace slanted or even Perpendicular lines to the x-axis.&#xD;
&#xD;
Finally, the [Mario video][13] from Jacob Yates creating the illusion of motion:&#xD;
&#xD;
    fullMarioV = &#xD;
      Video[&amp;#034;https://jake.vision/motionillusionblog/marioReversePhi.mp4&amp;#034;];&#xD;
&#xD;
![enter image description here][14]&#xD;
&#xD;
The y-t sections of the complete video would be too crowded so, we take a cropped detail from the original:&#xD;
&#xD;
    croppedMarioV = &#xD;
      VideoFrameMap[ImageTake[#1, {228, 318}, {555, 645}] &amp;amp;, fullMarioV];&#xD;
&#xD;
![enter image description here][15]&#xD;
&#xD;
These are the 10 colors of the periodic flashes.&#xD;
&#xD;
    vfl = VideoFrameList[croppedMarioV, All];&#xD;
    colors = ((DominantColors[#1, 2] &amp;amp;) /@ Take[vfl, 10])[[All, 2]]&#xD;
&#xD;
![enter image description here][16]&#xD;
&#xD;
    GraphicsRow[&#xD;
     Graphics[ytSectionFromVideo[croppedMarioV, #], AspectRatio -&amp;gt; 1, &#xD;
        Frame -&amp;gt; True, FrameLabel -&amp;gt; {&amp;#034;t&amp;#034;, &amp;#034;x&amp;#034;}] &amp;amp; /@ {15, 40, 50}, &#xD;
     ImageSize -&amp;gt; 600]&#xD;
&#xD;
![enter image description here][17]&#xD;
&#xD;
The y-t sections above are a mix of parallel and slanted sections parts. If we look along the time axis of these y-t sections, we notice two essential features of this illusion: **the periodic flashing** and **the slanted edges of the y-t section pattern.** In the middle, the flashing merely shows a different color each period. At the slanted edges, there is a time shift. Our brain compares the color flash of the mid section with the delayed color at the sides and will interpret it as movement. The perceived motion at the edges will appear to our eyes as to be for the whole bar and the whole frame as a set of bars. A more scientific explanation can be found in &amp;#034;[Spatiotemporal energy models for the perception of motion][18]&amp;#034; by Adelson and Bergen.&#xD;
&#xD;
&#xD;
**3. Making YT sections with slanted edges**&#xD;
&#xD;
A video can be re-created from its y-t sections. We want to make y-t sections with slanted edges to create the illusion of motion in a static video. &#xD;
The function *edgeShiftedYTsection* makes an image for an y-t section with slanted edges starting at pixel position pos and w pixels wide. The edges are d pixels wide and the number of frames per bar is frs. The total number of frames will be the number of colors in cols times frs.&#xD;
&#xD;
    edgedStrip[y_, w_, h_, d_, col_] := {col, &#xD;
      Polygon[{{d - 0.5` w, -h + y}, {-0.5` w, d - h + y}, {-0.5` w, &#xD;
         d + h + y}, {d - 0.5` w, h + y}, {-d + 0.5` w, &#xD;
         h + y}, {0.5` w, -d + h + y}, {0.5` w, -d - h + y}, {-d + &#xD;
          0.5` w, -h + y}}]}&#xD;
    edgedStripe[pos_, w_, d_, cols_] := &#xD;
     Translate[&#xD;
      MapThread[&#xD;
       edgedStrip[#1, w, 0.5`, d, #2] &amp;amp;, {Range[Length[cols]], &#xD;
        cols}], {0.5` w + pos, 0}]&#xD;
    edgeShiftedYTsection[pos_, w_, d_ : 3, frs_ : 6, cols_ : colors] := &#xD;
     Module[{cls}, cls = Length[cols]; &#xD;
      Image[ImageRotate[&#xD;
        Image[Graphics[&#xD;
          Table[Translate[edgedStripe[pos, w, d, cols], {0, y}], {y, -cls,&#xD;
             frs cls, cls}], PlotRange -&amp;gt; {{0, 92}, {0, frs cls}}]], &#xD;
        Pi/2]]]&#xD;
&#xD;
This is an example of an image to be used as an y-t section: the y-position of the edged pattern is at pixel 15 from the bottom, the total width is 65 pixels and the slanted edges are 5 pixels wide. The pattern will give flashes in 10 different colors and is repeated 6 times to create 6 video frames.&#xD;
&#xD;
![enter image description here][19]&#xD;
&#xD;
**4. Reverse engineering Mario**&#xD;
&#xD;
We try our *edgeShiftedYTsection* function to produce y-t sections and re-create the Mario video from them. This is our home made Mario:&#xD;
&#xD;
![enter image description here][20]&#xD;
&#xD;
**Step 1: Divide the image into horizontal bars** (16 for the Mario pic) and collect the position and width of the bars into a list.&#xD;
To re create the video,  one needs all y-t sections but, for images like Mario, one y-t section for each of the 16 horizontal bars is sufficient. The complete set of y-t sections is then 16 times the number of frames in the resulting video.&#xD;
&#xD;
    marioBarData = {{{21, 33}}, {{14, 55}}, {{14, 47}}, {{8, 67}}, {{8, &#xD;
         74}}, {{8, 67}}, {{21, 47}}, {{14, 40}}, {{8, 67}}, {{0, &#xD;
         82}}, {{0, 82}}, {{0, 82}}, {{0, 82}}, {{14, 18}, {48, 21}}, {{8,&#xD;
          18}, {54, 21}}, {{0, 26}, {54, 28}}};&#xD;
&#xD;
**Step 2: Make an y-t section for each bar:**&#xD;
&#xD;
    marioYTs = (ColorReplace[#1, &#xD;
          White -&amp;gt; &#xD;
           Lighter[Gray, 0.5]] &amp;amp;) /@ (ImageResize[#1, {60, 92}] &amp;amp;) /@ &#xD;
        Apply[ImageMultiply, &#xD;
         Apply[edgeShiftedYTsection, marioBarData, {2}], {1}];&#xD;
    Grid[{marioYTs}, ItemSize -&amp;gt; 3.5, Frame -&amp;gt; True];&#xD;
&#xD;
![enter image description here][21]&#xD;
&#xD;
**Step 3: Create the video** using the function videoFromYtSections:&#xD;
&#xD;
    marioFrames = &#xD;
      ImagePad[#, {{12, 0}, {0, 12}}, Lighter[Gray, 0.65]] &amp;amp; /@ &#xD;
       videoFromYtSections[marioYTs, 100];&#xD;
    VideoTimeStretch[Video[FrameListVideo[marioFrames], ImageSize -&amp;gt; 100],&#xD;
      2]&#xD;
&#xD;
![enter image description here][22]&#xD;
&#xD;
**5. Creating completely new illusions: bunny**&#xD;
Here is a bunny extracted from: [Clip-art library][23] rasterized and converted to 34 horizontal bars: &#xD;
&#xD;
![enter image description here][24]&#xD;
&#xD;
This is a list of positions and widths in pixels of the 34 bars and their respective y-t sections:&#xD;
&#xD;
    bunnyBarData = {{{26, 6}, {38, 3}}, {{26, 6}, {35, 6}}, {{23, 9}, {35,&#xD;
          9}}, {{23, 21}}, {{20, 24}}, {{20, 24}}, {{20, 24}}, {{23, &#xD;
         18}}, {{20, 21}}, {{17, 21}}, {{14, 24}}, {{11, 27}, {50, &#xD;
         12}}, {{8, 60}}, {{8, 66}}, {{8, 69}}, {{5, 75}}, {{2, 81}}, {{2,&#xD;
          81}}, {{5, 81}}, {{14, 72}}, {{14, 72}}, {{14, 72}}, {{17, &#xD;
         72}}, {{17, 72}}, {{20, 69}}, {{26, 63}}, {{29, 60}}, {{29, &#xD;
         63}}, {{29, 63}}, {{29, 60}}, {{26, 54}}, {{17, 24}, {47, &#xD;
         27}}, {{23, 12}, {44, 21}}, {{44, 9}}};&#xD;
    bunnyYTs = (ImageReflect[#1, &#xD;
          Left] &amp;amp;) /@ (ImageResize[#1, &#xD;
           60] &amp;amp;) /@ (ColorReplace[#1, White -&amp;gt; Lighter[Gray, 0.65]] &amp;amp;) /@&#xD;
          Apply[ImageMultiply, &#xD;
          Map[edgeShiftedYTsection[Sequence @@ #1, 3, 6, colors] &amp;amp;, &#xD;
           bunnyBarData, {2}], {1}];&#xD;
&#xD;
Some of the 34 y-t sections (at bars nos 10,  20 and 32 ):&#xD;
&#xD;
    GraphicsRow[&#xD;
     Graphics[bunnyYTs[[#]], AspectRatio -&amp;gt; 1, Frame -&amp;gt; True, &#xD;
        FrameLabel -&amp;gt; {&amp;#034;t&amp;#034;, &amp;#034;x&amp;#034;}] &amp;amp; /@ {10, 20, 32}, ImageSize -&amp;gt; 600]&#xD;
&#xD;
![enter image description here][25]&#xD;
&#xD;
The video frames and the resulting video are derived from the y-t sections:&#xD;
&#xD;
    bunnyFrames = &#xD;
      Map[ImageResize[#, {95, 112}] &amp;amp;, &#xD;
       ImagePad[#, {{12, 0}, {0, 12}}, Lighter[Gray, 0.65]] &amp;amp; /@ &#xD;
        videoFromYtSections[bunnyYTs, 100]];&#xD;
    bunnyFrames[[;; 5]]&#xD;
&#xD;
![enter image description here][26]&#xD;
&#xD;
    Video[FrameListVideo[&#xD;
      ImagePad[#, {{12, 0}, {0, 6}}, Lighter[Gray, 0.65]] &amp;amp; /@ &#xD;
       Flatten@Table[ImageReflect[#, Left] &amp;amp; /@ bunnyFrames, 10]], &#xD;
     ImageSize -&amp;gt; 275]&#xD;
&#xD;
![enter image description here][27]&#xD;
&#xD;
**8. Creating completely new illusions: rooster**&#xD;
&#xD;
Here is a rooster image extracted from: Clip-art library rasterized and converted to 43 horizontal bars: &#xD;
&#xD;
&#xD;
![enter image description here][28]&#xD;
&#xD;
    roosterBarData = {{{13, 6}}, {{9, 14}}, {{7, 18}, {63, 10}}, {{5, &#xD;
         22}, {63, 12}}, {{3, 26}, {61, 16}}, {{3, 28}, {65, 10}}, {{1, &#xD;
         30}, {63, 14}}, {{1, 32}, {61, 18}}, {{1, 2}, {5, 28}, {61, &#xD;
         18}}, {{5, 28}, {59, 18}}, {{3, 32}, {59, 18}}, {{3, 34}, {59, &#xD;
         18}}, {{7, 30}, {57, 22}}, {{7, 30}, {57, 22}}, {{7, 32}, {55, &#xD;
         24}}, {{7, 32}, {49, 32}}, {{7, 32}, {47, 34}}, {{9, 32}, {45, &#xD;
         36}}, {{9, 8}, {19, 62}}, {{9, 8}, {19, 60}}, {{19, 60}}, {{21, &#xD;
         56}}, {{21, 6}, {29, 46}}, {{21, 2}, {25, 2}, {29, 46}}, {{29, &#xD;
         44}}, {{27, 44}}, {{27, 42}}, {{27, 38}}, {{27, 36}}, {{29, &#xD;
         34}}, {{39, 22}}, {{41, 18}}, {{43, 14}}, {{45, 10}}, {{45, &#xD;
         8}}, {{45, 18}}, {{45, 2}, {57, 10}}, {{45, 2}, {59, 10}}, {{45, &#xD;
         2}, {67, 2}}, {{43, 4}, {67, 2}}, {{43, 4}}, {{43, 4}}, {{45, &#xD;
         4}}};&#xD;
&#xD;
Sample YT sections at bars nos 10,  20 and 32 out of 43:&#xD;
&#xD;
    roosterYTs = (ImageResize[#1, 60] &amp;amp;) /@ &#xD;
       Apply[ImageMultiply, &#xD;
        Apply[edgeShiftedYTsection, roosterBarData, {2}], {1}];&#xD;
    GraphicsRow[&#xD;
     Graphics[roosterYTs[[#]], AspectRatio -&amp;gt; 1, Frame -&amp;gt; True, &#xD;
        FrameLabel -&amp;gt; {&amp;#034;t&amp;#034;, &amp;#034;x&amp;#034;}] &amp;amp; /@ {10, 20, 32}, ImageSize -&amp;gt; 600]&#xD;
&#xD;
![enter image description here][29]&#xD;
&#xD;
The video frames and video as derived from the y-t sections:&#xD;
&#xD;
![enter image description here][30]&#xD;
&#xD;
    roosterV = &#xD;
     Video[FrameListVideo[&#xD;
       ImagePad[#, {{12, 0}, {0, 6}}, Lighter[Gray, 0.65]] &amp;amp; /@ &#xD;
        Flatten@Table[ImageReflect[#, Left] &amp;amp; /@ roosterFrames, 10]], &#xD;
      ImageSize -&amp;gt; 275]&#xD;
&#xD;
&#xD;
![enter image description here][31]&#xD;
&#xD;
Several of the illusions can be combined into new ones. The possibilities are endless. Here is the code for the &amp;#034;rooster and hens&amp;#034; video at the top:&#xD;
&#xD;
![enter image description here][32]&#xD;
&#xD;
I hope this helps you making your own visual illusions!&#xD;
&#xD;
&#xD;
  [1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=schoolOfHens15.gif&amp;amp;userId=68637&#xD;
  [2]: https://community.wolfram.com/groups/-/m/t/2567382&#xD;
  [3]: https://community.wolfram.com//c/portal/getImageAttachment?filename=avvideo.gif&amp;amp;userId=68637&#xD;
  [4]: https://community.wolfram.com//c/portal/getImageAttachment?filename=xytspace.png&amp;amp;userId=68637&#xD;
  [5]: https://community.wolfram.com//c/portal/getImageAttachment?filename=8414ytsfromav.png&amp;amp;userId=68637&#xD;
  [6]: https://community.wolfram.com//c/portal/getImageAttachment?filename=5413avfromyts.gif&amp;amp;userId=68637&#xD;
  [7]: https://www.gildshire.com/national-parks-in-the-usa-that-you-should-visit-part-one/&#xD;
  [8]: https://community.wolfram.com//c/portal/getImageAttachment?filename=landcscapevideo.gif&amp;amp;userId=68637&#xD;
  [9]: https://community.wolfram.com//c/portal/getImageAttachment?filename=ytsfromlandscape.png&amp;amp;userId=68637&#xD;
  [10]: https://depositphotos.com/stock-footage/bouncing-balls.html?offset=240&#xD;
  [11]: https://community.wolfram.com//c/portal/getImageAttachment?filename=bouncingballssmall.gif&amp;amp;userId=68637&#xD;
  [12]: https://community.wolfram.com//c/portal/getImageAttachment?filename=ytsfrombouncingballs.png&amp;amp;userId=68637&#xD;
  [13]: https://jake.vision/motionillusionblog/marioReversePhi.mp4&#xD;
  [14]: https://community.wolfram.com//c/portal/getImageAttachment?filename=fullMarioV.gif&amp;amp;userId=68637&#xD;
  [15]: https://community.wolfram.com//c/portal/getImageAttachment?filename=croppedMarioColor.gif&amp;amp;userId=68637&#xD;
  [16]: https://community.wolfram.com//c/portal/getImageAttachment?filename=4806colors.png&amp;amp;userId=68637&#xD;
  [17]: https://community.wolfram.com//c/portal/getImageAttachment?filename=ytsfromcroppedMario.png&amp;amp;userId=68637&#xD;
  [18]: http://persci.mit.edu/pub_pdfs/spatio85.pdf&#xD;
  [19]: https://community.wolfram.com//c/portal/getImageAttachment?filename=5328edgeshiftedytsection.png&amp;amp;userId=68637&#xD;
  [20]: https://community.wolfram.com//c/portal/getImageAttachment?filename=9087mariopic16bars.png&amp;amp;userId=68637&#xD;
  [21]: https://community.wolfram.com//c/portal/getImageAttachment?filename=mario16yts.png&amp;amp;userId=68637&#xD;
  [22]: https://community.wolfram.com//c/portal/getImageAttachment?filename=reverseEngineeredMariobest.gif&amp;amp;userId=68637&#xD;
  [23]: http://clipart-library.com/animal-silhouettes-images.html&#xD;
  [24]: https://community.wolfram.com//c/portal/getImageAttachment?filename=bunnyandrsater.png&amp;amp;userId=68637&#xD;
  [25]: https://community.wolfram.com//c/portal/getImageAttachment?filename=ytsfrombunny.png&amp;amp;userId=68637&#xD;
  [26]: https://community.wolfram.com//c/portal/getImageAttachment?filename=bunnyframes.png&amp;amp;userId=68637&#xD;
  [27]: https://community.wolfram.com//c/portal/getImageAttachment?filename=bunnyVbest.gif&amp;amp;userId=68637&#xD;
  [28]: https://community.wolfram.com//c/portal/getImageAttachment?filename=roosterandraster.png&amp;amp;userId=68637&#xD;
  [29]: https://community.wolfram.com//c/portal/getImageAttachment?filename=ytsfromrooster.png&amp;amp;userId=68637&#xD;
  [30]: https://community.wolfram.com//c/portal/getImageAttachment?filename=roosterframes.png&amp;amp;userId=68637&#xD;
  [31]: https://community.wolfram.com//c/portal/getImageAttachment?filename=roosterV25.gif&amp;amp;userId=68637&#xD;
  [32]: https://community.wolfram.com//c/portal/getImageAttachment?filename=hensAndRooster.gif&amp;amp;userId=68637</description>
    <dc:creator>Erik Mahieu</dc:creator>
    <dc:date>2022-08-31T12:39:44Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/2452694">
    <title>Can you help me navigate an XML tree?</title>
    <link>https://community.wolfram.com/groups/-/m/t/2452694</link>
    <description>I am working on developing a tool in Wolfram Language to correlate user ratings on the website Board Game Geek (BGG, [www.boardgamegeek.com][1]). Users on the site can rate games with a value from 1-10, and my initial goal is to allow someone to check their ratings against those of other users to find other users whose tastes generally match their own.&#xD;
&#xD;
Part of this involves, of course, grabbing all of a user&amp;#039;s rated games. BGG has an API which allows this. To access it, one does this:&#xD;
&#xD;
    userName = &amp;#034;skutsch&amp;#034;;&#xD;
    urlUser = &amp;#034;https://www.boardgamegeek.com/xmlapi2/collection?username=&amp;#034; &amp;lt;&amp;gt; userName &amp;lt;&amp;gt; &amp;#034;&amp;amp;rated=1&amp;#034;;&#xD;
    r1 = Import[urlUser, &amp;#034;XML&amp;#034;];&#xD;
&#xD;
When that call is made, BGG checks if a data file already exists for that user. If so, it serves the data as XML. If not, it sends an HTTP code of 202 and returns a message that it is preparing the data. Accessing the link again a few seconds later usually then results in an HTTP code of 200 and the XML data. (The data is saved by BGG until either the user makes changes to their collection or a number of days pass by. I&amp;#039;ve been hitting these users as test cases so they will probably serve data on the first try.)&#xD;
&#xD;
When it comes to the XML results, I am clueless. I&amp;#039;ve read the documentation for XML in WL and haven&amp;#039;t been able to digest it. &#xD;
&#xD;
The data *very roughly* looks like this:&#xD;
&#xD;
    &amp;lt;items totalitems=&amp;#034;318&amp;#034; ... &amp;gt;&#xD;
      &amp;lt;item objecttype=&amp;#034;thing&amp;#034; objectid=&amp;#034;177590&amp;#034; subtype=&amp;#034;boardgame&amp;#034;...&amp;gt;&#xD;
        &amp;lt;name ...&amp;gt;&#xD;
        &amp;lt;blah&amp;gt;&#xD;
        &amp;lt;blah&amp;gt;&#xD;
        &amp;lt;stats ...&amp;gt;&#xD;
          &amp;lt;rating value=&amp;#034;7.5&amp;#034;&amp;gt;&#xD;
            &amp;lt;blah/&amp;gt;&#xD;
            &amp;lt;blah/&amp;gt;&#xD;
          &amp;lt;/rating&amp;gt;&#xD;
        &amp;lt;/stats&amp;gt;&#xD;
        &amp;lt;blah&amp;gt;&#xD;
      &amp;lt;/item&amp;gt;&#xD;
      &amp;lt;item objecttype=&amp;#034;thing&amp;#034; objectid=&amp;#034;68448&amp;#034; subtype=&amp;#034;boardgame&amp;#034;...&amp;gt;&#xD;
        &amp;lt;name ...&amp;gt;&#xD;
        &amp;lt;blah&amp;gt;&#xD;
        &amp;lt;blah&amp;gt;&#xD;
        &amp;lt;stats ...&amp;gt;&#xD;
          &amp;lt;rating value=&amp;#034;6.5&amp;#034;&amp;gt;&#xD;
            &amp;lt;blah/&amp;gt;&#xD;
            &amp;lt;blah/&amp;gt;&#xD;
          &amp;lt;/rating&amp;gt;&#xD;
        &amp;lt;/stats&amp;gt;&#xD;
        &amp;lt;blah&amp;gt;&#xD;
      &amp;lt;/item&amp;gt;&#xD;
      &amp;lt;...many more items...&amp;gt;&#xD;
    &amp;lt;/items&amp;gt;&#xD;
&#xD;
As I have editorially indicated, I&amp;#039;m only interested in a few values here. What I want to parse out is:&#xD;
&#xD;
 - for every &amp;lt;item&amp;gt; where &amp;lt;item subtype=&amp;#034;boardgame&amp;#034;&amp;gt;:&#xD;
     - get &amp;lt;item objectid=&amp;#034;xxxxx&amp;#034;&amp;gt;&#xD;
     - get &amp;lt;rating value=&amp;#034;yy&amp;#034;&amp;gt;&#xD;
    &#xD;
I was trying to do this in a very brute force matter thusly:&#xD;
&#xD;
        a = &amp;lt;|&amp;#034;gameID&amp;#034; -&amp;gt; Values[r1[[2, 3, i, 2, 2]]], &amp;#034;userName&amp;#034; -&amp;gt; username,&#xD;
           &amp;#034;rating&amp;#034; -&amp;gt; ToExpression @@ Values[r1[[2, 3, i, 3, 5, 3, 1, 2]]]|&amp;gt;&#xD;
&#xD;
basically going to the exact location of the data and iterating through it (i = 1 to &amp;lt;items totalitems=&amp;#034;i&amp;#034;&amp;gt;). Not great, but seemed to work. I&amp;#039;m lazy, so I liked that it kept me from having to figure out the XML.&#xD;
&#xD;
Unfortunately there&amp;#039;s a snag. If you look at the data where userName=&amp;#034;Legomancer&amp;#034;, you hit a problem at item 129 (&amp;lt;item objectid=&amp;#034;1231&amp;#034;&amp;gt;). That item has an additional element that others don&amp;#039;t have:&#xD;
&#xD;
    &amp;lt;item objecttype=&amp;#034;thing&amp;#034; objectid=&amp;#034;1231&amp;#034; subtype=&amp;#034;boardgame&amp;#034; collid=&amp;#034;6163073&amp;#034;&amp;gt;&#xD;
      &amp;lt;name sortindex=&amp;#034;1&amp;#034;&amp;gt;Bandu&amp;lt;/name&amp;gt;&#xD;
      &amp;lt;originalname&amp;gt;Bausack&amp;lt;/originalname&amp;gt;&#xD;
      &amp;lt;yearpublished&amp;gt;1987&amp;lt;/yearpublished&amp;gt;&#xD;
&#xD;
That **&amp;lt;originalname&amp;gt;** element shifts the rest of the fields, wrecking my brainless strategy and throwing an error. So I guess I need to learn how to use XML after all.&#xD;
&#xD;
So while I read up again on XML and knock at it with some trial and error, if anyone could point me towards a path, that would be super helpful. &#xD;
&#xD;
&#xD;
  [1]: http://www.boardgamegeek.com</description>
    <dc:creator>Dave Lartigue</dc:creator>
    <dc:date>2022-01-22T15:26:26Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1757394">
    <title>How to write a time efficient user-defined function with local variables?</title>
    <link>https://community.wolfram.com/groups/-/m/t/1757394</link>
    <description>I want to write a &amp;#039;Gauss&amp;#039; function in my main  program like the way its written in Matlab. In the following example I want to pass the variables (&amp;#039;aar&amp;#039; &amp;amp; &amp;#039;es&amp;#039; are matrices and other are scalars) &amp;#034;aar, es, x1value, x2value, x3value, x4value, y1value, y2value, y3value, y4value&amp;#034; like given below. I want the output to store in detjacobs &amp;amp; Invdetjacobs. Kindly suggest me the correct way.&#xD;
&#xD;
 &#xD;
&#xD;
&#xD;
&#xD;
&#xD;
    [detjacobs, Invdetjacobs] = Gauss[aar, es, x1value, x2value, x3value, x4value, y1value, y2value, y3value, y4value]&#xD;
&#xD;
&#xD;
    Do[&#xD;
    Do[&#xD;
    r = aar[[i]]; s = es[[j]];&#xD;
  &#xD;
  				shape1 = ((1. - r) (1. - s))/4.;&#xD;
  				shape2 = ((1. + r) (1. - s))/4.; &#xD;
                shape3 = ((1. + r) (1. + s))/4.; &#xD;
                shape4 = ((1. - r) (1. + s))/4.;&#xD;
                                          dhdr1 = 1./4. (-1. + s); &#xD;
                                          dhdr2 = (1. - s)/4.;&#xD;
                                          dhdr3 = 1./4. (1. + s); &#xD;
                                          dhdr4 = -(1. + s)/4.;&#xD;
  	                             dhds1 = 1./4. (-1. + r); &#xD;
                                 dhds2 = 1./4. (-1. - r); &#xD;
                                 dhds3 = (1. + r)/4.; &#xD;
                                 dhds4 = (1. - r)/4.;&#xD;
            &#xD;
     detjacobs = {{dhdr1 x1value + dhdr2 x2value + dhdr3 x3value + &#xD;
      dhdr4 x4value, &#xD;
     dhdr1 y1value + dhdr2 y2value + dhdr3 y3value + &#xD;
      dhdr4 y4value}, {dhds1 x1value + dhds2 x2value + dhds3 x3value +&#xD;
       dhds4 x4value, &#xD;
     dhds1 y1value + dhds2 y2value + dhds3 y3value + dhds4 y4value}};&#xD;
&#xD;
    Invdetjacobs = 1/detjacobs;&#xD;
&#xD;
    ,{j,1,4}];&#xD;
&#xD;
    ,{i,1,4}];</description>
    <dc:creator>khaja moinuddin mohammed</dc:creator>
    <dc:date>2019-08-09T11:59:47Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1256480">
    <title>Analysis of the Wolfram Community</title>
    <link>https://community.wolfram.com/groups/-/m/t/1256480</link>
    <description>The Wolfram Community is now ~4.5 years &amp;#039;old&amp;#039;. So time to do some analysis let&amp;#039;s go!&#xD;
&#xD;
Let&amp;#039;s download all the threads-titles, their votes, their authors et cetera:&#xD;
&#xD;
    SetDirectory[NotebookDirectory[]];&#xD;
    $HistoryLength=1;&#xD;
    xml=Import[&amp;#034;http://community.wolfram.com/dashboard/-/discussions-list/all+groups/Any+discussions/none/active/full/10000/1/filter&amp;#034;,&amp;#034;XMLObject&amp;#034;];&#xD;
    Export[&amp;#034;website.mx&amp;#034;,xml]&#xD;
&#xD;
This will save that output to `website.mx` file next to your notebook.&#xD;
&#xD;
Here is a small function that extract the relevant data:&#xD;
&#xD;
    ClearAll[GetThreadProperties]&#xD;
    GetThreadProperties[threadxml_]:=Module[{url,title,creator,creatorurl,views,replies,votes},&#xD;
        {url,title}=FirstCase[threadxml,XMLElement[&amp;#034;h3&amp;#034;,{&amp;#034;class&amp;#034;-&amp;gt;&amp;#034;asset-title&amp;#034;},{_,XMLElement[&amp;#034;a&amp;#034;,{&amp;#034;shape&amp;#034;-&amp;gt;&amp;#034;rect&amp;#034;,&amp;#034;href&amp;#034;-&amp;gt;url_},{title_}],_}]:&amp;gt;{url,title},{Missing[],Missing[]},\[Infinity]];&#xD;
        {creator,creatorurl}=FirstCase[threadxml,XMLElement[&amp;#034;span&amp;#034;,{&amp;#034;class&amp;#034;-&amp;gt;&amp;#034;metadata-entry&amp;#034;},{_,XMLElement[&amp;#034;span&amp;#034;,{&amp;#034;class&amp;#034;-&amp;gt;&amp;#034;asset-meta-bold&amp;#034;},{&amp;#034;CREATED BY: &amp;#034;}],_,XMLElement[&amp;#034;span&amp;#034;,{&amp;#034;class&amp;#034;-&amp;gt;&amp;#034;asset-meta-normal&amp;#034;},{_,XMLElement[&amp;#034;a&amp;#034;,{&amp;#034;shape&amp;#034;-&amp;gt;&amp;#034;rect&amp;#034;,&amp;#034;href&amp;#034;-&amp;gt;creatorprofileurl_},{creator_}],_}],_}]:&amp;gt;{creator,creatorprofileurl},{Missing[],Missing[]},\[Infinity]];&#xD;
        views=FirstCase[threadxml,XMLElement[&amp;#034;div&amp;#034;,{&amp;#034;class&amp;#034;-&amp;gt;&amp;#034;views stats&amp;#034;},{_,XMLElement[&amp;#034;div&amp;#034;,{&amp;#034;class&amp;#034;-&amp;gt;_},{views_}],_,XMLElement[&amp;#034;div&amp;#034;,{&amp;#034;class&amp;#034;-&amp;gt;_},{&amp;#034;VIEWS&amp;#034;}],_}]:&amp;gt;views,Missing[],\[Infinity]];&#xD;
        replies=FirstCase[threadxml,XMLElement[&amp;#034;div&amp;#034;,{&amp;#034;class&amp;#034;-&amp;gt;&amp;#034;replies stats&amp;#034;},{_,XMLElement[&amp;#034;div&amp;#034;,{&amp;#034;class&amp;#034;-&amp;gt;_},{replies_}],_,XMLElement[&amp;#034;div&amp;#034;,{&amp;#034;class&amp;#034;-&amp;gt;_},{&amp;#034;REPLIES&amp;#034;}],_}]:&amp;gt;replies,Missing[],\[Infinity]];&#xD;
        votes=FirstCase[threadxml,XMLElement[&amp;#034;div&amp;#034;,{&amp;#034;class&amp;#034;-&amp;gt;&amp;#034;votes stats&amp;#034;},{_,XMLElement[&amp;#034;div&amp;#034;,{&amp;#034;class&amp;#034;-&amp;gt;_},{votes_}],_,XMLElement[&amp;#034;div&amp;#034;,{&amp;#034;class&amp;#034;-&amp;gt;_},{&amp;#034;VOTES&amp;#034;}],_}]:&amp;gt;votes,Missing[],\[Infinity]];&#xD;
        views=If[StringEndsQ[views,&amp;#034;K&amp;#034;],1000ToExpression[StringDrop[views,-1]],ToExpression@views];&#xD;
        replies=If[StringEndsQ[replies,&amp;#034;K&amp;#034;],1000ToExpression[StringDrop[replies,-1]],ToExpression@replies];&#xD;
        votes=If[StringEndsQ[votes,&amp;#034;K&amp;#034;],1000ToExpression[StringDrop[votes,-1]],ToExpression@votes];&#xD;
        &amp;lt;|&amp;#034;url&amp;#034;-&amp;gt;url,&amp;#034;title&amp;#034;-&amp;gt;title,&amp;#034;creator&amp;#034;-&amp;gt;creator,&amp;#034;views&amp;#034;-&amp;gt;views,&amp;#034;replies&amp;#034;-&amp;gt;replies,&amp;#034;votes&amp;#034;-&amp;gt;votes,&amp;#034;createrurl&amp;#034;-&amp;gt;creatorurl|&amp;gt;&#xD;
    ]&#xD;
&#xD;
Import the data from the mx file, and then get the relevant values from it using the above function, store in a dataset:&#xD;
&#xD;
    tmp=Import[&amp;#034;website.mx&amp;#034;];&#xD;
    tmp=Cases[tmp,XMLElement[&amp;#034;div&amp;#034;,{&amp;#034;class&amp;#034;-&amp;gt;&amp;#034;asset-abstract default-asset-publisher&amp;#034;,&amp;#034;style&amp;#034;-&amp;gt;_},___],\[Infinity]];&#xD;
    ds=Dataset[GetThreadProperties/@tmp];&#xD;
&#xD;
Here an example:&#xD;
&#xD;
![enter image description here][1]&#xD;
&#xD;
Let&amp;#039;s start simple and get the number of threads, the number of views, votes, and replies:&#xD;
&#xD;
    Length[ds]&#xD;
    ds[Total,{&amp;#034;views&amp;#034;,&amp;#034;votes&amp;#034;,&amp;#034;replies&amp;#034;}]&#xD;
&#xD;
![enter image description here][2]&#xD;
&#xD;
Nearly 8000 topics and nearing 15 mega-views!&#xD;
&#xD;
Let&amp;#039;s check the number of replies for each topic:&#xD;
&#xD;
    ListLogPlot[Tally[Normal[ds[All, &amp;#034;replies&amp;#034;]]], AxesLabel -&amp;gt; {&amp;#034;Number of replies&amp;#034;, &amp;#034;Number of threads&amp;#034;}]&#xD;
&#xD;
giving:&#xD;
&#xD;
![enter image description here][3]&#xD;
&#xD;
We can also plot the number of votes vs rank:&#xD;
&#xD;
    ListLogLogPlot[Flatten[Normal[Values[ds[Reverse@*SortBy[#votes&amp;amp;]][All,{&amp;#034;votes&amp;#034;}]]]],PlotRange-&amp;gt;All,AxesLabel-&amp;gt;{&amp;#034;Rank&amp;#034;,&amp;#034;Number of votes&amp;#034;},PlotMarkers-&amp;gt;{Automatic,Medium}]&#xD;
&#xD;
![enter image description here][4]&#xD;
&#xD;
Let&amp;#039;s look into my posts:&#xD;
&#xD;
    ds[Select[#creator==&amp;#034;Sander Huisman&amp;#034;&amp;amp;]/*Reverse@*SortBy[#votes&amp;amp;]]&#xD;
&#xD;
![enter image description here][5]&#xD;
&#xD;
I&amp;#039;m very happy to see some of my posts got ~50 votes. &#xD;
&#xD;
Let&amp;#039;s have a look at the authors, who is the most active in making threads:&#xD;
&#xD;
    data=SortBy[Tally[Flatten[Normal[Values[ds[[All,{&amp;#034;creator&amp;#034;}]]]]]],Minus@*Last][[;;50]];&#xD;
    BarChart[Association[Rule@@@Reverse@data],ChartLabels-&amp;gt;Automatic,BarOrigin-&amp;gt;Left,Frame-&amp;gt;True,PerformanceGoal-&amp;gt;&amp;#034;Speed&amp;#034;,AspectRatio-&amp;gt;GoldenRatio/2,ChartStyle-&amp;gt;Directive[EdgeForm[{Thickness[Medium],Black,Opacity[1]}],RGBColor[0,0.5,1]],FrameStyle-&amp;gt;Black,FrameTicks-&amp;gt;{{Automatic,Automatic},{All,All}},ImageSize-&amp;gt;650,PlotRange-&amp;gt;{0,160},PlotRangePadding-&amp;gt;{None,{None,Scaled[0.01]}},BarSpacing-&amp;gt;None,PlotLabel-&amp;gt;Style[&amp;#034;Number of threads&amp;#034;,16,Black]]&#xD;
&#xD;
![enter image description here][6]&#xD;
&#xD;
[@Clayton Shonkwiler][at0] is by far the author with the most posts.&#xD;
&#xD;
We can also check by number of votes:&#xD;
&#xD;
    BarChart[Sort[GroupBy[Normal[Values[ds[[All,{&amp;#034;creator&amp;#034;,&amp;#034;votes&amp;#034;}]]]],First-&amp;gt;Last,Total]][[-100;;]],ChartLabels-&amp;gt;Automatic,BarOrigin-&amp;gt;Left,Frame-&amp;gt;True,PerformanceGoal-&amp;gt;&amp;#034;Speed&amp;#034;,ScalingFunctions-&amp;gt;&amp;#034;Log&amp;#034;,AspectRatio-&amp;gt;GoldenRatio,ChartStyle-&amp;gt;Directive[EdgeForm[{Thickness[Medium],Black,Opacity[1]}],RGBColor[0,0.5,1]],FrameStyle-&amp;gt;Black,FrameTicks-&amp;gt;{{Automatic,Automatic},{All,All}},ImageSize-&amp;gt;650,PlotRange-&amp;gt;{20,3000},PlotRangePadding-&amp;gt;{None,{None,Scaled[0.01]}},PlotLabel-&amp;gt;Style[&amp;#034;Total number of votes&amp;#034;,16,Black]]&#xD;
&#xD;
![enter image description here][7]&#xD;
&#xD;
I was surprised to see I end up second in this list!&#xD;
&#xD;
Finally let&amp;#039;s make a word cloud of the topic-titles:&#xD;
&#xD;
    WordCloud[ToLowerCase[StringRiffle[Flatten[Normal[Values[ds[[All,{&amp;#034;title&amp;#034;}]]]]]]],MaxItems-&amp;gt;150]&#xD;
&#xD;
![enter image description here][8]&#xD;
&#xD;
Hope you enjoyed this little exploration, even further analysis would be to download all the threads, but that would be quite the undertaking without access to the database directly&#xD;
&#xD;
 [at0]: http://community.wolfram.com/web/claytonshonkwiler&#xD;
&#xD;
&#xD;
  [1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2018-01-01at23.08.20.png&amp;amp;userId=73716&#xD;
  [2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2018-01-01at23.09.59.png&amp;amp;userId=73716&#xD;
  [3]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2018-01-01at23.12.56.png&amp;amp;userId=73716&#xD;
  [4]: http://community.wolfram.com//c/portal/getImageAttachment?filename=rank.png&amp;amp;userId=73716&#xD;
  [5]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2018-01-01at23.16.41.png&amp;amp;userId=73716&#xD;
  [6]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2018-01-01at23.18.32.png&amp;amp;userId=73716&#xD;
  [7]: http://community.wolfram.com//c/portal/getImageAttachment?filename=1517out.png&amp;amp;userId=73716&#xD;
  [8]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2018-01-01at23.22.11.png&amp;amp;userId=73716</description>
    <dc:creator>Sander Huisman</dc:creator>
    <dc:date>2018-01-01T22:27:37Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/813769">
    <title>Visualizing data of Leonardo DiCaprio movies</title>
    <link>https://community.wolfram.com/groups/-/m/t/813769</link>
    <description>In this post I show how to create this [BubbleChart][1] representing the average words/minute and rating of the movie (the bigger the diameter of the bubble is, the better is the movie) and also show a simple way of building story flow visualization with [SmoothHistogram][2]. For the story flow you can take a look at this short tutorial [Story Flow in Alice][3] or even try coding it in a few lines in [**open cloud**][4].&#xD;
&#xD;
![enter image description here][5]&#xD;
&#xD;
![enter image description here][6]&#xD;
&#xD;
Finally last Sunday [Leonardo DiCaprio][7] won his first Oscar with &amp;#034;The Revenant&amp;#034;. He did many other great movies before, but the golden statuette always escaped from his hands. Here I will try to visualize his career trajectory by comparing his movies.&#xD;
&#xD;
In order to compare his movies I will use three variables for each movie: the year of its release, the average words/minute and its rating (taken from [IMDb][8]).&#xD;
&#xD;
The first thing that we need to do is to import the script of each movie (you can download the english subtitles in many sites). Let&amp;#039;s import the ones for [&amp;#034;Inception&amp;#034;][9]:&#xD;
&#xD;
    SetDirectory[NotebookDirectory[]];    &#xD;
    srt = Import[&amp;#034;inception-yify-english.srt&amp;#034;, &amp;#034;Text&amp;#034;];&#xD;
The format of the script is the following:&#xD;
&#xD;
    &amp;#034;21&#xD;
    00:03:15,486 --&amp;gt; 00:03:18,447&#xD;
    Yes. In the dream state,&#xD;
    your conscious defenses are lowered...&#xD;
    &#xD;
    22&#xD;
    00:03:18,615 --&amp;gt; 00:03:21,033&#xD;
    ...and that makes your thoughts&#xD;
    vulnerable to theft.&amp;#034;&#xD;
So, we need to do some text processing in order to get a string with all words only:&#xD;
&#xD;
    partitions = StringSplit[srt, &amp;#034;\n&amp;#034;];&#xD;
    blocks = Flatten[Position[StringSplit[srt, &amp;#034;\n&amp;#034;], &amp;#034;&amp;#034;]];&#xD;
    script = Flatten[Table[Table[i, {i, blocks[[j]] + 3, blocks[[j + 1]] - 1}], {j, Length[blocks] - 1}]];&#xD;
    stringsrt =  StringDelete[StringJoin[Flatten[Map[partitions[[#]] &amp;amp;, script]]], {Shortest[  &amp;#034;[&amp;#034; ~~ x___ ~~ &amp;#034;]&amp;#034;]}];&#xD;
Now, we can do for example a [WordCloud][10] of the movie:&#xD;
&#xD;
    WordCloud[DeleteStopwords[stringsrt], ScalingFunctions -&amp;gt; (#^.1 &amp;amp;)]&#xD;
&#xD;
![enter image description here][11]&#xD;
&#xD;
But what we actually want is the StringLength of the script, so we can estimate the average words/minute later on:&#xD;
&#xD;
    StringLength[stringsrt]&#xD;
    68719&#xD;
&#xD;
Repeating the same for the rest of the movies, we can finally create the [BubbleChart][12] that appears on top of the page:&#xD;
&#xD;
    bubbleChart = Framed[Labeled[BubbleChart[&amp;lt;|&amp;#034;This Boy&amp;#039;s Life 7.3&amp;#034; -&amp;gt; {1993, 45901/(4.79 115), 7.3},&#xD;
         &amp;#034;What&amp;#039;s Eating Gilbert Grape 7.8&amp;#034; -&amp;gt; {1993, 45000/(4.79 118), 7.8},&#xD;
         &amp;#034;The Basketball Diaries 7.3&amp;#034; -&amp;gt; {1995, 45996/(4.79 102), 7.3},&#xD;
         &amp;#034;Total Eclipse 6.5&amp;#034; -&amp;gt; {1995, 29078/(4.79 111), 6.5},&#xD;
         &amp;#034;Romeo+Juliet 6.8&amp;#034; -&amp;gt; {1996, 41022/(4.79 120), 6.8},&#xD;
         &amp;#034;Titanic 7.7&amp;#034; -&amp;gt; {1997, 64681/(4.79 194), 7.7},&#xD;
         &amp;#034;The Man in the Iron Mask 6.4&amp;#034; -&amp;gt; {1998, 34450/(4.79 132), 6.4},&#xD;
         &amp;#034;The Beach 6.6&amp;#034; -&amp;gt; {2000, 42965/(4.79 119), 6.6},&#xD;
         &amp;#034;Gangs of New York 7.5&amp;#034; -&amp;gt; {2002, 53011/(4.79 167), 7.5},&#xD;
         &amp;#034;Catch Me If You Can 8.0&amp;#034; -&amp;gt; {2002, 62683/(4.79 141), 8.0},&#xD;
         &amp;#034;The Aviator 7.5&amp;#034; -&amp;gt; {2004, 83739/(4.79 170), 7.5},&#xD;
         &amp;#034;The Departed 8.5&amp;#034; -&amp;gt; {2006, 74151/(4.79 151), 8.5},&#xD;
         &amp;#034;Blood Diamond 8.0&amp;#034; -&amp;gt; {2006, 49529/(4.79 143), 8.0},&#xD;
         &amp;#034;Body of Lies 7.1&amp;#034; -&amp;gt; {2008, 58444/(4.79 128), 7.1},&#xD;
         &amp;#034;Revolutionary Road 7.3&amp;#034; -&amp;gt; {2008, 45111/(4.79 119), 7.3},&#xD;
         &amp;#034;Shutter Island 8.1&amp;#034; -&amp;gt; {2010, 55156/(4.79 138), 8.1},&#xD;
         &amp;#034;Inception 8.8&amp;#034; -&amp;gt; {2010, 61824/(4.79 148), 8.8},&#xD;
         &amp;#034;J. Edgar 6.6&amp;#034; -&amp;gt; {2011, 75697/(4.79 137), 6.6},&#xD;
         &amp;#034;The Revenant 8.2&amp;#034; -&amp;gt; {2016, 29250/(4.79 156), 8.2},&#xD;
         &amp;#034;Django Unchained 8.5&amp;#034; -&amp;gt; {2012, 68719/(4.79 165), 8.5},&#xD;
         &amp;#034;The Great Gatsby 7.3&amp;#034; -&amp;gt; {2013, 67586/(4.79 143), 7.3},&#xD;
         &amp;#034;The Wolf of Wall Street 8.2&amp;#034; -&amp;gt; {2013, 128803/(4.79 180), 8.2}&#xD;
         |&amp;gt;,&#xD;
        ChartLabels -&amp;gt; Automatic,&#xD;
        ChartStyle -&amp;gt; {RGBColor[0.915, 0.3325, 0.2125, 0.89], RGBColor[&#xD;
          1, 0.75, 0, 0.92], RGBColor[&#xD;
          0.28026441037696703`, 0.715, 0.4292089322474965, 0.93], &#xD;
          RGBColor[0.363898, 0.618501, 0.782349], RGBColor[&#xD;
          0.40082222609352647`, 0.5220066643438841, 0.85, 0.92], RGBColor[&#xD;
          0.528488, 0.470624, 0.701351, 0.9], RGBColor[1, 0.58, 0, 0.89], &#xD;
          RGBColor[0.647624, 0.37816, 0.614037, 0.9400000000000001], &#xD;
          RGBColor[0.40082222609352647`, 0.75, 0.85, 0.87], RGBColor[&#xD;
          0.736782672705901, 0.358, 0.5030266573755369, &#xD;
           0.9400000000000001], RGBColor[&#xD;
          0.8200000000000001, 0.09, 0.89, 0.81]},&#xD;
        PlotTheme -&amp;gt; &amp;#034;Detailed&amp;#034;,&#xD;
        ImageSize -&amp;gt; 1300,&#xD;
        BubbleSizes -&amp;gt; {0.05, 0.3},&#xD;
        Background -&amp;gt; RGBColor[0.29, 0.29, 0.29, 0.97],&#xD;
        FrameLabel -&amp;gt; {Style[&amp;#034;Year&amp;#034;, 24, Bold], &#xD;
          Style[&amp;#034;words / minute&amp;#034;, 24, Bold]},&#xD;
        LabelStyle -&amp;gt; {RGBColor[0.93, 0.93, 0.93, 0.97], 14, &#xD;
          FontFamily -&amp;gt; &amp;#034;Helvetica&amp;#034;, Bold}], &#xD;
       Style[&amp;#034;Leonardo DiCaprio Movies&amp;#034;, 30, RGBColor[1, 0.86, 0, 0.85], &#xD;
        FontFamily -&amp;gt; &amp;#034;Helvetic&amp;#034;, Bold], Top], FrameMargins -&amp;gt; 25, &#xD;
      Background -&amp;gt; RGBColor[0.27, 0.27, 0.27, 0.97]]&#xD;
&#xD;
 &#xD;
&#xD;
&#xD;
  [1]: http://reference.wolfram.com/language/ref/BubbleChart.html&#xD;
  [2]: http://reference.wolfram.com/language/ref/SmoothHistogram.html&#xD;
  [3]: https://www.youtube.com/watch?v=IDr3iX7h6Qc&#xD;
  [4]: https://www.wolfram.com/programming-lab/explorations/story-flow-in-alice/&#xD;
  [5]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Leo_DiCaprio.gif&amp;amp;userId=95400&#xD;
  [6]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2016-03-02at9.04.02.png&amp;amp;userId=95400&#xD;
  [7]: https://www.wolframalpha.com/input/?i=leonardo%20dicaprio&#xD;
  [8]: http://www.imdb.com/&#xD;
  [9]: https://www.wolframalpha.com/input/?i=inception&amp;amp;assumption=ClashPrefs_*Movie.Inception2010WarnerBrosPictures-&#xD;
  [10]: https://reference.wolfram.com/language/ref/WordCloud.html&#xD;
  [11]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2016-03-01at14.32.07.png&amp;amp;userId=95400&#xD;
  [12]: http://reference.wolfram.com/language/ref/BubbleChart.html</description>
    <dc:creator>Jofre Espigule-Pons</dc:creator>
    <dc:date>2016-03-01T12:41:56Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/558518">
    <title>What can you do with MoMa dataset ?</title>
    <link>https://community.wolfram.com/groups/-/m/t/558518</link>
    <description>I have recently visited [MoMa][1] (The Museum of Modern Art) in New York City, I always keep coming back there. To my surprise they have recently created an [official MoMa GitHub][2] account hosting data of their art collection, some basic metadata for each work, including title, artist, date made, medium, dimensions, and date acquired by the Museum. &#xD;
&#xD;
**How can we visualize and process MoMa data? What could we learn from this dataset? - please share your ideas**&#xD;
&#xD;
Below a simple stab at the topics of titles of the dataset.&#xD;
&#xD;
1. Import data:&#xD;
&#xD;
        moma = SemanticImport[&amp;#034;https://raw.githubusercontent.com/MuseumofModernArt/collection/master/Artworks.csv&amp;#034;]&#xD;
&#xD;
    ![enter image description here][3]&#xD;
&#xD;
2. Get the titles colum:&#xD;
&#xD;
        titles = Normal[moma[All, &amp;#034;Title&amp;#034;]];&#xD;
&#xD;
3. Make single string, DeleteStopwords, get TextWords and remove all words shorter than 4 characters. Build WoedCloud:&#xD;
&#xD;
        str = StringJoin[titles];&#xD;
        words = TextWords[DeleteStopwords[str]];&#xD;
        filt = Select[words, StringLength[#] &amp;gt; 3 &amp;amp;];&#xD;
        WordCloud[filt]&#xD;
&#xD;
    ![enter image description here][4]&#xD;
&#xD;
Hmmm.. I just have realized i can check who are most popular artists in the collection:&#xD;
&#xD;
    artist = Normal[moma[[All, &amp;#034;Artist&amp;#034;]]];&#xD;
    WordCloud[artist]&#xD;
&#xD;
![enter image description here][5]&#xD;
&#xD;
So the 8 top runners are:&#xD;
&#xD;
    leads = Sort[Tally[artist], #1[[2]] &amp;lt; #2[[2]] &amp;amp;][[-8 ;;]];&#xD;
    leads // TableForm&#xD;
&#xD;
![enter image description here][6]&#xD;
&#xD;
And now clouds about people in the cloud ;-) with WikipediaData (skipping unknown and blank):&#xD;
&#xD;
    WordCloud[DeleteStopwords[WikipediaData[#]]] &amp;amp; /@ leads[[All, 1]][[{1, 2, 4, 6, 7, 8}]]&#xD;
&#xD;
![enter image description here][7]&#xD;
&#xD;
&#xD;
&#xD;
&#xD;
Update due to Michael&amp;#039;s comment below:&#xD;
--------------&#xD;
&#xD;
Michael, thanks for the link. I really liked the idea of &amp;#034;modern&amp;#034; in MoMa. If this is a museum of &amp;#034;modern&amp;#034; art then it should modernize its collection pretty quickly moving with the step of time. In the dataset we infromation about dates of the creation (by artist) and acquisition (by MoMa) of the art. I got this visuals to inform us (points are creation-acquisition years pairs ):&#xD;
&#xD;
![enter image description here][112]&#xD;
&#xD;
![enter image description here][113]&#xD;
&#xD;
Now what are they and how to build them.  But we will have to clean the data. Lets use regular import now:&#xD;
&#xD;
    moma = Import[&amp;#034;https://raw.githubusercontent.com/MuseumofModernArt/collection/master/Artworks.csv&amp;#034;];&#xD;
&#xD;
The length of an entry is 14&#xD;
&#xD;
    Length@moma[[1]]&#xD;
`14`&#xD;
&#xD;
for exactly these categories:&#xD;
&#xD;
    moma[[1]] // Column&#xD;
&#xD;
![enter image description here][111]&#xD;
&#xD;
So out of &#xD;
&#xD;
    moma // Length&#xD;
`137382`&#xD;
&#xD;
entries we keep only ones of the length 14 to avoid missing date entries:&#xD;
&#xD;
    momaLE = Select[moma[[2 ;; -1]], Length[#] == 14 &amp;amp;];&#xD;
    momaLE // Length&#xD;
`112407`&#xD;
&#xD;
Now we get only columns 4 and 11 for creation and acquisition dates. And turn everything to strings: &#xD;
&#xD;
    momaDaStr = ParallelMap[ToString, momaLE[[All, {4, 11}]], {2}];&#xD;
&#xD;
so out of the form&#xD;
&#xD;
    momaDaStr[[;; 6]]&#xD;
`{{&amp;#034;1896&amp;#034;, &amp;#034;1996-04-09&amp;#034;}, {&amp;#034;1987&amp;#034;, &amp;#034;1995-01-17&amp;#034;}, {&amp;#034;1903&amp;#034;,  &amp;#034;1997-01-15&amp;#034;},&#xD;
 {&amp;#034;1980&amp;#034;, &amp;#034;1995-01-17&amp;#034;}, {&amp;#034;1903&amp;#034;,  &amp;#034;1997-01-15&amp;#034;}, {&amp;#034;1976-77&amp;#034;, &amp;#034;1995-01-17&amp;#034;}}`&#xD;
&#xD;
it is easy just to grab first 4 characters of the year only (but first we have to get only those strings which are at least 4 characters):&#xD;
&#xD;
    momaYear = Select[momaDaStr, StringLength[#[[1]]] &amp;gt; 3 &amp;amp;&amp;amp; StringLength[#[[2]]] &amp;gt; 3 &amp;amp;];&#xD;
    yeye = ParallelMap[StringTake[#, 4] &amp;amp;, momaYear];&#xD;
&#xD;
Now get only number-strings and turn them into numbers:&#xD;
&#xD;
    numb = Select[yeye, StringMatchQ[#[[1]], NumberString] &amp;amp;&amp;amp; StringMatchQ[#[[2]], NumberString] &amp;amp;];&#xD;
    pairs = ToExpression[ numb];&#xD;
&#xD;
Alas we left with only:&#xD;
&#xD;
    pairs // Length&#xD;
`86987`&#xD;
&#xD;
entries. Still a lot. Taking random sample of a few 1000s of entries makes a better visual:&#xD;
&#xD;
    ListPlot[RandomSample[pairs, 5000], PlotTheme -&amp;gt; &amp;#034;Marketing&amp;#034;, &#xD;
     BaseStyle -&amp;gt; 15, PlotStyle -&amp;gt; Opacity[.3], AspectRatio -&amp;gt; Automatic]&#xD;
&#xD;
![enter image description here][112]&#xD;
&#xD;
But perhaps we need to see where the most points are concentrated so we use smooth kernel distribution and indeed a lot of entries line up tight to the 1-to-1 correspondence between acquisition and creation dates, that&amp;#039;s the slanted edge:&#xD;
&#xD;
    Show[&#xD;
       SmoothDensityHistogram[#, PlotRangePadding -&amp;gt; 0,  GridLines -&amp;gt; Automatic],&#xD;
       Graphics[{Opacity[.7], Point[#]}],&#xD;
       AspectRatio -&amp;gt; Automatic] &amp;amp;@RandomSample[pairs, 5000]&#xD;
&#xD;
![enter image description here][113]&#xD;
&#xD;
We can compute average delay in acquisition - it is about 30 years:&#xD;
&#xD;
    -Subtract @@@ pairs // Mean // N&#xD;
`27.53`&#xD;
&#xD;
What do we do next?&#xD;
&#xD;
&#xD;
  [111]: /c/portal/getImageAttachment?filename=7463ScreenShot2015-09-02at7.29.31PM.png&amp;amp;userId=11733&#xD;
  [112]: /c/portal/getImageAttachment?filename=sdfq456thwrtafgewgf.png&amp;amp;userId=11733&#xD;
  [113]: /c/portal/getImageAttachment?filename=y56gq5465whrdfaqredgfhs.png&amp;amp;userId=11733&#xD;
&#xD;
&#xD;
  [1]: http://www.moma.org/&#xD;
  [2]: https://github.com/MuseumofModernArt&#xD;
  [3]: /c/portal/getImageAttachment?filename=6683546trg6w5htregar.png&amp;amp;userId=11733&#xD;
  [4]: /c/portal/getImageAttachment?filename=4vb4qc56vecasdvshvgd.png&amp;amp;userId=11733&#xD;
  [5]: /c/portal/getImageAttachment?filename=sdf5trwhbdfsafbvfdf4rge.png&amp;amp;userId=11733&#xD;
  [6]: /c/portal/getImageAttachment?filename=ScreenShot2015-09-02at12.31.39PM.png&amp;amp;userId=11733&#xD;
  [7]: /c/portal/getImageAttachment?filename=fdsarteyhrsbdfC.png&amp;amp;userId=11733</description>
    <dc:creator>Vitaliy Kaurov</dc:creator>
    <dc:date>2015-09-02T16:59:03Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/2638404">
    <title>[WTC22] Wolfram arts community &amp;amp; Tech Conference questionnaire</title>
    <link>https://community.wolfram.com/groups/-/m/t/2638404</link>
    <description>Hi all, &#xD;
&#xD;
This Fall, I&amp;#039;ve been teaching artists and designers at the Rhode Island School of Design how to use Mathematica for creative coding and fine art making. I&amp;#039;ll be presenting what I&amp;#039;ve seen from my students at WTC in a couple weeks and put some questions together to learn more about the arts community here and perhaps include some of your responses in my presentation. If you&amp;#039;re willing, share your thoughts below. Thanks in advance!   &#xD;
&#xD;
 1. Mathematica has a small but active visual arts community. How have you seen the usage of Mathematica as an art medium grow over time? What changes have you seen from your perspective?&#xD;
&#xD;
 2. Whether it&amp;#039;s showing off a beautiful pattern or an attempt to capture a more complicated feeling from a unique perspective, we call both results “art”. How do you distinguish art being made in Mathematica between craft art and fine art? What does each share with the greater public?&#xD;
&#xD;
 3. What has surprised you about the ways Mathematica is being used in creative fields like art and design?&#xD;
&#xD;
 4. It doesn’t take long in the Mathematica visual arts community to learn the names of [Clayton Shonkwiler][1], [Henry Segerman][2], [Erik Mahieu][3], and [Silvia Hao][4]. What other names or projects come to mind when you think of &amp;#034;Mathematica + Art”?&#xD;
&#xD;
 5. Do you think the practice of art and visual creativity by scientists and mathematicians improves the visual communication standards of the STEM fields as a whole, making us all better at understanding and sharing information visually? &#xD;
&#xD;
 6. [For the Wolfram staff] There is a clear appreciation at Wolfram for aesthetics and design. You can see it in the elegance of powerful functions, in-line equation typesetting, the “Neat Examples” section in documentation, and even the promotion of Mathematica through tweetable code emphasizes patterns and visually interesting graphics. What does art or a more emotive relationship with math and science mean to Wolfram?&#xD;
&#xD;
 7. What other thoughts have these questions brought to the surface for you?&#xD;
&#xD;
&#xD;
  [1]: https://community.wolfram.com/web/claytonshonkwiler&#xD;
  [2]: http://www.segerman.org/&#xD;
  [3]: https://community.wolfram.com/web/erikmahieu&#xD;
  [4]: https://community.wolfram.com/web/wyelen</description>
    <dc:creator>Jack Madden</dc:creator>
    <dc:date>2022-10-07T22:03:35Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/2103451">
    <title>Error while using DeleteMissing?</title>
    <link>https://community.wolfram.com/groups/-/m/t/2103451</link>
    <description>Hi, I just joined the Wolfram community and was trying out Mathematica for mapping and research purposes. I came across a very help guide to making historical animated maps, however I am encountering issues when I try to implement it. I&amp;#039;m pasting the code below and as I am a beginner, any help would be appreciated. I really want to benefit and enjoy from this platform.&#xD;
&#xD;
Thanks, &#xD;
&#xD;
Shahmir</description>
    <dc:creator>shahmir nawaz</dc:creator>
    <dc:date>2020-10-28T07:54:37Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1900563">
    <title>Labelling vertices, edges, &amp;amp; faces of polyhedra?</title>
    <link>https://community.wolfram.com/groups/-/m/t/1900563</link>
    <description>I am looking through the documentation on V 12 for a way to label vertices, edges, and faces on polyhedra. (In specific I am trying to make tetrahedra that look like this.)&#xD;
&#xD;
How do I make this happen?&#xD;
&#xD;
![enter image description here][1]&#xD;
&#xD;
&#xD;
  [1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=IMG_7435.jpeg&amp;amp;userId=1518292</description>
    <dc:creator>Kathryn Cramer</dc:creator>
    <dc:date>2020-03-18T06:57:17Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1136926">
    <title>[WSS17] Patent Claims Analytics</title>
    <link>https://community.wolfram.com/groups/-/m/t/1136926</link>
    <description>Project on GitHub: https://github.com/lne817/WSS-17 &#xD;
&#xD;
----------&#xD;
&#xD;
&#xD;
Patent Claims Analytics&#xD;
=======================&#xD;
&#xD;
&#xD;
&#xD;
&#xD;
----------&#xD;
&#xD;
&#xD;
Patent claims are formally worded statements within a patent application or patent, which clearly explain the invention, and define the scope of the invention. In order to enforce the full scope of a patent, it is imperative for inventors, firms, and companies to make sure that the patent&amp;#039;s scope is not covered by prior publications and competitors&amp;#039; patents (referred to as &amp;#034;prior art&amp;#034;) available in the public domain. For this reason, most companies with a patent portfolio spend a substantial amount of resources in searching for potentially troubling prior art. Therefore, this project is a first step to optimize this process and offers an analytic tool to better categorize and analyze the relationship between a granted patent with other patents by clustering them based on claim term frequency.&#xD;
&#xD;
&#xD;
&#xD;
&#xD;
 &#xD;
---------&#xD;
&#xD;
**Constructing Patent Analysis Dataset**&#xD;
&#xD;
&#xD;
&#xD;
Patent grant full text (without images) from USPTO Bulk Data Storage System (https://bulkdata.uspto.gov) are downloaded as zip files and extracted into xml files. Each patent is parsed by separating with headings of xml files and parsed. For each patent, patent information including the patent number, title, number of claims, claim text, three most frequently used words is extracted.&#xD;
&#xD;
    parsePatent[files_, numberOfPatents: (n_?IntegerQ /; Positive[n])|All, streamPosition_ : 0] :=&#xD;
    	Module[&#xD;
    		{patentsStream, patent},&#xD;
    		patentsStream = OpenRead[files];&#xD;
    		SetStreamPosition[patentsStream, streamPosition];&#xD;
    		Do[readPatent[Find[patentsStream, &amp;#034;&amp;lt;doc-number&amp;gt;&amp;#034;,&#xD;
    			RecordSeparators -&amp;gt; {{&amp;#034;&amp;lt;?xml version=\&amp;#034;1.0\&amp;#034; encoding=\&amp;#034;UTF-8\&amp;#034;?&amp;gt;&amp;#034;}, {&amp;#034;&amp;lt;/us-patent-grant&amp;gt;&amp;#034;}}]], numberOfPatents];&#xD;
    		Close[patentsStream];&#xD;
    	]&#xD;
    &#xD;
    readPatent[patent_] :=&#xD;
    	Module[&#xD;
    		{patentStream, patentInfoList, patentInfoRaw, patentInfo, claimsRaw, claims, words},&#xD;
    		patentStream = StringToStream[patent];&#xD;
    		patentInfoList = {&amp;#034;&amp;lt;doc-number&amp;gt;&amp;#034;, &amp;#034;&amp;lt;invention-title id=&amp;#034;, &amp;#034;&amp;lt;number-of-claims&amp;gt;&amp;#034;};&#xD;
    		patentInfoRaw = Find[patentStream, #] &amp;amp; /@ patentInfoList;&#xD;
    		patentInfo = StringReplace[patentInfoRaw, Shortest[&amp;#034;&amp;lt;&amp;#034;~~__~~&amp;#034;&amp;gt;&amp;#034;] -&amp;gt; &amp;#034;&amp;#034;];&#xD;
    		claimsRaw = FindList[patentStream, &amp;#034;&amp;lt;claim-text&amp;gt;&amp;#034;];&#xD;
    		claims = StringReplace[StringJoin[claimsRaw], {Shortest[&amp;#034;&amp;lt;&amp;#034;~~__~~&amp;#034;&amp;gt;&amp;#034;] -&amp;gt; &amp;#034; &amp;#034;, StringExpression[a:NumberString,&amp;#034;.&amp;#034;] -&amp;gt; StringExpression[ToExpression[a],&amp;#034;:&amp;#034;]}];&#xD;
    		AssociateTo[claimText, {patentInfo[[1]] -&amp;gt; claims}];&#xD;
    		words = DeleteCases[base[StringDelete[DeleteStopwords[ToLowerCase[StringJoin[claims, &amp;#034; &amp;#034;, patentInfo[[2]]]]], Alternatives@@dropList]], Alternatives@@blackList];&#xD;
    		AppendTo[patentAnalysisMatrix,&#xD;
    			&amp;lt;|patentInfo[[1]] -&amp;gt; &amp;lt;|&amp;#034;Title&amp;#034; -&amp;gt; patentInfo[[2]], &amp;#034;# Claims&amp;#034; -&amp;gt; patentInfo[[3]], &amp;#034;Words&amp;#034; -&amp;gt; Select[Keys[WordCounts[words]], LetterQ][[1;;3]]|&amp;gt;|&amp;gt;];&#xD;
    		(*Print[WordCloud[words]]*)&#xD;
    		Close[patentStream];&#xD;
    	]&#xD;
&#xD;
The most frequently used words are cleaned with separate lists of words to be dropped for better characterizing each patent.&#xD;
&#xD;
    Clear@base;&#xD;
    base[w_] := &#xD;
      With[{tmp = WordData[w, &amp;#034;BaseForm&amp;#034;, &amp;#034;List&amp;#034;]}, &#xD;
       If[(Head[tmp] === Missing) || tmp === {}, w, tmp[[1]]]];&#xD;
    SetAttributes[base, Listable];&#xD;
    blackList = {&amp;#034;doi&amp;#034;, &amp;#034;ed&amp;#034;, &amp;#034;isbn&amp;#034;, &amp;#034;pmid&amp;#034;};&#xD;
    dropList =&#xD;
       {&amp;#034;wherein&amp;#034;, &amp;#034;claim&amp;#034;, &amp;#034;said&amp;#034;, &amp;#034;-&amp;#034;, &amp;#034;&amp;amp;#&amp;#034;, &amp;#034;x2018&amp;#034;, &amp;#034;x2019&amp;#034;, &amp;#034;x201c&amp;#034;, &#xD;
       &amp;#034;x201d&amp;#034;, &amp;#034;;&amp;#034;, &amp;#034;/&amp;#034;, &amp;#034;&amp;#039;&amp;#034;, &amp;#034;.&amp;#034;, &#xD;
       StringExpression[&amp;#034; &amp;#034;, NumberString, &amp;#034; &amp;#034;], &#xD;
       StringExpression[&amp;#034; &amp;#034;, NumberString, &amp;#034;, &amp;#034;]};&#xD;
&#xD;
Then, we obtained a dataset with three most frequently used words in each patent for further analyses.&#xD;
![Patent information dataset with three most frequently used words in each patent.][1]&#xD;
&#xD;
&#xD;
&#xD;
---------&#xD;
&#xD;
**Clustering with Vector Representations of Words with NetModel, GloVe**&#xD;
&#xD;
GloVe is used to turn three most frequently used words in claim text into [3 x 100]-dimensional vector representations, allowing us to group them together with semantically similar data in a vector space.&#xD;
&#xD;
&#xD;
&#xD;
&#xD;
    net = NetModel[&#xD;
      &amp;#034;GloVe 100-Dimensional Word Vectors Trained on Wikipedia and Gigaword-5 Data&amp;#034;]&#xD;
    wordToVec = net /@ Normal[patentAnalysisMatrix[All, &amp;#034;Words&amp;#034;]];&#xD;
    Dimensions /@ wordToVec // Tally  (* Same dimension checked *)&#xD;
    c = ClusterClassify[Values[wordToVec]]&#xD;
&#xD;
&#xD;
 ---------&#xD;
&#xD;
**Time-Series Data using USPTO&amp;#039;s Classification Systems**&#xD;
&#xD;
Patents are classified by the USPTO into patent classes and subclasses based on the subject matter of the patent claims. Thus, we can use patent class/subclass information to group or cluster patents that have common claimed subject matter. Here, instead of the USTPO&amp;#039;s patent classification systems which have large numbers of categories and largely designed for administrative purposes, thus limiting their value for research purposes, the National Bureau of Economic Research (NBER) categories, which Hall, Jaffe, and Trajtenberg (2001) developed by aggregating USPC classes into six economically relevant technology categories (and 37 sub-categories) and classified granted patents accordingly, were applied to create the times series data.&#xD;
&#xD;
The number of patent grants in Computers &amp;amp; Communication has been greatly increased, suggesting that they are more probable to be invalidated and the applicants would need more than mere implementation for their inventions to be patent eligible.&#xD;
![Patent grant counts per category per year.][2]&#xD;
&#xD;
&#xD;
---------&#xD;
&#xD;
**Scope Checker**&#xD;
&#xD;
Lastly, we often need to explore the description (or specification) part of patent documents to clarify the scope and details which are claimed in the patent. There is also a requirement for a patent application called &amp;#034;Sufficiency of Disclosure&amp;#034; which means that it should contain sufficient information or details of patent claims so that others can reproduce. Therefore, by constructing the distance matrix between the claim sentence and description sentences, we would be able to find the most similar and related text with a given claim sentence.&#xD;
&#xD;
    patentScopeChecker[files_, patentNum_, claimNum_] :=&#xD;
     	Module[&#xD;
      		{patentsStream, patent, patentTitleRaw, patentTitle, patentText, patentTextRaw, patentSpec, claimsRaw, claims},&#xD;
      		patentsStream = OpenRead[files];&#xD;
      		patent = &#xD;
       			Find[patentsStream, patentNum, RecordSeparators -&amp;gt; {{&amp;#034;&amp;lt;?xml version=\&amp;#034;1.0\&amp;#034; \ encoding=\&amp;#034;UTF-8\&amp;#034;?&amp;gt;&amp;#034;}, {&amp;#034;&amp;lt;/us-patent-grant&amp;gt;&amp;#034;}}];&#xD;
      		patentTitleRaw = StringCases[patent, Shortest[&amp;#034;&amp;lt;invention-title id=&amp;#034; ~~ __ ~~ &amp;#034;&amp;lt;/invention-title&amp;gt;&amp;#034;]][[1]];&#xD;
      		patentTitle = StringReplace[patentTitleRaw, Shortest[&amp;#034;&amp;lt;&amp;#034; ~~ __ ~~ &amp;#034;&amp;gt;&amp;#034;] -&amp;gt; &amp;#034;&amp;#034;];&#xD;
      		patentSpec = StringReplace[StringCases[patent, Shortest[&amp;#034;&amp;lt;description id=&amp;#034; ~~ __ ~~ &amp;#034;&amp;lt;/description&amp;gt;&amp;#034;]], &amp;#034;\n&amp;#034; -&amp;gt; &amp;#034; &amp;#034;];&#xD;
      		patentTextRaw =  StringReplace[patentSpec, {Shortest[&amp;#034;&amp;lt;&amp;#034; ~~ __ ~~ &amp;#034;&amp;gt;&amp;#034;] -&amp;gt; &amp;#034;&amp;#034;,  StringExpression[NumberString, &amp;#034;.&amp;#034;] -&amp;gt; &amp;#034;&amp;#034;}];&#xD;
      		patentText = TextSentences[StringJoin[patentTextRaw]];&#xD;
      		claimsRaw = StringReplace[StringCases[patent, Shortest[&amp;#034;&amp;lt;claims id=&amp;#034; ~~ __ ~~ &amp;#034;&amp;lt;/claims&amp;gt;&amp;#034;]], &amp;#034;\n&amp;#034; -&amp;gt; &amp;#034; &amp;#034;];&#xD;
      		claims = Flatten[TextSentences[StringTrim[StringReplace[claimsRaw, &#xD;
                    {Shortest[&amp;#034;&amp;lt;&amp;#034; ~~ __ ~~ &amp;#034;&amp;gt;&amp;#034;] -&amp;gt; &amp;#034;&amp;#034;,  StringExpression[a : NumberString, &amp;#034;.&amp;#034;] -&amp;gt; StringExpression[ToExpression[a], &amp;#034;:&amp;#034;]}]]]];&#xD;
      		Print[&amp;#034;Title: &amp;#034;, patentTitle, &amp;#034;\nClaim: &amp;#034;, claims[[claimNum]], &amp;#034;\nDescription:&amp;#034;, Nearest[patentText, claims[[claimNum]], 3]];&#xD;
      		PrependTo[patentText, claims[[claimNum]]];&#xD;
      		distanceToText = DistanceMatrix[patentText][[1]];&#xD;
      		Print[distanceToText] // MatrixForm;&#xD;
      		Print[ListLinePlot[distanceToText]];&#xD;
      		Print[NearestNeighborGraph[patentText, VertexLabels -&amp;gt; {patentText[[1]] -&amp;gt; &amp;#034;Claim&amp;#034;}]];&#xD;
      		Close[patentsStream];&#xD;
      	]&#xD;
&#xD;
Searching for details of the claim 2 in US8407580, one of the patents by Stephen Wolfram, demonstrates that the Scope Checker successfully detects the relevant details in the description/specification part of a patent document for a given claim text. These sentences correspond to the three smallest values in the DistanceMatrix between the claim text and the description text, and NearestNeighborMatrix demonstrates how the claim text is related to the description text.&#xD;
&#xD;
&#xD;
![Find by the patent number within known file name (&amp;#034;ipgYYMMDD.xml&amp;#034; for known publication date).][3]&#xD;
&#xD;
&#xD;
  [1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=project1.png&amp;amp;userId=1122853&#xD;
  [2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=project3.PNG&amp;amp;userId=1122853&#xD;
  [3]: http://community.wolfram.com//c/portal/getImageAttachment?filename=project4.PNG&amp;amp;userId=1122853</description>
    <dc:creator>Nae Eoun Lee</dc:creator>
    <dc:date>2017-07-05T20:48:00Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/908823">
    <title>[WSSA16] Classify Users by Internet Public Information</title>
    <link>https://community.wolfram.com/groups/-/m/t/908823</link>
    <description>**User Clustering by their Social Behaviour**&#xD;
-------------------&#xD;
&#xD;
![enter image description here][1]&#xD;
&#xD;
My main goal in this project was to classify internet users using information publicly available on social sites. Among the many alternatives, I chose Reddit because I was able to find a rich database. [Database][2]the whole set of comments posted during  May of 2015.&#xD;
&#xD;
The main steps of my project have been&#xD;
&#xD;
 - Learning how to work with an SQL database in Mathematica&#xD;
 - Collecting information about random users&#xD;
 - Analysing the relevance of the Subreddit present in the data&#xD;
 - Creating a user feature vector&#xD;
 - Clustering the users through their feature representation&#xD;
&#xD;
##Learning how to use the Database&#xD;
&#xD;
To start working on the database, I first checked the [database description][3] in order to correctly manipulate the data. To do that I need to know how to open SQLITE files in Mathematica. We must check the [database description][4] in order to correctly  manipulate the data.&#xD;
As it was my first time, I wanted to start easy to get an idea of what could be done. For that I chose one random person from the dataset, and then tried to collect information about him (or her). I got up to 1000 rows and the columns &amp;#034;subreddit&amp;#034; and &amp;#034;score&amp;#034;, but only if the value in the column &amp;#034;author&amp;#034; was &amp;#034;WyaOfWade&amp;#034; (a random user&amp;#039;s name). &#xD;
&#xD;
    subreddit.commentsScore=SQLSelect[database,&amp;#034;May2015&amp;#034;,{&amp;#034;subreddit&amp;#034;,&amp;#034;score&amp;#034;},&#xD;
    SQLColumn[{&amp;#034;May2015&amp;#034;,&amp;#034;author&amp;#034;}]==&amp;#034;WyaOfWade&amp;#034;,&#xD;
    &amp;#034;MaxRows&amp;#034;-&amp;gt;1000];&#xD;
&#xD;
Then I grouped the results by the first element (&amp;#034;subreddit&amp;#034;)  returning the last one (&amp;#034;score&amp;#034;), and  computing the length of the vector to see how many comments are on a given &#xD;
&#xD;
    GroupBy[commentsScore, First -&amp;gt; Last, Length]&#xD;
&#xD;
The result in Column form is&#xD;
   &#xD;
    nba-&amp;gt;306&#xD;
    nfl-&amp;gt;2&#xD;
    CoDCompetitive-&amp;gt;32&#xD;
    hiphopheads-&amp;gt;17&#xD;
    Boxing-&amp;gt;2&#xD;
    GlobalOffensive-&amp;gt;6&#xD;
    headphones-&amp;gt;8&#xD;
    food-&amp;gt;1&#xD;
    pcmasterrace-&amp;gt;1&#xD;
    leagueoflegends-&amp;gt;4&#xD;
    malefashionadvice-&amp;gt;4&#xD;
    DotA2-&amp;gt;3&#xD;
    Music-&amp;gt;2&#xD;
    OpTicGaming-&amp;gt;10&#xD;
    leakthreads-&amp;gt;2&#xD;
    AskReddit-&amp;gt;1&#xD;
    todayilearned-&amp;gt;1&#xD;
    Games-&amp;gt;1&#xD;
&#xD;
So now we have some information about a random user and can for example make a histogram for a more presentable form. Here are the the top 3 subreddits where he/she is commenting.&#xD;
&#xD;
![enter image description here][5]&#xD;
&#xD;
##Starting with Statistics&#xD;
&#xD;
Now we can gather statistics about more than one user, for example the first 10,000 users in the database. To reduce the noise in the data, we filter them by quantity of comments and take all users that have more than 20 comments in some subreddits.&#xD;
&#xD;
    minLength=20;&#xD;
    commentPerSub=Map[Select[GroupBy[#,First-&amp;gt;Last,Length],#&amp;gt;minLength&amp;amp;]&amp;amp;, data];&#xD;
&#xD;
    Short[commentPerSub,2]&#xD;
    &amp;lt;|rx109-&amp;gt;&amp;lt;|newsokur-&amp;gt;222,BakaNewsJP-&amp;gt;37|&amp;gt;,WyaOfWade-&amp;gt;&amp;lt;|nba-&amp;gt;306,CoDCompetitive-&amp;gt;32|&amp;gt;,&#xD;
       Wicked_Truth-&amp;gt;&amp;lt;|politics-&amp;gt;156|&amp;gt;,jesse9o3-&amp;gt;&amp;lt;|AskReddit-&amp;gt;54,worldnews-&amp;gt;275,soccer-&amp;gt;28|&amp;gt;,&#xD;
       &amp;lt;&amp;lt;7516&amp;gt;&amp;gt;,Zandock-&amp;gt;&amp;lt;|fireemblem-&amp;gt;57|&amp;gt;,RandomRem-&amp;gt;&amp;lt;||&amp;gt;,Op69dong-&amp;gt;&amp;lt;||&amp;gt;|&amp;gt;&#xD;
&#xD;
This way we find ourseves with  4468 users. Here is the distribution of the amount of subreddits each user commented in. Most users only have significant activity (more than 20 comments) in one subreddit.&#xD;
&#xD;
![enter image description here][6]&#xD;
&#xD;
##Subreddit analysis&#xD;
&#xD;
It&amp;#039;s time to start the Subreddit analysis. I first got the list of all subs (1812 of them are present in my data).&#xD;
&#xD;
    allSubs = Merge[Values[commentPerSub], Total];&#xD;
&#xD;
    Length[allSubs]&#xD;
    1812&#xD;
&#xD;
Here are the first five by number of comments&#xD;
&#xD;
TakeLargest[allSubs, 5]&#xD;
&#xD;
    &amp;lt;|&amp;#034;AskReddit&amp;#034; -&amp;gt; 85288, &amp;#034;nba&amp;#034; -&amp;gt; 48097, &amp;#034;nfl&amp;#034; -&amp;gt; 43888, &#xD;
     &amp;#034;leagueoflegends&amp;#034; -&amp;gt; 27483, &amp;#034;hockey&amp;#034; -&amp;gt; 18535|&amp;gt;&#xD;
&#xD;
We can see that AskReddit is very popular sub so user commenting on it are probably not very correlated by interestsTherefore I decided to drop it from the list. Now I can have a look at the plot of each subreddit vs its number of comments.&#xD;
&#xD;
![enter image description here][7]&#xD;
&#xD;
##User representation&#xD;
&#xD;
Now I have enough information about subreddits and users for creating user vectors which we will use in user&amp;#039;s classification.So let&amp;#039;s create an  empty user vector with zero comments for each sub, then replace the values for each user into empty vector.The new association as values for each subreddit.&#xD;
&#xD;
    (*Create an empty user vector with zero comments for each sub*)&#xD;
    userVectorEmpty = Association[Thread[Keys[allSubs] -&amp;gt; 0]];&#xD;
&#xD;
    Short[userVectorEmpty]&#xD;
    &amp;lt;|newsokur-&amp;gt;0,BakaNewsJP-&amp;gt;0,nba-&amp;gt;0,&amp;lt;&amp;lt;1806&amp;gt;&amp;gt;,shorthairedhotties-&amp;gt;0,uwaterloo-&amp;gt;0|&amp;gt;&#xD;
&#xD;
    (*Replace values for each user into the empty vector*)&#xD;
    extendedCommentPerSub = Join[userVectorEmpty, #] &amp;amp; /@ Values[commentPerSub];&#xD;
&#xD;
The new association as values for each subreddit&#xD;
&#xD;
    First[commentPerSub]&#xD;
    Short[First[extendedCommentPerSub]]&#xD;
    &amp;lt;|newsokur-&amp;gt;222,BakaNewsJP-&amp;gt;37|&amp;gt;&#xD;
    &amp;lt;|newsokur-&amp;gt;222,BakaNewsJP-&amp;gt;37,nba-&amp;gt;0,&amp;lt;&amp;lt;1806&amp;gt;&amp;gt;,shorthairedhotties-&amp;gt;0,uwaterloo-&amp;gt;0|&amp;gt;&#xD;
&#xD;
    (*Create an empty user vector with zero comments for each sub and remove the \&#xD;
    subreddit names*)&#xD;
    userVectors = Values[Join[userVectorEmpty, #]] &amp;amp; /@ commentPerSub;&#xD;
    (*save the name of the users*)&#xD;
    userNames = Keys[userVectors];&#xD;
    (*remove also the keys with the users, now userVectors is just a normal \&#xD;
    matrix*)&#xD;
    userVectors = Values[userVectors];&#xD;
    (*normalize each vector user by dividing for the total number of comments per \&#xD;
    subreddit*)&#xD;
    userVectors = Transpose[Transpose[userVectors]/Values[allSubs]];&#xD;
&#xD;
This is a plot of all the users vectors.&#xD;
&#xD;
![enter image description here][8]&#xD;
&#xD;
##User classification&#xD;
&#xD;
We want to build a similarity function to identify users with common interests&#xD;
&#xD;
    similarity[v1_,v2_]:=v1.v2/(Norm[v1]Norm[v2])&#xD;
&#xD;
The norm at the denominator are computed separately for efficiency&#xD;
&#xD;
    norms=Norm/@N[userVectors];&#xD;
    normMatrix=Transpose[{norms}].{norms};&#xD;
&#xD;
This builds the similarity matrix&#xD;
&#xD;
    similarityMatrix=N[userVectors].Transpose[N[userVectors]]/normMatrix;&#xD;
&#xD;
I want all the values below a certain threshold to be zero. I.e. no connection between the users. I also subtract the diagonal not to connect users with themselves&#xD;
&#xD;
    similarityThreshold=.75;    &#xD;
    m2=Threshold[similarityMatrix-IdentityMatrix[Length[userVectors]],similarityThreshold];&#xD;
&#xD;
All the rest is set to one&#xD;
&#xD;
    m3=Ceiling[m2];&#xD;
&#xD;
Now the graph is build from the adjacency matrix&#xD;
&#xD;
    AdjacencyGraph[m3]&#xD;
&#xD;
![enter image description here][9]&#xD;
&#xD;
In this graph there are 1625 disconnected components&#xD;
&#xD;
    graphComponents=ConnectedGraphComponents[fullGraph];&#xD;
    Length[graphComponents]&#xD;
    1625&#xD;
&#xD;
If I remove the components with only one element (i. e. the cluster of only one user) I am down to 592&#xD;
&#xD;
    graphComponents=Select[graphComponents,VertexCount[#]&amp;gt;1&amp;amp;];&#xD;
    Length[graphComponents]&#xD;
    592&#xD;
&#xD;
Each disconnected component represent now a group of users with similar commenting patterns---and hopefully similar interests.&#xD;
Here are five of them&#xD;
&#xD;
    Grid[{#,commentPerSub[[VertexList[#]]]}&amp;amp;/@RandomSample[graphComponents,5]]&#xD;
&#xD;
![enter image description here][10]&#xD;
&#xD;
As we can see all these group of users have high activity on the same Subreddits.&#xD;
&#xD;
&#xD;
  [1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=UserClassifier.png&amp;amp;userId=900523&#xD;
  [2]: https://www.kaggle.com/reddit/reddit-comments-may-2015&#xD;
  [3]: https://www.kaggle.com/reddit/reddit-comments-may-2015&#xD;
  [4]: https://www.kaggle.com/reddit/reddit-comments-may-2015&#xD;
  [5]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshot_1.png&amp;amp;userId=900523&#xD;
  [6]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Plorium.png&amp;amp;userId=900523&#xD;
  [7]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2016-08-19at15.17.15.png&amp;amp;userId=900523&#xD;
  [8]: http://community.wolfram.com//c/portal/getImageAttachment?filename=SqlExplore4.png&amp;amp;userId=900523&#xD;
  [9]: http://community.wolfram.com//c/portal/getImageAttachment?filename=2410Final_05.png&amp;amp;userId=900523&#xD;
  [10]: http://community.wolfram.com//c/portal/getImageAttachment?filename=5examples.png&amp;amp;userId=900523</description>
    <dc:creator>Armen Barseghyan</dc:creator>
    <dc:date>2016-08-19T15:19:08Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/3030120">
    <title>Hardware for exploring &amp;#034;Generative AI Space&amp;#034;?</title>
    <link>https://community.wolfram.com/groups/-/m/t/3030120</link>
    <description>I was inspired by Wolfram&amp;#039;s blog post on [Generative AI Space and the Mental Imagery of Alien Minds][1] but realized that I can&amp;#039;t run any of his code because my Mathematica installations are on MacOS and GPU use is not supported. Can anyone give me a sense of how long it would take to run his examples on a newish Linux or Windows laptop (minutes, hours, days)? I would like to get into the kind of experimentation he describes but I don&amp;#039;t have a sense of whether it can be done with a modest system or whether it requires a lot of computational resources or some kind of cloud deployment. Thanks!&#xD;
&#xD;
  [1]: https://writings.stephenwolfram.com/2023/07/generative-ai-space-and-the-mental-imagery-of-alien-minds/</description>
    <dc:creator>William Turkel</dc:creator>
    <dc:date>2023-10-08T13:58:35Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1862900">
    <title>StyleGAN with the Wolfram Language?</title>
    <link>https://community.wolfram.com/groups/-/m/t/1862900</link>
    <description>Hi, are there any plans underway to add support for [StyleGAN][1] / [StyleGAN2][2] in the Wolfram Neural Repository? I&amp;#039;ve just started playing around with generating my own images with [RunwayML][3] by re-using an existing community StyleGAN model (it sure helps that they start you off w/$100 Cloud GPU credits) but I&amp;#039;d really like to keep learning and doing this further on the Wolfram platform. &#xD;
&#xD;
Best,&#xD;
Arno&#xD;
&#xD;
  [1]: https://github.com/NVlabs/stylegan&#xD;
  [2]: https://github.com/NVlabs/stylegan2&#xD;
  [3]: https://runwayml.com</description>
    <dc:creator>Arno Bosse</dc:creator>
    <dc:date>2020-01-19T09:52:14Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1382958">
    <title>[WSC18] Economics of Cryptokitties</title>
    <link>https://community.wolfram.com/groups/-/m/t/1382958</link>
    <description># Economics of Cryptokitties&#xD;
![enter image description here][1]&#xD;
## Executive Summary&#xD;
Cryptokitties is an online game run on the Ethereum blockchain that sells virtual cats with different &amp;#034;cattributes&amp;#034; (cat attributes). The goal of this project is to analyze what factors affect the price of a cryptokitty. The results from the gathered data show that certain cattributes can affect the price of a cryptokitty, but the scarcity of that cattribute does not seem to play a factor in determining a cryptokitty&amp;#039;s price. The time a kitty was sold can be a contributor to the price of a cryptokitty, with cryptokitties that were sold soon after the game&amp;#039;s launch tending to have higher prices than kitties sold at later times. Also, a kitty is most likely to be sold within the first two weeks of its birth.&#xD;
&#xD;
##Introduction&#xD;
&#xD;
### What are Cryptokitties?&#xD;
Cryptokitties are virtual cats sold online using the Ethereum blockchain. Each cryptokitty has a certain set of cattributes, which is determined by their online genetic code. One cryptokitty is released every 15 minutes by the owners of Cryptokitties. While cryptokitties may be released by the company, cryptokitties can also breed, mixing up their genetic code and be creating new kitties that share cattributes passed down from its parents, and possibly even have a mutation that creates a new cattribute. When a person buys a cryptokitty online they own the rights to the genetic code of the cryptokitty, but the company owns the rights to all the images of the cryptokitty and all the programming that went into creating the virtual cat. One can buy a cryptokitty by visiting the Cryptokitties website and having an Ethereum wallet and buy a cryptokitty using ether, the Ethereum cryptocurrency.&#xD;
&#xD;
###Why should I care?&#xD;
Blockchain technology will be an up-and-coming innovation that will change the way that people do online transactions. Blockchain technology is not just limited to the use of currency but can be applied to many different online fields, such as for games like Cryptokitties. Analyzing the economics Cryptokitties can help predict what a new wave of Blockchain games will look and operate like.&#xD;
&#xD;
##Gathering the data&#xD;
To gather the data, I accessed the CryptoKittyDex website[1] and shifted between kitties by changing the cryptokitty&amp;#039;s index number which is the last number in the URL.&#xD;
&#xD;
    ImportCryptoKittiesDB[&amp;#034;Web&amp;#034;, range_] := &#xD;
     importRawKittiesData /@ (Range @@ range)&#xD;
    &#xD;
    ImportCryptoKittiesDB[&amp;#034;File&amp;#034;, filepath_] := Import[filepath];&#xD;
    &#xD;
    importRawKittiesData[id_] := &#xD;
     Block[{request = &#xD;
        HTTPRequest[&#xD;
         URLBuild[{&amp;#034;https://cryptokittydex.com/kitties/&amp;#034;, ToString[id]}]],&#xD;
        result},&#xD;
      result = URLRead[request];&#xD;
      If[result[&amp;#034;StatusCode&amp;#034;] == 200, Import[result, &amp;#034;Data&amp;#034;]]&#xD;
      ]&#xD;
&#xD;
An obstacle I faced while doing this is that if I try to mass import cryptokitties, after some number of kitties there would be an error in importing data from a webpage, causing any importation after the failed import to never happen. To combat this problem I imported all kitties in random sets of eleven consecutive kitties and then pause for a few seconds before importing another set of kitties. This allowed for a break in the importation making new sets not crash due to and importation failure in an earlier set of kitties. I would flatten the gathered data so it&amp;#039;d be usable later, and then saved the data in a file in the case of my kernel crashing.&#xD;
&#xD;
    ranges = Table[With[{n = RandomInteger[825000]}, {n, n + 10}], 10];&#xD;
    &#xD;
    sample72 = With[{range = #},&#xD;
         Pause[5];&#xD;
         ImportCryptoKittiesDB[&amp;#034;Web&amp;#034;, range]&#xD;
         ] &amp;amp; /@ ranges;&#xD;
    &#xD;
    cryptokittiesSample72 = Flatten[sample72, 1];&#xD;
    &#xD;
    Save[&amp;#034;/Users/kylekotanchek/Documents/CryptokittiesDatabases/\&#xD;
    CryptokittiesSample72.wl&amp;#034;, cryptokittiesSample72]&#xD;
&#xD;
Once a enough sets of data were gathered, I put them all into a database after deleting duplicates and any cases of failed imports which occurred in the form of Null.&#xD;
&#xD;
    database = &#xD;
      DeleteCases[&#xD;
       DeleteDuplicates[&#xD;
        Join[cryptokittiesSample1, cryptokittiesSample2, &#xD;
         cryptokittiesSample3, cryptokittiesSample[40], &#xD;
         cryptokittiesSample41, cryptokittiesSample42, &#xD;
         cryptokittiesSample43, cryptokittiesSample44, &#xD;
         cryptokittiesSample45, cryptokittiesSample46, &#xD;
         cryptokittiesSample47, cryptokittiesSample48, &#xD;
         cryptokittiesSample49, cryptokittiesSample50, &#xD;
         cryptokittiesSample51, cryptokittiesSample52, &#xD;
         cryptokittiesSample53, cryptokittiesSample54, &#xD;
         cryptokittiesSample55, cryptokittiesSample56, &#xD;
         cryptokittiesSample57, cryptokittiesSample58, &#xD;
         cryptokittiesSample59, cryptokittiesSample60, &#xD;
         cryptokittiesSample61, cryptokittiesSample62, &#xD;
         cryptokittiesSample63, cryptokittiesSample64, &#xD;
         cryptokittiesSample65, cryptokittiesSample66, &#xD;
         cryptokittiesSample67, cryptokittiesSample68, &#xD;
         cryptokittiesSample69, cryptokittiesSample70, &#xD;
         cryptokittiesSample71, cryptokittiesSample72]], Null];&#xD;
&#xD;
&#xD;
##Compiling the data&#xD;
Once all the data was together, I was able to take certain parts of all of the data of the individual kitties and compile it in a usable way. I found the time a kitty was born, the generation of the kitty, the cattributes of the kitty, and the price and time the kitty was sold. A struggle found was that a kitty could have never been sold, sold once, or sold multiple times. Originally I ignored the cryptokitties that had never been sold, but later changed it to making their price zero after realizing this was causing price inflation in determining the average cost of a cryptokitty. Since every cat needed a time that it was sold at, I made cats that were never sold to have a selling data in 2016, which was before Cryptokitties was launched, so that it&amp;#039;d have no effect in analyzing the time vs. price distribution of sold cats. For every cryptokitty I paired the mean of all the prices a kitty was sold and paired that with each of its cattributes. I also made a function to see the average price value of a cattribute by taking the mean of all the prices of the cryptokitties that have the same cattribute. I dropped the last 15 items in the variable MeanCattributePrice because of some random kitties that never had their cattributes appear on the CryptoKittyDex website.&#xD;
&#xD;
    getPriceInfo[rawdata_] := &#xD;
     Block[{data = &#xD;
        Cases[rawdata, {x_String, _} /; ! &#xD;
           StringFreeQ[x, &amp;#034;Sold for&amp;#034;], \[Infinity]], rawprices, rawdates, &#xD;
       prices, dates}, rawprices = data[[All, 1]];&#xD;
      rawdates = data[[All, 2]];&#xD;
      prices = &#xD;
       Quantity[&#xD;
          ToExpression@&#xD;
           First[StringCases[#, &#xD;
             RegularExpression[&amp;#034;Sold for ([[:print:]]+) ETH&amp;#034;] -&amp;gt; &amp;#034;$1&amp;#034;]], &#xD;
          &amp;#034;Ethers&amp;#034;] &amp;amp; /@ rawprices;&#xD;
      dates = DateObject /@ rawdates;&#xD;
      MapThread[List, {prices, dates}]]&#xD;
    &#xD;
    GetKittyData[database_, id_Integer] := &#xD;
     Catch[Block [{KittyData, KittySoldPrice, KittyBorn, KittyGeneration, &#xD;
        Cattributes, priceInfo},&#xD;
       (*832250 kitties*)&#xD;
       KittyData = database[[id, 2]];&#xD;
       priceInfo = getPriceInfo[KittyData];&#xD;
       If[priceInfo === {},&#xD;
        &amp;lt;|&#xD;
         &#xD;
         KittyBorn -&amp;gt; &#xD;
          DateObject@&#xD;
           StringDrop[&#xD;
            StringReplace[KittyData[[1, 2]], &amp;#034;Born: &amp;#034; :&amp;gt; &amp;#034;&amp;#034;], -4],&#xD;
         KittyGeneration -&amp;gt;  &#xD;
          StringReplace[KittyData[[1, 3]], &amp;#034;Generation: &amp;#034; :&amp;gt; &amp;#034;&amp;#034;],&#xD;
         Cattributes -&amp;gt; &#xD;
          StringSplit[&#xD;
           StringReplace[&#xD;
            StringReplace[KittyData[[1, 7]], &amp;#034;Cattributes: &amp;#034; :&amp;gt; &amp;#034;&amp;#034;], &#xD;
            &amp;#034; &amp;#034; :&amp;gt; &amp;#034;&amp;#034;], &amp;#034; , &amp;#034;],&#xD;
         KittySoldPrice -&amp;gt; {Quantity[0.0, &amp;#034;Ethers&amp;#034;], &#xD;
           DateObject[{2016, 1, 1}]}&#xD;
         |&amp;gt;,&#xD;
        &amp;lt;|&#xD;
         &#xD;
         KittyBorn -&amp;gt; &#xD;
          DateObject@&#xD;
           StringDrop[&#xD;
            StringReplace[KittyData[[1, 2]], &amp;#034;Born: &amp;#034; :&amp;gt; &amp;#034;&amp;#034;], -4],&#xD;
         KittyGeneration -&amp;gt;  &#xD;
          StringReplace[KittyData[[1, 3]], &amp;#034;Generation: &amp;#034; :&amp;gt; &amp;#034;&amp;#034;],&#xD;
         Cattributes -&amp;gt; &#xD;
          StringSplit[&#xD;
           StringReplace[&#xD;
            StringReplace[KittyData[[1, 7]], &amp;#034;Cattributes: &amp;#034; :&amp;gt; &amp;#034;&amp;#034;], &#xD;
            &amp;#034; &amp;#034; :&amp;gt; &amp;#034;&amp;#034;], &amp;#034; , &amp;#034;],&#xD;
         KittySoldPrice -&amp;gt; priceInfo&#xD;
         |&amp;gt;&#xD;
        ]&#xD;
       ]&#xD;
      ]&#xD;
    &#xD;
    CattributePricePK[database_, x_Integer] :=&#xD;
     &#xD;
     Block[{list, price, kittydata = GetKittyData[database, x]},&#xD;
      If[Lookup[kittydata, KittySoldPrice] === {Quantity[0.`, &amp;#034;Ethers&amp;#034;], &#xD;
         DateObject[{2016, 1, 1}, &amp;#034;Day&amp;#034;, &amp;#034;Gregorian&amp;#034;, -4.`]},&#xD;
       {#, Quantity[0.`, &amp;#034;Ethers&amp;#034;]} &amp;amp; /@ &#xD;
        First[StringSplit[Lookup[kittydata, Cattributes], &amp;#034;,&amp;#034;]],&#xD;
       list = StringSplit[First[kittydata[[3]]], &amp;#034;,&amp;#034;];&#xD;
       If[Length[ kittydata[[4]]] == 1, price = kittydata[[4, 1, 1]], &#xD;
        price = Mean[&#xD;
          Table[kittydata[[4, n]], {n, Length[kittydata[[4, 1]]]}][[All, &#xD;
            1]]]];&#xD;
       Table[{n, price}, {n, &#xD;
         If[Length[ kittydata[[4]]] == 1, &#xD;
          StringSplit[First[kittydata[[3]]], &amp;#034;,&amp;#034;], list]}]&#xD;
       ]&#xD;
      ]&#xD;
    &#xD;
    &#xD;
    CryptoKittiesData[database_, id_, &amp;#034;FullInfo&amp;#034;] := &#xD;
     GetKittyData[database, id]&#xD;
    &#xD;
    CryptoKittiesData[database_, id_, &amp;#034;CattributesPrice&amp;#034;] := &#xD;
     CattributePricePK[database, id]&#xD;
    &#xD;
    CryptoKittiesData[database_, &amp;#034;CattributesMeanPrice&amp;#034;] := &#xD;
     Block[{cattributesSet, cleandb = DeleteCases[database, Null], &#xD;
       dblength},&#xD;
      dblength = Length[cleandb];&#xD;
      cattributesSet = &#xD;
       Flatten[CryptoKittiesData[cleandb, #, &amp;#034;CattributesPrice&amp;#034;] &amp;amp; /@ &#xD;
         Range[dblength], 1];&#xD;
      Mean[#[[All, 2]]] &amp;amp; /@ GroupBy[cattributesSet, First]&#xD;
      ]&#xD;
&#xD;
    MeanCattributesPrice = &#xD;
      CryptoKittiesData[database, &amp;#034;CattributesMeanPrice&amp;#034;][[1 ;; -15]];&#xD;
&#xD;
##Finding Patterns&#xD;
The first pattern I wanted to find was to see was if the scarcity of a cattribute is what determines the average value of the cattribute or if the scarcity of the cattribute isn&amp;#039;t related to the cattribute&amp;#039;s price. Due to some string importation errors in cattributes while compiling the cattribute-price relations, I had to find the cattributes that appeared in both the cattribute-price relations and in the cattribute-scarcity relation. Once I did that I then applied that intersection list to the cattribute-price and cattribute-scarcity relations to get two other lists that contained all of the cattributes shared between the two original lists.&#xD;
&#xD;
    completeCryptokittiesZeroSampleCounts = &#xD;
     Counts[Sort[&#xD;
        Flatten[Table[&#xD;
          Table[StringSplit[&#xD;
             StringSplit[&#xD;
               StringReplace[&#xD;
                StringReplace[database[[y, 2, 1]], &#xD;
                 &amp;#034;Cattributes: &amp;#034; :&amp;gt; &amp;#034;&amp;#034;], &amp;#034; &amp;#034; :&amp;gt; &amp;#034;&amp;#034;], &amp;#034; , &amp;#034;][[7, 1]], &#xD;
             &amp;#034;,&amp;#034;][[x]], {x, &#xD;
            Length[StringSplit[&#xD;
              StringSplit[StringReplace[StringReplace[database[[y&#xD;
                    , 2, 1]], &amp;#034;Cattributes: &amp;#034; :&amp;gt; &amp;#034;&amp;#034;], &amp;#034; &amp;#034; :&amp;gt; &amp;#034;&amp;#034;], &#xD;
                &amp;#034; , &amp;#034;][[7, 1]], &amp;#034;,&amp;#034;]]}], {y, Length[database]}], &#xD;
         1]]][[15 ;; 198]]&#xD;
    &#xD;
    listofSampleZeroCounts = &#xD;
     Table[{Keys[database][[x]], Values[database][[x]]}, {x, &#xD;
       Length[database]}] &#xD;
    &#xD;
    listofSampleZeroMeanPrices = &#xD;
     Table[{Keys[MeanCattributesPrice][[x]], &#xD;
       Values[ MeanCattributesPrice][[x]]}, {x, &#xD;
       Length[MeanCattributesPrice]}]&#xD;
    &#xD;
    intersectionofLists = &#xD;
     Intersection[listofSampleZeroCounts[[All, 1]], &#xD;
      listofSampleZeroMeanPrices[[All, 1]]]&#xD;
    &#xD;
    intersectionofSampleZeroMeanPrices = &#xD;
     SortBy[Flatten[&#xD;
       Table[If[MatchQ[yay[[1]], nay], yay, Nothing], {yay, &#xD;
         listofSampleZeroMeanPrices}, {nay, intersectionofLists}], 1], &#xD;
      First]&#xD;
    &#xD;
    intersectionofSampleZeroCounts = &#xD;
     Flatten[Table[&#xD;
       If[MatchQ[yay[[1]], nay], yay, Nothing], {yay, &#xD;
        listofSampleZeroCounts}, {nay, intersectionofLists}], 1]&#xD;
&#xD;
Then I graphed the two resulting list by sorting all the cattributes in alphabetical order and placing it on the x-axis. For the first graph I showed the price in ethers on the y-axis, and in the second graph I showed how common each cattribute was on the y-axis.&#xD;
&#xD;
    BarChart[Transpose[intersectionofSampleZeroMeanPrices][[2]], &#xD;
     ChartLabels -&amp;gt; Automatic]&#xD;
&#xD;
![Mean Cattribute Price in Ethers][2]&#xD;
&#xD;
    BarChart[Transpose[intersectionofSampleZeroCounts][[2]]]&#xD;
&#xD;
![How many times each cattribute appears][3]&#xD;
&#xD;
My hypothesis assumed that the two graphs would show an inverse relationship and that the price of a cattribute would originate from its scarcity, however the graphs showed no patterns between the two, proving my hypothesis to be wrong and proving there is no relationship between the scarcity of a cattribute and the cattribute&amp;#039;s price.&#xD;
&#xD;
We can also see Benford&amp;#039;s Law apply to the first digit of the prices of the cryptokitties that were sold.&#xD;
&#xD;
    allPrices = &#xD;
      Flatten[Table[&#xD;
         If[getPriceInfo[database[[n]]] == {}, Nothing, &#xD;
          getPriceInfo[database[[n]]]], {n, Length[database]}], 1][[All, &#xD;
       1, 1]];&#xD;
    Histogram[&#xD;
     First@First[RealDigits[FractionalPart[#]*10]] &amp;amp; /@ allPrices]&#xD;
&#xD;
![Beford&amp;#039;s Law in Cryptokitties prices][4]&#xD;
&#xD;
We can also see the price of cryptokitties sold over time. In the graph, we can see that cryptokitties sold soon after the game&amp;#039;s release in November 28, 2017 to about January 2018 tended to be sold for higher prices than kitties sold in times after that period. &#xD;
&#xD;
    sortedDatesSold = &#xD;
     SortBy[Flatten[&#xD;
       Table[If[getPriceInfo[database[[n]]] == {}, Nothing, &#xD;
         getPriceInfo[database[[n]]]], {n, Length[database]}], 1], Last]&#xD;
    DateListPlot[&#xD;
     Thread[{sortedDatesSold[[All, 2]], sortedDatesSold[[All, 1]]}]]&#xD;
&#xD;
 ![Price of cryptokitties sold over time][5]&#xD;
&#xD;
Here is a microsite for looking up a cattribute and seeing what it&amp;#039;s average price is and how common it is among kitties.&#xD;
&#xD;
[Link to Finding a Cattribute&amp;#039;s Price and Commonality][6]&#xD;
&#xD;
Some more information was found by Christian Pasquel using the same data and analyzing the time difference between when a kitty was born and sold. The variable data is the same thing as database, which was a variable used earlier.&#xD;
&#xD;
    data = Import[&#xD;
       FileNameJoin[{NotebookDirectory[], &amp;#034;cryptokittiesData01.wl&amp;#034;}]];&#xD;
&#xD;
He then deleted all the kitties that had never been sold before and found the difference between the time that the kitty was born and the kitty was sold. The mean time of the difference of a kitty being born and sold was almost nine days, with many kitties being sold the same day they&amp;#039;re born and some taking half a year to be sold since their birth; the longest difference in our dataset was 164 days. The histogram below shows the distribution of differences of cats being sold since being born.&#xD;
&#xD;
    In[170]:= soldCryptokitties = &#xD;
      DeleteCases[&#xD;
       data, &amp;lt;|__, &#xD;
        KittySoldPrice -&amp;gt; {Quantity[0.`, &amp;#034;Ethers&amp;#034;], &#xD;
          DateObject[{2016, 1, 1}, &amp;#034;Day&amp;#034;, &amp;#034;Gregorian&amp;#034;, -4.`]}|&amp;gt;];&#xD;
    &#xD;
    Computing the time they stayed with her owners&#xD;
    &#xD;
    In[171]:= timeBeforeLeaving = &#xD;
      Function[ck, (First[Sort[#[[2]][[All, 2]]]] - #[[1]]) &amp;amp;@&#xD;
         Lookup[ck, {KittyBorn, KittySoldPrice}]] /@ soldCryptokitties;&#xD;
    &#xD;
    MinMax values&#xD;
    &#xD;
    In[172]:= N@UnitConvert[MinMax[timeBeforeLeaving], &amp;#034;Days&amp;#034;]&#xD;
    &#xD;
    Out[172]= {Quantity[0., &amp;#034;Days&amp;#034;], Quantity[164.849, &amp;#034;Days&amp;#034;]}&#xD;
    &#xD;
    Mean time&#xD;
    &#xD;
    In[173]:= UnitConvert[Mean[timeBeforeLeaving] // N, &amp;#034;Days&amp;#034;]&#xD;
    &#xD;
    Out[173]= Quantity[8.93256, &amp;#034;Days&amp;#034;]&#xD;
    &#xD;
    Histogram (in days)&#xD;
    &#xD;
    In[174]:= Histogram[UnitConvert[timeBeforeLeaving, &amp;#034;Days&amp;#034;]]&#xD;
&#xD;
![Cryptokitty born-sold distribution][7]&#xD;
&#xD;
And Benford&amp;#039;s Law still applies to the born-sold distribution.&#xD;
&#xD;
    Histogram[First[IntegerDigits[#[[1]]]] &amp;amp; /@ timeBeforeLeaving]&#xD;
&#xD;
![Benford&amp;#039;s Law applied to cryptokitty born-sold distribution][8]&#xD;
&#xD;
##Future Work&#xD;
&#xD;
Gathering more data into the dataset will be beneficial. Currently, there are only 3,112 cryptokitties inside the database, which are trying to represent over 840,000 kitties. Also looking more deeply into the relationships different traits that cryptokitties have will show more complex patterns. Some of these traits include whether the kitty has parents or not, what generation it is, the genetic code of the kitty, the kitty&amp;#039;s description, and more.&#xD;
&#xD;
## Reference and other lists&#xD;
&#xD;
- [Cattribute Details][9]&#xD;
- [Cryptokitty Indexes][10]&#xD;
- [Cryptokitties Website][11]&#xD;
- [Hackernoon Cryptokitties Explanations][12]&#xD;
&#xD;
&#xD;
  [1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=cryptokitties-ethereum-game.png&amp;amp;userId=1371793&#xD;
  [2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=GraphMeanPricesofCattributes.png&amp;amp;userId=1371793&#xD;
  [3]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Scarcityof.png&amp;amp;userId=1371793&#xD;
  [4]: http://community.wolfram.com//c/portal/getImageAttachment?filename=HistogramofCryptokittiesBenford%27sLaw.png&amp;amp;userId=1371793&#xD;
  [5]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Cryptokittypricesovertime.png&amp;amp;userId=1371793&#xD;
  [6]: Hyperlink%5B%22https://www.wolframcloud.com/objects/d5d2d294-ef02-4053-%5C%20a0ac-9c72253d6c6a%22,%20%5C%20%22https://www.wolframcloud.com/objects/d5d2d294-ef02-4053-a0ac-%5C%209c72253d6c6a%22%5D&#xD;
  [7]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Cryptokittybornsolddistribution.png&amp;amp;userId=1371793&#xD;
  [8]: http://community.wolfram.com//c/portal/getImageAttachment?filename=BenfordsLawborn-solddistribution.png&amp;amp;userId=1371793&#xD;
  [9]: https://cryptokittydex.com/&#xD;
  [10]: https://cryptokittydex.com/kitties/527438&#xD;
  [11]: https://www.cryptokitties.co&#xD;
  [12]: https://hackernoon.com/hacking-the-cryptokitties-genome-1cb3e7dddab3</description>
    <dc:creator>Kyle Kotanchek</dc:creator>
    <dc:date>2018-07-13T19:48:35Z</dc:date>
  </item>
</rdf:RDF>

