18 Comments
Dec 30, 2023Liked by Stephen Gruppetta

Spinning globe animation - very nice!

Instead of random dots what about the following:

cities = [

{"name": "Tokyo", "coordinates": (35.6895, 139.6917)},

{"name": "Delhi", "coordinates": (28.6139, 77.2090)},

{"name": "Shanghai", "coordinates": (31.

{"name": "Lahore", "coordinates": (31.5497, 74.3436)},

{"name": "London", "coordinates": (51.5074, -0.1278)},

{"name": "Lima", "coordinates": (-12.0464, -77.0428)},

{"name": "Bangkok", "coordinates": (13.7563, 100.5018)},

]

I am a beginner and not fit to adapt the code. But I can provide a longer list of cities.

Regards

Rolf

Expand full comment
author

That’s a great idea. Converting the latitudes and longitudes to the starting positions in this animation shouldn’t be too difficult. And we could have the names of the cities moving along with the dots too. Let’s do it...

Expand full comment
Dec 31, 2023Liked by Stephen Gruppetta

First of all I wish you a good start into the new Year.

The short list of cities is just to test the concept. The longer list contains 48 major cities. The positive values indicate North or East and the negative values ar for South and West. If there is a need later on for more cities to make the globe round one could access openstreetmap.org.

If the data does not fit this textbox, I would need an emailadress of yours.

Kind regards

Rolf

cities = [

{"name": "Tokyo", "coordinates": (35.6895, 139.6917)},

{"name": "Delhi", "coordinates": (28.6139, 77.2090)},

{"name": "Shanghai", "coordinates": (31.2304, 121.4737)},

{"name": "São Paulo", "coordinates": (-23.5505, -46.6333)},

{"name": "Mumbai", "coordinates": (19.0760, 72.8777)},

{"name": "Mexico City", "coordinates": (19.4326, -99.1332)},

{"name": "Osaka", "coordinates": (34.6937, 135.5023)},

{"name": "Cairo", "coordinates": (30.0444, 31.2357)},

{"name": "New York City", "coordinates": (40.7128, -74.0060)},

{"name": "Beijing", "coordinates": (39.9042, 116.4074)},

{"name": "Istanbul", "coordinates": (41.0082, 28.9784)},

{"name": "Lahore", "coordinates": (31.5497, 74.3436)},

{"name": "London", "coordinates": (51.5074, -0.1278)},

{"name": "Lima", "coordinates": (-12.0464, -77.0428)},

{"name": "Bangkok", "coordinates": (13.7563, 100.5018)},

{"name": "Paris", "coordinates": (48.8566, 2.3522)},

{"name": "Berlin", "coordinates": (52.5200, 13.4050)},

{"name": "Madrid", "coordinates": (40.4168, -3.7038)},

{"name": "Rome", "coordinates": (41.9028, 12.4964)},

{"name": "Moscow", "coordinates": (55.7558, 37.6176)},

{"name": "Sydney", "coordinates": (-33.8688, 151.2093)},

{"name": "Seoul", "coordinates": (37.5665, 126.9780)},

{"name": "Munich", "coordinates": (48.8566, 2.3522)},

{"name": "Toronto", "coordinates": (43.6532, -79.3832)},

{"name": "Cape Town", "coordinates": (-33.918861, 18.423300)},

{"name": "Singapore", "coordinates": (1.3521, 103.8198)},

{"name": "Dubai", "coordinates": (25.276987, 55.296249)},

{"name": "Los Angeles", "coordinates": (34.0522, -118.2437)},

{"name": "Chicago", "coordinates": (41.8781, -87.6298)},

{"name": "San Francisco", "coordinates": (37.7749, -122.4194)},

{"name": "Amsterdam", "coordinates": (52.3676, 4.9041)},

{"name": "Rio de Janeiro", "coordinates": (-22.9068, -43.1729)},

{"name": "Stockholm", "coordinates": (59.3293, 18.0686)},

{"name": "Athens", "coordinates": (37.9838, 23.7275)},

{"name": "Bangalore", "coordinates": (12.9716, 77.5946)},

{"name": "Montreal", "coordinates": (45.5017, -73.5673)},

{"name": "Vienna", "coordinates": (48.8566, 2.3522)},

{"name": "Hong Kong", "coordinates": (22.3193, 114.1694)},

{"name": "Istanbul", "coordinates": (41.0082, 28.9784)},

{"name": "Buenos Aires", "coordinates": (-34.6118, -58.4173)},

{"name": "Johannesburg", "coordinates": (-26.2041, 28.0473)},

{"name": "Toronto", "coordinates": (43.6532, -79.3832)},

{"name": "Vancouver", "coordinates": (49.2827, -123.1207)},

{"name": "Zurich", "coordinates": (47.3769, 8.5417)},

{"name": "Warsaw", "coordinates": (52.2297, 21.0122)},

{"name": "Oslo", "coordinates": (59.9139, 10.7522)},

{"name": "Copenhagen", "coordinates": (55.6761, 12.5683)},

{"name": "Marrakech", "coordinates": (31.6295, -7.9811)},

{"name": "Nairobi", "coordinates": (-1.286389, 36.817223)},

]

Expand full comment
author

Well start with these. Thanks. I’ll have a go at making the changes over the coming days!

Expand full comment

Hi Stephen,

did you make progress incorporating cities?

all the best

Rolf

Expand full comment
author

Not yet. But it’s on to do list. It’s been a bit busy with the launch of two platforms! But I’ll get there!

Expand full comment
Dec 29, 2023Liked by Stephen Gruppetta

I voted for the Substack version only because the text is larger

Expand full comment
author

Ah, that’s something I could easily fix on the image snippets. The problem with larger fonts is that lines have to be shorter, which can be restrictive in some cases

Expand full comment
Jan 6Liked by Stephen Gruppetta

Yeah, the joys of reading code on a phone when you need a large font. It's not particularly fun, but my phone is always on me and so my best source of reading anything

Expand full comment

Why is Substack’s code block option so bad? 🤦‍♂️ Congrats on the incredible achievements this year, Stephen!

Expand full comment
author

Thanks Logan! I have a view on the code blocks issue but didn’t want to bias people too much. But I may copy-paste a comment I made in the Tech Writers Discord server about this. Let me fetch it...

Expand full comment
author

From a comment I made elsewhere: “The code blocks issue is one example for me, for example, and fits to some extent with the superficial style things you mention. I occasionally get people saying they'd prefer to be able to copy-paste code directly from the article. And yes, I agree. But in my view, the poor native option Substack offers makes the articles much harder to read and follow. Reading code is never easy. Reading code in a tutorial of a subject you're learning about is even harder. So the clear syntax highlighting and formatting of code blocks is really important for me in my articles.”

Expand full comment

I'm in the same boat Stephen. The lack of syntax highlighting means I'm apologizing for how difficult the code is to read. I think I'm going to follow your approach with the linked gist. I had the exact same reservations where I wanted it to be easy for readers to copy, but making it easier to read is more important. Are you just using a snapshot of your GitHub gist or is there a nice way to output it as a png?

Expand full comment
author

I use snappify.io which allows me to format it the way I want

Expand full comment

You managed to produce a huge amount of work even when you were doing it in your spare time. Amazing!

Also, congratulations on the launch of your platforms.

Expand full comment
author

Thanks Abhinav. Yes, almost all these articles were written late at night or during the weekends.

Hopefully, this will change in 2024 and they'll become one of the activities I do during my "normal working day", whatever that is!

How are you finding full-time content creation?

Expand full comment
Dec 31, 2023Liked by Stephen Gruppetta

early to bed and early to rise makes a man healthy, wealthy, and wise 🙂

Expand full comment
author

As suggested by Rodrigo (can't seem to tag in comments!), another option for choosing random starting points is to choose random angles for the azimuth and elevation which, for a fixed radius, goves a point on the sphere. This would give a uniform distribution of points on the sphere…

Expand full comment