last day (15 days later) » 

10:32
Hello!
10:45
Heya!
I needa catch some sleep soon
But I am not sure what the ** and * is doing in the code. I did some searching and came across *arg and **kwargs; am I looking in the right direction?
I also tried editing my main post to represent the dataframes in the format you suggested, but my table is somehow preventing me from editing the post.
I keep getting the error "Your post appears to contain code that is not properly formatted as code."
I think something with the 00:00:00+00:00 is causing the issue. The error goes away when I delete the 00:00:00+00:00 from 2015-02-18 00:00:00+00:00.
Did I use ** and * in my code?
11:01
From here: single['magnitude']**2
Of course...
It's squared
2 squared is written 2**2
Oh wow I feel dumb
Don't worry
I think ** and * is used both for args, kwargs and maybe even for unpacking of dictionaries.
So, yeah... you're actually looking in the right direction for other uses
As for the reason **2 is there in the first place;
It's just to give a visual impression of the magnitude of the quakes
If you only use the source data, like 5.1 and 5.2, there's virtually no difference in how they appear in the figure. And **2 helps remedy that, at least to some extent.
The (1 + r['dupes'] / 10) part is a bit more interesting, but it's just used to offset the markers and annotations for dates where there are multiple quakes. I wrote that in the comments section just before we started talking in chat.
Ok that makes sense.
The first dupe is offset value*1.1 (10%)
The second dupe is offset value*1.2 (20%)
I found this suitable for a limited value of dupes and how the figure appeared.
All good?
11:13
Yeah makes sense. I printed out the values of r['dupes'] and it clicked
I understand now
OK, cool!
If you're happy with my suggestion, checking the accepted mark is appreciated
Done.
Thanks!

last day (15 days later) »