We are happy to see so many people excited about the Wolfram Language! We have had so much fun in the booth playing with the Wolfram Language and seeing what it can do - we can't wait to share it with people all over the world.
Yesterday, we used a webcam and wrote a program that detects faces as they move in front of the camera. You can even try this out in Mathematica, version 9
Dynamic[
image = CurrentImage[];
faces = FindFaces[image, {100, 1000}];
Show[{image, Graphics[{EdgeForm[{Red, Thick}], FaceForm[], Rectangle @@@ faces}]}]
]
People stopped by the booth asking us to find the countries in Latin America. So we did:
CountryData["LatinAmericaCaribbean"]
And then we wanted to see their flags:
Show[CountryData[#, "Flag"], ImageSize -> 50] & /@
CountryData["LatinAmericaCaribbean"]
But which flag is for which country? We added tooltips:
Tooltip[Show[CountryData[#, "Flag"], ImageSize -> 50], #] & /@
CountryData["LatinAmericaCaribbean"]
And this gave rise to the idea of a map of the world, using country flags:
With[{world = CountryData[]},
GeoGraphics[{EdgeForm[Black],
Append[
Transpose[{
GeoStyle["Image", #] & /@ EntityValue[world, "Flag"],
EntityValue[world, "Polygon"]
}],
{GeoStyle["Image",
EntityValue[Entity["Country", "UnitedStates"], "Flag"]],
EntityValue[Entity["USState", "Alaska"], "Polygon"]}
]},
GeoBackground -> GeoStyle["ReliefMap"]
]
]
Here's a web form that guesses your age and makes a PNG, based on your name:
CloudDeploy[
FormFunction[
{"name", "Enter name"} -> "GivenName",
Row[{"You are probably ",
EntityValue[
#name,
EntityProperty["MostCommonAge", SourceEntityType -> "GivenName", FormatName -> "most common age"]],
" old"}] &,
"PNG"
]
]
Hitting "Submit" gives me a webpage with this:
And instead of FormFunction, we could have used APIFunction to build this as an API:
CloudDeploy[
APIFunction[
{"name" -> "GivenName"},
Row[{"You are probably ",
EntityValue[#name,
EntityProperty["MostCommonAge", SourceEntityType -> "GivenName",
FormatName -> "most common age"]], " old"}] &,
"PNG"
]
]
We are sad to say that today is the last day of our trade show - we are so enjoying our time in Austin and at SXSW, and we love sharing Wolfram Language with new people. Come say hi!