<｜begin▁of▁sentence｜>### Instruction:
As an IT manager, you have been tasked with analyzing the network structure of a newly implemented system in your organization. You have a randomly generated Erdős-Rényi graph with 100 nodes and a connection probability of 0.05, which represents the connections between different components in the system. Using the igraph API, you are required to calculate and visualize the degree distribution of this network in order to better understand the connectivity patterns and identify potential areas for optimization.
### Response:
import igraph as ig
import matplotlib.pyplot as plt

# Create a sample graph
graph = ig.Graph.Erdos_Renyi(n=100, p=0.05)

# Calculate the degree distribution with a bin width of 1
degree_distribution = graph.degree_distribution(bin_width=1)

# Extract the degree counts and the corresponding degree values
degree_counts = degree_distribution['bins']
degrees = range(len(degree_counts))

# Plot the degree distribution
plt.bar(degrees, degree_counts)
plt.xlabel('Degree')
plt.ylabel('Frequency')
plt.title('Degree Distribution of the Graph')
plt.show()
<|EOT|>
