Skip to main content

WOLFRAM / Digging BIG Data for Visualization

My personal interest in Wolfram from the start is because of Wolfram's BIG KNOWLEDGE BASE. And also the way Wolfram could "filter" and "re-present" those data back to users in an interactive and rich kind of way.

I supposed it would be a really good personal case study and research for DATA VISUALIZATION.

If you are interested in Data Science, you should also check thing like R Programming. Or maybe look up some ways Python can process data.

SomethingData[]

Now, we know that Wolfram knows A LOT. However to access those knowledge, we need some kind of understanding about the way Wolfram store the data.

We can tell Wolfram to QUERY data using Wolfram Language SYMBOL, which I believe it will give you ENTITY, and further more the PROPERTIES of ENTITY.

For example:
1) Supposed we want to know more about our PLANET: Earth. Wolfram recognize this "Earth" as a String. What if we want to actually find out more about ENTITY called EARTH?
2) We could use the CTRL+ EQUAL and let Wolfram guess the ENTITY.
3) Which of course will give us back something like this: Entity["Planet", "Earth"]

By knowing the ENTITY, we can then further dig in the data.

Coincidentally, Wolfram Language has special SYMBOL, that deals with Planet Data, conveniently called: PlanetData[]

Please look up Wolfram Language Reference about PlanetData[] command to find out more details.

Quick example below is to query the AGE of EARTH:


You can apparently give it a list of planets:


Oppositely you can give it a list of properties you want to find out about.


And... something like this:



Further more, from documentation, you can see that the PlanetData[] command itself will give you all the list of the Planets. So we can do something like below:


And apparently you can add argument called: "EntityAssociation" and ended up with list like below.


That is a quick look at PlanetData[].

There are others, below are some of my favourite "SomethingData[]":

  • MovieData[]
  • CountryData[]
  • SpeciesData[]
  • PersonData[]
  • DictionaryLookup[]
  • CulturalData[]
I found something interesting, like with CountryData[], apparently giving it multiple list of PROPERTIES to query returns an error... but I can query PROPERTY for MANY COUNTRIES at the same time such as:

"Shape" (in Maps)



"Flag"

"Capital City"


I found that even at this level of exploration, Wolfram has amazing feature.

I could export out the Shape as SVG format for those countries and bring it into Blender 3D, for example and I could make a more interesting 3D render this way.

The Shape map of Australia is a bit screwed, maybe the SVG is not clean. Nevertheless, this is still interesting usage.
Country Flag Data as SVG, the color even comes with it.

FUNNY ACCIDENT

Actually during this exploration I found out few things. A long way, but sometimes more robust way, to get to the PROPERTY of ENTITY is by using EntityValue:

Table[   EntityValue[Table[Entity["Country", x], {x, {"Brazil", "Cuba"}}], x], {x, {"Name", "Population", "Flag"}}   ]


Above is actually a mistake, we should have done it like this:
EntityValue[ Table[Entity["Country", x], {x, {"Brazil", "Cuba"}}] , {"Name", "Population", "Flag"} ] 


Making "mistakes" like this is actually a great way to advance you in programming, only if you do not stop or giving up. We need to figure out the mistake and fix it. Read documentation and continue being curious to find out more.

TableForm[]


Grid[]







Comments

Popular posts from this blog

PYTHON / OpenCV, Recreate Uncanny Manga - Anime Style

Can you tell what it is? Computer Vision. Yesterday, I spend almost whole day exploring this opencv module using Python. What I discovered was revealing. Even at the very basic level, I could produce some interesting Image and Video manipulation using all the code collected from documentation and many, many blog tutorials. If you are a total noob like me, I am still getting used to knowing that the CV in OpenCV means Computer Vision! Actuallly, I recalled that I did try to get into OpenCV few years back ago, when I knew no Python and when Python opencv module was probably still early. It was all C++ code and it was a little bit too hard for me. I read a couple of books about opencv at the library, I did not understand a single thing. That was back then. Today, for strange reason, with a bit of knowledge of Python, I can go a little further. EDGE DETECT IN OPENCV Me holding you know what. What leads me this far is my curiosity on how we can replicate Wolfram Langu

PYTHON PROCESSING / It only really begins ...

Back into Processing again, with Python! While Daniel Shiffman is continuously inspiring us with his CODING TRAIN series on YouTube, using Processing with Java and Javascript language, I decided to free my mind and trying to really do something using Processing and Python language. Installing Python language version on Processing 3 is easy enough, just first download the latest Processing and install the Python language mode via Add Mode button. Other link that might help: https://github.com/jdf/processing.py http://py.processing.org/tutorials/ BLANK MODE As soon as Processing Python Mode, opens up and running I am presented with a  blank environment. Suddenly I recalled my journey in learning programming from zero until now... With Python, outside Processing, commonly people will be introduced to Python IDE or IDLE environment. Something that looks like Console Window or Command Prompt, where we type single liners command. Python Command Line and IDE normally have t

WOLFRAM / Making Text With Rainbow Color

Continuing with my Wolfram Mathematica Trial Experience... I watched and went through some more Mathematica introduction videos, read lots of Mathematica documentation and also going through the Wolfram Lab Online again a few times. There are some major learning curves and Mathematica is a lot different from normal programming language. Sometimes there is a lot of interesting "shortcuts", say like: FindFaces[] , WordCloud[] . Sometimes I got a little confused on how one can do iterations. Normally FOR LOOP concept is introduced early, but in Wolfram, because everything is EXPRESSIONS and ENTITY (like OBJECTS), sometimes it gets quite quirky. Mind you I am still in the first impression and having to look at many tutorials. Lots of NEAT EXAMPLES from documentation, but sometimes I got lost. I found Wolfram to be really awesome with LIST and generating list. It's almost too easy when it works visually. I cannot explain them with my own words yet, but there are