Function Repository Resource:

WolframChallengesData

Source Notebook

Retrieve information about Wolfram Challenges

Contributed by: Richard Hennigan (Wolfram Research)

ResourceFunction["WolframChallengesData"][]

gets a Dataset containing information about all published Challenges.

ResourceFunction["WolframChallengesData"]["request"]

gets data specified by "request".

Details and Options

In ResourceFunction["WolframChallengesData"]["request"], "request" can be any of the following:
"Challenges"gets the titles of available Challenges
"Keys"gets the available keys
"Profile"gets the profile data for the current user
"Leaderboard"gets leaderboard data for Challenges
ResourceFunction["WolframChallengesData"] takes the following options:
"Challenges"Allwhich Challenges to get
"Keys"Automaticthe properties of the Challenges
"IncludeImages"Truewhether to include profile images in the response
If authenticated with the cloud, the data will include user statistics for each challenge as well.

Examples

Basic Examples (4) 

Get a Dataset containing Challenge information:

In[1]:=
ResourceFunction["WolframChallengesData"][]
Out[1]=

Get your Challenges profile information:

In[2]:=
ResourceFunction["WolframChallengesData"]["Profile"]
Out[2]=

Find the most recently published Challenge:

In[3]:=
MaximalBy[ResourceFunction["WolframChallengesData"][], #Date &]
Out[3]=

Find the most popular Challenge:

In[4]:=
MaximalBy[
 ResourceFunction["WolframChallengesData"][], #SubmissionCount &]
Out[4]=

Scope (4) 

Find Challenges that have been solved by the currently connected user:

In[5]:=
solvedByMe = Select[ResourceFunction["WolframChallengesData"][], #SolvedByMe &]
Out[5]=

See the number of Challenges you've solved over time:

In[6]:=
DateListPlot@
 MapIndexed[{#1, First[#2]} &, Sort@Lookup[Values@Normal@solvedByMe, "FirstSolvedByMe"]]
Out[6]=

Get a random Challenge that you haven't solved yet:

In[7]:=
RandomChoice@
 Select[ResourceFunction["WolframChallengesData"][], ! #SolvedByMe &]
Out[7]=

Click the Open button to start working on the Challenge:

Options (4) 

IncludeImages (2) 

With "IncludeImages" set to True, profile images will be included in the data:

In[8]:=
ResourceFunction["WolframChallengesData"]["Leaderboard", "Challenges" -> "Aliquot Sequence", "IncludeImages" -> True]
Out[8]=

Set "IncludeImages" to False to return URLs instead:

In[9]:=
ResourceFunction["WolframChallengesData"]["Leaderboard", "Challenges" -> "Aliquot Sequence", "IncludeImages" -> False]
Out[9]=

Challenges (1) 

Specify which Challenges to use:

In[10]:=
ResourceFunction["WolframChallengesData"][
 "Challenges" -> {"Fizz Buzz", "Butterflied Strings"}]
Out[10]=

Keys (1) 

Specify which keys to use:

In[11]:=
ResourceFunction["WolframChallengesData"][
 "Keys" -> {"Description", "TrendingScore"}]
Out[11]=

Applications (1) 

Solve a random Challenge:

In[12]:=
NotebookOpen@
 RandomChoice[
   ResourceFunction["WolframChallengesData"]["Keys" -> "Notebooks"]][
  "Notebooks", "Desktop"]
Out[12]=

Possible Issues (2) 

User-specific information will only be available if you are currently cloud connected:

In[13]:=
CloudDisconnect[];
ResourceFunction["WolframChallengesData"]["Keys" -> "SolvedByMe"]
Out[14]=

Use CloudConnect to get your personalized information:

In[15]:=
CloudConnect[];
ResourceFunction["WolframChallengesData"]["Keys" -> "SolvedByMe"]
Out[16]=

Neat Examples (1) 

View a WordCloud of all the descriptions:

In[17]:=
descriptions = ResourceFunction["WolframChallengesData"]["Keys" -> "Description"]
Out[17]=
In[18]:=
WordCloud@
 StringRiffle[
  ImportString[#, "HTML"] & /@ Normal@Values@descriptions[All, "Description"], "\n"]
Out[18]=

Requirements

Wolfram Language 11.3 (March 2018) or above

Version History

  • 1.0.0 – 13 October 2018

License Information