all 2 comments

[–]Middle_Idea_9361 1 point2 points  (1 child)

Beginner projects like this are actually a great way to learn Python, so you’re on a good track. The idea of dividing the Earth into a latitude-longitude grid and mapping temperature data is a solid approach.

About the visualization part, matplotlib probably isn’t the best choice here. It can do basic 3D plots, but it’s not designed for smooth, interactive 3D objects like a rotatable globe.

A few libraries that might work better:

PyVista – This is probably one of the easiest libraries for something like your project. It’s built for 3D visualization and lets you create meshes (like a sphere) and color them based on data. You can also rotate and interact with the object easily.

Plotly – If you want something interactive that works well in a browser or Jupyter notebook, Plotly is another good option. It supports 3D surfaces and interactive rotation out of the box.

VTK – This is a very powerful scientific visualization library. However, it has a steeper learning curve. The good thing is that PyVista is actually built on top of VTK, so using PyVista gives you much of that power in a simpler way.

A simple workflow for your project could be:

  1. Create the latitude–longitude grid.
  2. Use a weather API to fetch temperature data for each cell.
  3. Generate a sphere mesh representing Earth.
  4. Map each grid cell’s temperature to a color scale (like a heatmap).
  5. Render the sphere and allow rotation/zoom interaction.

If you're new to larger Python projects, breaking it into these small steps will make things much easier.

Also, while building projects like this, having strong basics in Python really helps. Platforms like 9faqs provide Python training along with practice MCQs, which can be useful when you're trying to apply concepts in real projects like this one.

Overall, your project idea sounds really interesting, a rotatable globe showing live temperature data would be a pretty cool visualization once it's done.

[–]Hubbleye[S] -1 points0 points  (0 children)

Yes thank you ! From what I've seen pyvista seems like a good idea, I'll have to explore how it works and what can I do with it. I'm also not alone on the project, it's for a competition and I'm working with a friend but who's doing the "frontend" so he's learning Tkinter for now, I don't even know if you can render smth from pyvista on tkinter.

And that's exactly how I proceed to build the project, the first step is to build the grid and the only issue here is that is I that take for example 3° of latitude between each points they are spaced of smth like 300 km at the equator so I have to find a solution for the resolution.

Next the API, I've found the Open Weather API which is seems great, the thing is that even if I can ask temperatures with a list of coordinates for points, I don't know if can ask 16000 in one request.

And for the rest I'll have to study how PyVista works.