Wolfram Community recently surpassed 15,000 members! And our Community members continue to impress us. Here are some recent highlights from the many outstanding Community posts.

BVH Accelerated 3D Shadow Mapping, Benjamin Goodman

*Shade data converted to solar map*

In a tour de force of computational narrative and a fusion of various Wolfram Language domains, Benjamin Goodman designs a shadow mapping algorithm. It’s a process of applying shadows to a computer graphic. Goodman optimized shadow mapping via space partitioning and a hierarchy of bounding volumes stored as a graph, forming a bounding volume hierarchy.

Pairs Trading with Copulas, Jonathan Kinlay

Jonathan Kinlay, the head of quantitative trading at Systematic Strategies LLC in New York, shows how copula models can be applied in pairs trading and statistical arbitrage strategies. The idea comes from when copulas began to be widely adopted in financial engineering, risk management and credit derivatives modeling, but it remains relatively underexplored compared to more traditional techniques in this field.

The Global Terrorism Database (GTD), Marco Thiel

Marco Thiel broke a Wolfram Community record in April when he contributed four featured posts in just three days! He utilized data from the Global Terrorism Database (GTD), an open-source database including information on terrorist events around the world, starting from 1970. It includes systematic data on domestic as well as transnational and international terrorist events, amounting to more than 150,000 cases. Marco analyzes weapon types, geo distribution of attacks and casualties, and temporal and demographical behavior.

Flight Data and Trajectories of Aeroplanes, Marco Thiel

Thiel utilizes the large amounts of data becoming ever more available. Often, however, these datasets are very valuable and difficult to access. Thiel shows how to use air traffic data to generate visualizations of three-dimensional flight paths on the globe and access flight positions and altitudes, call signs, types of planes, origins, destinations and much more.

Analysing “All” of the World’s News—Database of Everything, Marco Thiel

In another clever data collection/analysis project, Thiel works with “the largest, most comprehensive, and highest resolution open database of human society ever created,” according to the description provided by GDELT (Global Database of Events, Language, and Tone). Since 2015, this organization has acquired about three-quarters of a trillion emotional snapshots and more than 1.5 billion location references. Thiel performs some basic analysis and builds supporting visualizations.

How-to-Guide: External GPU on OSX—How to Use CUDA on Your Mac, Marco Thiel

Thiel discusses the neural network and machine learning framework that has become one of the key features of the latest releases of the Wolfram Language. Training neural networks can be very time-consuming, and the Wolfram Language offers an incredibly easy way to use a GPU to train networks and also do numerous other interesting computations. This post explains how to use powerful external GPU units for Wolfram Language computing on your Mac.

Creative Routines Charts, Patrick Scheibe

People are often interested in how creative or successful individuals manage their time, and when in their daily schedules they do what they are famous for. Patrick Scheibe describes how to build and personalize “creative routines” visualizations.

QR Code in Shopping Cart Handle, Patrick Scheibe

Scheibe also brought to Wolfram Community his famous article “QR Code in Shopping Cart Handle.” It explains the image processing algorithm for reading QR code labels when they are deformed by attachment to physical objects such as shopping carts and product packages.

Calculating NMR-Spectra with Wolfram Language, Hans Dolhaine

Hans Dolhaine, a chemist from Germany, writes a detailed walk-through calculating nuclear magnetic resonance spectra with the Wolfram Language. This is a useful educational tool for graduate physics and chemistry classes. Please feel free to share it in your interactions with students and educators.

Computational Introduction to Logarithms, Bill Gosper

Another excellent resource for educators is this elementary introduction to logarithms by means of computational exploration with the Wolfram Language. The Community contributor is renowned mathematician and programmer Bill Gosper. His article is highly instructive and accessible to a younger generation, and it contains beautiful animated illustrations that serve as outstanding educational material.

Using Recursion and FindInstance to Solve Sudoku and The Puzzled Ant and Particle Filter, Ali Hashmi

Finally, Ali Hashmi uses the recursion technique coupled with heuristics to solve a sudoku puzzle and also explains the connection between the puzzled ant problem and particle filters in computer vision.

If you haven’t yet signed up to be a member of Wolfram Community, don’t hesitate! You can join in on these discussions, post your own work in groups of your interest, and browse the complete list of Staff Picks.

I used the Wolfram Language to create several visualizations to celebrate his work and gain some new insights into his life. Last June, I wrote a Wolfram Community post about Ali’s career. On what would have been The Greatest’s 75th birthday, I wanted to take a minute to explore the larger context of Ali’s career, from late-career boxing stats to poetry.

First, I created a `PieChart` showing Ali’s record:

Ali was dangerous outside the ring as well as inside it, at least for the white establishment in the US. He converted to Islam and changed his name from Cassius Clay, which he called his “slave name,” to Muhammad Ali. Later he refused military service during the Vietnam War, citing his religious beliefs. For this, he was arrested on charges of evading the draft, and he was pulled out of the ring for four years. All this made Ali an icon of racial pride for African Americans and the counterculture generation during the 1960s Civil Rights Movement.

Perhaps a lesser-known fact about Ali is that he played an important role in the emergence of rap, and he was an influential figure in the world of hip-hop music. He earned two Grammy nominations and he wrote several poems, among which is the shortest poem in the English language:

“Me?

Whee!”

So let’s create a `WordCloud` of his most popular poems. First, I need to import his poems from a database site like Poetry Soup and do some string processing from the HTML file in order to get the poems as plain strings:

Here are the first three poems:

Then I get a list of the important words with `TextWords` and delete the stopwords with `DeleteStopwords`. Next, I style the word cloud with a boxing glove shape:

With just a glimpse, I can see that he mainly wrote about his opponents, himself and boxing.

In my Community post from last June, I showed how to create the following `DateListPlot` that shows his victories over time. Note that his suspension period happened just as his performance was rising steeply:

I imported the other data from his Wikipedia page, which allowed me to visualize where these fights took place with `GeoGraphics` and who his opponents were:

Now as a continuation of that previous post, I would like to further analyze Ali’s opponents. For this, I’m going to take the data from the BoxRec.com site, where one can find a record of all of Ali’s opponents. I’m going to skip the parsing process of the relevant data imported from the HTMLs and will directly use a dataset that I created for this purpose (see the attached file at the end of this post).

First, let’s create a `CommunityGraphPlot` with all of Ali’s opponents. I want the vertexes of the graph to represent the boxers and the edges to indicate if two boxers encountered each other in the ring. Each community here will represent a group of boxers that are more connected to each other than the rest of boxers, and they will each be represented in a different color. For this, I need the list of opponents of each of Ali’s opponents:

In addition, I can indicate the number of bouts fought by each boxer by plotting the diameter of the vertexes proportionally and also indicate the losses that Ali had during his career with red edges using `VertexSize` and `VertexLabels`, respectively (see the complete code in the attached notebook):

We can observe that Moore had the largest number of bouts. But was he better than Ali in terms victories over losses?

One way to compare the boxers is by calculating the following ratio for each one:

I can then use a machine learning function such as `FindClusters` to classify the opponents into different categories, visualized here with a `Histogram`:

Another way to compare the opponents’ records is by plotting a `BubbleChart`:

Under such a classification method, Ali is one of the greatest (as I expected), but Moore is just a “good” boxer, even if he holds the record number of wins. Although this is a nice way to compare boxers, one should be cautious—for example, I noticed that Spinks is classified as a “bad” boxer even though he beat Ali once.

Before concluding the opponents analysis, I will plot Ali’s weight over his career and compare it with the one of his rivals with `DateListPlot`:

As one should expect, Ali gained weight over the course of his career. And he had one really heavy opponent, Buster Mathis, who weighed over 250 pounds at the end of his career.

Finally, I would like to point out a fun fact that I discovered thanks to the amazing amount of knowledge built into the Wolfram Language. After winning his first world heavyweight title in 1964, there was a little boom of babies named Cassius, who are now around 52 years old. There would probably be even more people called Cassius now if he hadn’t changed his name to Muhammad Ali:

The Wolfram Language offers so many possibilities to keep exploring Ali’s life. But I will stop here and encourage you to create your own visualizations and share your ideas on Wolfram Community’s Ali thread.

*Download this post as a Computable Document Format (CDF) file along with the accompanying dataset. (Note that you should save the dataset file in the same folder as the notebook in order to load the data needed for the visualizations.) New to CDF? Get your copy for free here.*

For the past couple of years, I’ve been playing with, collecting and analyzing data from used car auctions in my free time with an automotive journalist named Steve Lang to try and get an idea of what the used car market looks like in terms of long-term vehicle reliability. I figured it was about time that I showed off some of the ways that the Wolfram Language has allowed us to parse through information on over one million vehicles (and counting).

I’ll start off by saying that there isn’t anything terribly elaborate about the process we’re using to collect and analyze the information on these vehicles; it’s mostly a process of reading in reports from our data provider (and cleaning up the data), and then cross-referencing that data with various automotive APIs to get additional information. This data then gets dumped into a database that we use for our analysis, but having all of the tools we need built into the Wolfram Language makes the entire operation something that can be scripted—which greatly streamlines the process. I’ll have to skip over some of the details or this will be a *very* long post, but I’ll try to cover most of the key elements.

The data we get comes in from a third-party provider that manages used car auctions around the country (unfortunately, our licensing agreement doesn’t allow me to share the data right now), but it’s not very computable at first (the data comes in as a text file report once a week):

Fortunately, parsing this sort of log-like data into individual records is easy in the Wolfram Language using basic string patterns:

Then it’s mostly a matter of cleaning up the individual records into something more standardized (I’ll spare you some of the hacky details due to artifacts in the data feed). You’ll end up with something like the following:

From there, we use the handy Edmunds vehicle API to get more information on an individual vehicle using their VIN decoder:

We then insert the records into an HSQL database (conveniently included with Mathematica), resulting in an easy way to search for the records we want:

From there, we can take a quick look at metrics using larger datasets, such as the number of transmission issues for a given set of vehicles for different model years:

Or a histogram of those issues broken down by vehicle mileage:

It also lets us look at industry-wide trends, so we can develop a baseline for what the expected rate of defects for an average vehicle (or vehicle of a certain class) should be:

We can then compare a given vehicle to that model:

We then use that model, as well as other information, to generate a statistical index. We use that index to give vehicles an overall quality rating based on their historical reliability, which ranges from a score of 0 (chronic reliability issues) to 100 (exceptional reliability), with the industry average hovering right around 50:

We also use various gauges to put together informative visualizations of defect rates and the overall quality:

There is a lot more we do to pull all of this together (like the Wolfram Language templating we use to generate the HTML pages and reports), and honestly, there is a whole lot more we could do (my background in statistics is pretty limited, so most of this is pretty rudimentary, and I’m sure others here may already have ideas for improvements in presentation for some of this data). If you’d like to take a look at the site, it’s freely available (Steve has a nice introduction to the site here, and he also writes articles for the page related to practical uses for our findings).

Our original site was called the Long-Term Quality Index, which is still live but showed off my lack of experience in HTML development, so we recently rolled out our newer, WordPress-based venture Dashboard Light, which also includes insights from our auto journalist on his experiences running an independent, used car dealership.

This is essentially a two-man project that Steve and I handle in our (limited) free time, and we’re still getting a handle on presenting the data in a useful way, so if anyone has any suggestions or questions about our methodology, feel free to reach out to us.

Cheers!

*Continue the conversation at Wolfram Community.*

The general idea of Ed Pegg’s tribute post honoring Martin Gardner, “Extreme Orchards for Gardner,” is to find patterns for planting trees in configurations with constraints like “25 trees to get 18 lines, each having 5 trees.” Most of the configurations look like ridiculous ideas of how to plant actual trees. For example:

I have a seven-acre apple orchard with 200+ trees in New York’s Adirondack Park, and so I read “Extreme Orchards for Gardner” as a gardener first. Of course, Pegg’s post was never intended as a proposal for how to plant actual orchards, but as I live in the middle of an orchard, I can’t help wondering, what if you did plant orchards this way?

When considering this as an actual planting pattern, we should borrow that character ubiquitous in physics: the observer. To the observer on the ground, only the center cluster would look much like an orchard; the trees at the vertices would appear to have nothing much to do with the rest.

One of my favorite physics jokes is the one about the theoretical physicist who loses his job as a professor and has to go to work as a milkman. (Once upon a time, milk was delivered to people’s houses by “milkmen.”) After a few weeks on the job, the physicist just can’t stand not being able to give lectures. So he assembles his colleagues in front of a blackboard, draws a circle on the board and begins by saying, “Consider a spherical cow of uniform density.” The representation of orchards by Martin Gardner, Branko Grünbaum and such in the usual rendition of the orchard planting problem is to real orchards as spherical cows are to the animals who produce the milk you drink. So, to some extent, the fact that trees are not points and need a certain spacing is an unfair criticism. Nonetheless, since every way I look out my windows I see real apple trees, I feel compelled to point this out. (I think Grünbaum, who was my professor many years ago and who encouraged us to reality-test our mathematical ideas, would approve.)

This is even more true for this configuration involving rows of six “trees.” Just how much land would it take to plant an orchard like this using real trees? No one would do this.

Pegg also shows some more possible configurations—like these, in which the lines pass through exactly four trees each. For actual, rather than hypothetical, trees, some of these look a bit more workable.

My own apple trees, planted in the mid-1980s, are planted in rows, which is practical if a bit boring.

There are pragmatic constraints involved in planting apple trees. The orchardist needs access to the trees from two sides, both for maintenance (pruning, spraying, etc.) and to harvest apples. Assuming semi-dwarf trees, this involves aisles with a minimum width of about 22 feet (ca. 6.7 meters), starting from the center of each trunk. The trees should be planted no closer than intervals of 16 feet (ca. 4.9 meters) to give them enough air and light.

Only configurations in which there is a small variation in the segments connecting trees could realistically be planted as something that would, on the ground, resemble an orchard. Most of the configurations would require an enormous amount of land and so are mostly mathematical abstractions rather than something one could really implement.

But the configuration on the lower left in Pegg’s four-tree grouping looks like something one could actually plant. Like so:

One advantage I see in the configurations with a small variation in segment length is that planting a portion of the orchard as pentagons within pentagons reduces the amount of grass under the trees to be maintained, thus significantly reducing mowing and therefore labor and gasoline costs. So it is not completely foolish to consider planting at least a small orchard this way.

I am attracted to the 25-tree pentagon configuration because of its empty center circle, creating a private grove space. Taking into account an air gap around the outside, my guess is that a circle in the field of about 125 feet in diameter should be big enough. That center circle could, for example, hold a very nice circle of wildflowers 20 feet across for bee forage, maybe some beehives in the center, and still leave room for equipment to navigate.

Another advantage: this would be a good layout for planting five types of trees in groups of five. They could then be easily identified in their mini-groves and harvested together. The more I thought about it, the more this became something I might actually want to do. I started shopping online for heritage varieties of apple trees, looking around at my farm for the right place to put the new trees, imagining new designs…. Hmm.

Pegg, on the other hand, is more concerned with finding new solutions to the abstract version of the orchard problem, which are indeed quite beautiful, if impractical for the planting of trees:

These contemplations make me want to go deeper into mathematical patterns to see what else might be plantable. Maybe this last “orchard” plot might work with bulbs.

]]>Computational thinking can be integrated across the curriculum. It is not just the purview of the math teacher or the computer club, but a key instructional tool for educators from all disciplines. For example, using the Wolfram Language to teach computational thinking, English teachers can explore palindromes, history students can explore main concepts from the Gettysburg Address and science teachers can examine dinosaurs’ weights.

How does a busy teacher apply computational thinking in the classroom? Easily: computational thinking provides a framework for learning, which makes concepts easier for students to understand. It incorporates real-world math into students’ everyday lives.

For instance, using the Wolfram Programming Lab during Computer Science Education Week, you can teach students to think computationally about geography. The “Miles around You” starter Exploration will allow your students to see what exists in their vicinity. Students can make a map of the location, then draw a disk of any size around it and zoom in and out to gain perception. How many sites show on the map at a radius of 100 miles? What about 150 miles?

This exercise requires no knowledge of the Wolfram Language. The activity can last as long or as short as the students and teacher desire. Yet it introduces in a relevant way how computational thinking can answer questions. As students advance with their Wolfram Language engagement, they can complete Wolfram challenges on a variety of subjects, from basketball scores to Pig Latin.

Students are often bored with math in school because they do not see the real-world applications of their lessons. Computer-Based Math education lets students use computers at school the same way they would in their everyday lives: with the computers, not the humans, performing rote calculations. Computational thinking helps students discern which calculations the computer needs to solve so they can explore higher concepts. For instance, if your students are basketball fans, they can take a Wolfram challenge to discover how a basketball team can reach a certain score. The many applications of computational thinking make it easy to incorporate math throughout the curriculum.

Computational thinking in the classroom encourages student engagement when students see the results of their efforts. Maybe your students are excited about the upcoming holidays. Why not let them create a unique decoration in the Wolfram Demonstrations Project?

This example and other Wolfram Demonstrations are accessible ways to explore computational thinking at any level of classroom. Once you’ve played with a few interactive examples, contributing your own Demonstration might be a fun and informative way for you and your students to spend an Hour of Code.

The Wolfram Summer Programs are one example of a place where students learn computational thinking through achieving their personal goals. This year at the Wolfram Summer School in Armenia, students developed their original ideas into working prototypes. Prior to the Armenian and other Wolfram camps, students prepare by completing homework assignments. Students can do the same in a flipped classroom, where they experience material before coming to class and arrive at the in-person lesson ready to engage with an activity.

If you’ve flipped your classroom, then computational thinking can be easily integrated into this environment by introducing your students to the Wolfram Language and using it to work with real-world data. An Elementary Introduction to the Wolfram Language Training Series will provide the pre-class materials for your students. Using this video series, you and your students can learn the basics of the Wolfram Language. Maybe you’re teaching an astronomy lesson this week. The Real-World Data video can introduce your students to computational thinking by using the Wolfram Language to explore planets, stars, galaxies and more—perhaps during the Hour of Code.

With computational thinking, students will learn by doing. Allow students to follow their own interests. Let them choose projects that intrigue them or relate to something they are already undertaking in class. Work computational thinking into the syllabus. Computational thinking is part of the learning process, not a single lesson.

Computational thinking can lead students to answer big questions. Are your students interested in public health? Teaming up with each other—and perhaps members of Wolfram Community—they can use the Wolfram Language to model the spread of a global disease outbreak.

Professors can teach computational thinking too. Perhaps you’re a humanities faculty member. Why not flex your own computational thinking by learning to analyze your data with the Wolfram Language? You and your students may be surprised by what you discover.

Here at Wolfram, there are more plans to help educators teach a generation of students computational thinking. For Computer Science Education Week, we will be hosting another Hour of Code event: middle- and high-school students will go on a computation adventure. If you’re unable to join us in person, why not host your own event?

If you’ve decided to have an Hour of Code, perhaps spend your time having students create tweetable programs—code that fits into 140 characters. Or analyze sea level rise, like Anush Mehrabyan did during the 2015 Wolfram High School Summer Camp. Or create a camera-controlled musical instrument. The examples are inspiring; the possibilities are exciting.

Whatever you decide to do with your students, don’t confine computational thinking and Computer-Based Math to Computer Science Education Week or an Hour of Code. Have fun exploring—and please let us know what you and your students create and learn.

]]>Over the past few months, Wolfram Community members have been exploring ways of visualizing the known universe of Wikipedia knowledge. From Bob Dylan’s networks to the persistence of “philosophy” as a category, Wolfram Community has been asking: “What does knowledge actually *look like* in the digital age?”

Mathematician Marco Thiel explored this question by modeling the “Getting to Philosophy” phenomenon on Wikipedia. “If you start at a random Wikipedia page, click on the first link in the main body of the article and then iterate, you will (with a probability of over 95%) end up at the Wikipedia article on philosophy,” Thiel explains. Using `WikipediaData`, he demonstrates how you can generate networks that describe this phenomenon.

He is able to document that about 94% of all Wikipedia articles lead to the “Philosophy” page if one follows the links as instructed, generating in the process some mesmerizing and elegant visualizations of the way that we categorize information.

University student Andres Aramburo also touched on the theme of Wikipedia categories by developing a method for clustering Wikipedia articles by topic. He began by taking a random sample of Wikipedia articles using a Wolfram Language function that he created for this specific task. He then used the links in and out of these articles to generate a graph of the relationships between them. “It’s not a trivial task” to determine if two articles are related to one another, he notes, since “there are several things that can affect the meaning of a sentence, semantics, synonyms, etc.” His visualizations include radial plots of the relationships between articles and word clouds listing shared words for related articles.

One final thread worth highlighting is Community’s celebration of the decision to award Bob Dylan the Nobel Prize in Literature. Wolfram’s own Vitaliy Kaurov created the visualization of the “Universe of Bob Dylan” featured at the top of this post. Alan Joyce (Wolfram|Alpha) generated a graph that compares the lengths of Dylan’s songs (in seconds) to the years in which they were recorded.

And first-time Wolfram Community participant Amy Friedman uploaded her submission from the 2016 Wolfram One-Liner Competition, an amusing word cloud of the poet’s songs in the shape of a guitar.

What new ways of visualizing Wikipedia knowledge can you dream up? With built-in functions like `WikipediaData` and `WikipediaSearch`, the Wolfram Language is the perfect tool for exploring Wikipedia data. Show us what you can do with those functions and more on Wolfram Community. We can’t wait to see what you create!