Module 12. Social Network Analysis
Once I had the correct Python version installed, the code for building and visualizing the social network worked smoothly. Using NetworkX made it easy to generate the random graph structure, and Plotnine provided a clean, ggplot-style way to visualize the nodes and edges. The final plot rendered clearly, and saving it as a PNG was straightforward! The biggest issue I ran into was with package compatibility. My computer was using Python 3.13, but the Plotnine package is not supported on that version yet. Because of that, the install kept failing and the plotnine module couldn't be imported. I solved the problem by installing Python 3.11, which is fully compatible with Plotnine. After switching to Python 3.11 and reinstalling the required packages, everything ran correctly. Yes — I would definitely use this approach again. NetworkX and Plotnine work well together: NetworkX handles the graph structure, while Plotnine gives me fine control over the aesthetics. For simple social netwo...