Message Boards Message Boards

Relative medal per country rankings for 2024 Paris Olympic

Posted 4 months ago

Relative medal per country rankings for 2024 Paris Olympic

Attachments:
POSTED BY: Michael Rogers
8 Replies

It worked when I moved the code to new unmodified notebook with default stylesheet then evaluated it. Interesting!
Thank you Michael!

POSTED BY: Ahmed Elbanna

Hi Ahmed,

Try

SetOptions[EvaluationNotebook[],StyleDefinitions->"Default.nb"]

No idea why that would fix things. I tried it on WolframCloud, and it seemed to fix it. Still, I don't see why that would fix the desktop. As I said, it works for me on my laptop as is.

POSTED BY: Michael Rogers

Hi Vitaliy,

Probably there are visualizations. I was reacting to the ubiquitous medals tables on TV and the web.

I don't know what to say about $Aborted. I've run the code several ways. After restarting the kernel, after restarting Mathematica. I've run the code in the notebook attached to the OP; from the wolframcloud.com version it came from; from my personal desktop version. Every time I run it on my laptop, I don't get $Aborted. I don't see how I could possible fix something that does not happen for me.


OK, I just tried this on WolframCloud. I opened the notebook for the OP on Cloud. The dataset displayed as $Aborted three times in a row. I then changed the stylesheet:

SetOptions[EvaluationNotebook[],StyleDefinitions->"Default.nb"]

Then the dataset displayed as a table.

However, $Aborted does not happen on my MacBook Pro (M1). Not with any notebook that I mentioned: not the one from the OP, not my Cloud copy, not my original laptop one.

I don't understand, but maybe the changing the stylesheet will fix things.

POSTED BY: Michael Rogers

enter image description here -- you have earned Featured Contributor Badge enter image description here Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

POSTED BY: EDITORIAL BOARD

Hi Ahmed,

Sorry it's giving you trouble. I've never had it abort for me, except on WolframCloud. My laptop is a Mac. Since you're at Wolfram, I assume you know about the dynamic timeout limit. But for me, the dynamic content takes about a second, certainly less than two seconds, to update (counting Mississippis to myself). Anyway that's less than the timeout (which I believe is 5-6 sec.). But I believe the result of the timeout is usually$Aborted, which is why I thought of it.

I don't really know how to time it on wolframcloud.com. The initial evaluation takes 17-18 sec.; updates take 5-6 sec. (measured between click on the webpage and rendering). It usually does not abort, although it has aborted on the web.

Thanks for your interest. If you happen to discover something funny I did in my code, please let me know. I thought I doing fairly normal operations.

Michael

POSTED BY: Michael Rogers

@Michael, this is very cool post, thanks for sharing! These thoughts crossed my mind imidiately:

  • Are not there some graphical means of visualization we can invent for this? I am thinking about it myself. Tables might be less easy to grasp.

  • Running your code on Mac desktop V14.1 I got the following result (some other folks reported issues too):

enter image description here

POSTED BY: Vitaliy Kaurov

Hi Michael,

Thank you for sharing this!
The interface aborts for me on desktop V14. Do you have an idea why?

POSTED BY: Ahmed Elbanna

Apparently Dynamic[] things don't behave well when import into this community site. I suppose it's the dependence on global variables (hence the error showing medalassoc hasn't been initialized). Instead of trying to guess how to fix it, here's an image of the output rankings:

enter image description here

POSTED BY: Michael Rogers
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