Message Boards Message Boards

API & WordCloud analytics for Russian Wolfram VK Community

Posted 10 years ago

Let explore a Russian Wolfram Community, based on site vk.com:

enter image description here

For example, we want to find the most popular name in this community:

names={};
Do[
       url=URLBuild["api.vk.com/method/wall.get",{
          "count" -> 100,
          "owner_id"->"-1172233",
          "extended" -> 1,
          "offset" -> i
         }];
       data=(Developer`ReadJSONString@URLFetch[url])["response","profiles"][[All,2]];
       names=Join[names,data],
{i, 0, 4000, 100}];
WordCloud[names]

enter image description here

As you can see, the most popular name is Alexander. So if you are Alexander, you should join us =)

POSTED BY: Anna Kudryashova
9 Replies
Posted 10 years ago

It is very interesting this example that you put, I believe that you can make use of Table and Append to make slightly more compact your code. But the idea that you've shared is very good.

Best regards

POSTED BY: Luis Ledesma

So if you are Alexander, you should join us =)

Is it possible to avoid facebook-like oddities on vk?

POSTED BY: Udo Krause

You can use your facebook account for registration.

By the way, If you wanna use an API - it's open and registration is not necessary for using API.

POSTED BY: Anna Kudryashova

I've no facebook account (because of the oddities of facebook), but the russian-language wolfram community is wolframmathematica - congratulations for still using the name $Mathematica$.

POSTED BY: Udo Krause

No way to upload a gif, jpeg, jpg, or png file invalid

because it throws an invalid_attachment_storage it should possibly understand that the current system is not in the cyrillic font face.

POSTED BY: Udo Krause

Hello, Anna I recently got introduced to extracting data from Url's through API. I love your example and I am very interested in understanding it thoroughly. Would you mind explaining me your code? I know it must be really basic to some in this community but I would appreciate it. Thanks in advance.

Sorry for the delay.. But.. Why are you trying to register on russian wolfram community site? Unfortunately it's in Russian... All I can do - give admin's contacts =)

POSTED BY: Anna Kudryashova

How Luis already mentioned, my code should be more compact. In fact, there are only 3 steps:

  1. URLBuild - crating URL for request to VK API
  2. URLFetch - getting response from VK API
  3. Putting all names from response together (unfortunately VK API allows to request only 100 records for one request, that's why I need a cycle)

Than I just create a WordCloud.

If you need more information - please ask.

POSTED BY: Anna Kudryashova

Why are you trying to register on russian wolfram community site?

Because it should be possible.

Unfortunately it's in Russian...

Sure, I read it.

POSTED BY: Udo Krause
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract