IT Hacking Cases Currently Under Investigation in 2023 – Python

Python code

# Import necessary libraries
import plotly.express as px

# Given data
import pandas as pd

data = pd.DataFrame({
  'State': ["VA", "OK", "MA", "IL", "IL", "IL", "TX", "AZ", "TX", "CT", "OH", "NY",
            # ... (continuing data)
            "TX", "FL"],
  'Individuals_Affected': [10140, 500, 134394, 192231, 126000, 248943, 599367, 47485, 501, 527,
                           # ... (continuing data)
                           1064, 5264, 1039, 61170]
})

# Define a beautiful color palette
beautiful_colors = ["#FF7F50", "#FFD700", "#40E0D0", "#FF1493", "#20B2AA", "#9932CC", "#87CEEB", "#00FF7F", "#FFA07A", "#00CED1",
                    "#FF69B4", "#32CD32", "#FF4500", "#6A5ACD", "#B0C4DE", "#ADFF2F", "#FFA500", "#00FFFF", "#1E90FF", "#FFD700",
                    "#008080", "#FF6347", "#2E8B57", "#4682B4", "#556B2F", "#8B008B", "#F08080", "#E9967A", "#7FFF00", "#4B0082",
                    "#E6E6FA", "#7CFC00", "#FF00FF", "#00FF00", "#800000", "#191970", "#B22222", "#A0522D", "#DAA520", "#808000",
                    "#8B4513", "#5F9EA0", "#F4A460", "#778899", "#D2691E", "#00BFFF", "#DA70D6", "#FF00FF", "#00FA9A", "#800080",
                    "#FFD700", "#DC143C", "#6495ED", "#D8BFD8", "#ADFF2F"]

# Create an interactive bar plot using plotly with beautiful colors
fig = px.bar(data, x='State', y='Individuals_Affected', color_discrete_sequence=beautiful_colors,
             labels={'State': 'State', 'Individuals_Affected': 'Individuals Affected'},
             title='IT Hacking Cases Currently Under Investigation in 2023')

# Display the plot
fig.show()

 

Leave a Reply

Your email address will not be published. Required fields are marked *