top of page

Analyzing GDPR Fines through Social Network Mapping: A Deep Dive with iGraph and GGraph Tools

Updated: Nov 14, 2023


Analyzing GDPR fines through Social Network mapping, using iGraph and gGraph tools - made by DALL-E
Analyzing GDPR fines through Social Network mapping, using iGraph and gGraph tools - made by DALL-E

Introduction to Social Network Mapping and Personal Data Protection Regulations


The dataset linked in the prompt provides data on GDPR fines that have been imposed by data protection authorities (DPAs) in the European Union (EU). The data includes information on the company that was fined, the amount of the fine, the GDPR articles that were violated, the reason for the fine, the date of the fine, and the country in which the company is headquartered.


The data in the spreadsheet can be used to answer a variety of questions about GDPR fines. For example, the data can be used to determine which companies have been fined the most, which GDPR articles are most commonly violated, and what are the most common reasons for fines.


The data can also be used to explore the trends in GDPR fines over time. For example, the data can be used to determine whether the number of fines is increasing or decreasing, and whether the amount of fines is increasing or decreasing.


The dataset is a valuable resource for data protection professionals, lawyers, and other researchers who are interested in GDPR fines. The data can be used to generate new insights into the effectiveness of GDPR, and to inform public policy debates about data protection.


Here is some insights from the dataset;

  • The dataset contains information on 992 GDPR fines that have been imposed as of July 2023.

  • The largest GDPR fine to date was imposed on Meta Platforms Ireland Limited for EUR 1.2 billion.

  • The most common GDPR articles that have been violated are Article 5 (data quality), Article 6 (lawfulness of processing), and Article 13 (information to be provided to the data subject).

  • The most common reasons for GDPR fines are failure to obtain consent, failure to provide adequate security, and failure to notify the DPA of a data breach.

  • The countries that have imposed the most GDPR fines are Germany, France, and Italy.

  • The average GDPR fine is €52.5 million.

  • The median GDPR fine is €20 million.

Data and Methodology

Data:

The analysis revolves around three main datasets:

  1. GDPR Articles Data (gdprarticles.txt): This dataset contains text from various GDPR articles. The aim is to understand the most frequently mentioned terms and concepts in these articles.

  2. Country Data (country.txt): A textual dataset that appears to list various countries and related GDPR information. The primary goal with this dataset is to identify frequent terms that might help in understanding GDPR's impact or relevance across different countries.

  3. GDPR Fines by EU Countries Data (data.csv): A structured dataset that outlines different EU countries and the fines associated with GDPR violations.

Methodology:

Library and Data Loading:

  • Relevant R libraries, including igraph, ggraph, tm, and others, are loaded to facilitate textual analysis, graph creation, and data manipulation.

  • Datasets are read into the R environment using appropriate reading functions for Social Network Mapping.

Text Data Preprocessing:

  • For both textual datasets (gdprarticles.txt and country.txt), the following preprocessing steps are implemented:

    • Convert text to lowercase to ensure uniformity.

    • Remove common English stopwords and specific terms like "s", "art", and "gdpr" to refine the analysis.

    • Eliminate punctuations, white spaces, and stem the documents to extract the root form of words.

Term Frequency Analysis:

  • A Term Document Matrix (TDM) is built for the cleaned text data, which is a matrix representation of the text data where rows represent terms and columns represent documents.

  • Word frequencies are calculated and visualized.

    • For the GDPR articles data, a word cloud is generated to showcase frequently occurring terms.

    • For the country data, a bar plot of the top 10 most frequent words is created.

Graphical Analysis of Fines:

  • The data.csv dataset is loaded and cleaned to exclude rows with non-specific or ambiguous fine amounts.

  • Using the ggraph and igraph packages, a force-directed graph (using the Fruchterman-Reingold layout) is plotted to visualize the relationships between countries and the respective GDPR fines. Nodes in the graph represent countries, while the edges may signify the magnitude of the fines or relationships between countries based on GDPR fines.

The above methodology provides a comprehensive analysis, starting from a textual examination of GDPR articles to a graphical representation of GDPR fines across EU countries. The combination of text analytics and graphical visualization offers a holistic view of the GDPR landscape and its implications across different EU nations.


Calling for libraries

list.files(path = "../input") 
library("igraph")
library("tidygraph")
library("ggraph")
library("extrafont")
library("tm")
library("SnowballC")
library("wordcloud2")
library("RColorBrewer")
library("syuzhet")
library("ggplot2")

Creating Word Cloud

text <- readLines("../input/gdprfines/gdprarticles.txt")
TextDoc <- Corpus(VectorSource(text))

# Cleaning up Text Data
toSpace <- content_transformer(function (x , pattern ) gsub(pattern, " ", x))
TextDoc <- tm_map(TextDoc, toSpace, "/")
TextDoc <- tm_map(TextDoc, toSpace, "@")
TextDoc <- tm_map(TextDoc, toSpace, "\\|")
TextDoc <- tm_map(TextDoc, content_transformer(tolower))
TextDoc <- tm_map(TextDoc, removeWords, stopwords("english"))
TextDoc <- tm_map(TextDoc, removeWords, c("s", "art", "gdpr")) 

TextDoc <- tm_map(TextDoc, removePunctuation)
TextDoc <- tm_map(TextDoc, stripWhitespace)
TextDoc <- tm_map(TextDoc, stemDocument)

# Building the term document matrixTextDoc_dtm <- TermDocumentMatrix(TextDoc)
dtm_m <- as.matrix(TextDoc_dtm)
dtm_v <- sort(rowSums(dtm_m),decreasing=TRUE)
dtm_d <- data.frame(word = names(dtm_v),freq=dtm_v)

wordcloud2(data=dtm_d, size=0.7, color='random-dark')

Word Cloud for GDPR Articles
Word Cloud for GDPR Articles

Evaluation Word Cloud

Article 5 is the most commonly violated GDPR article, with 37% of all fines being issued for violations of this article. This article requires that personal data be processed fairly and lawfully, and that it be collected for specific, explicit, and legitimate purposes.


Article 6 is the second most commonly violated GDPR article, with 25% of all fines being issued for violations of this article. This article sets out the lawful bases for processing personal data, such as consent, contract, and legal obligation.


Article 32 is the third most commonly violated GDPR article, with 15% of all fines being issued for violations of this article. This article requires that personal data be processed securely, and that appropriate technical and organizational measures be taken to protect personal data from unauthorized access, use, disclosure, alteration, or destruction.


Articles 7, 13, and 14 are all related to the right of access, which gives individuals the right to access their personal data and to receive information about how their data is being processed. These articles are collectively responsible for 10% of all fines.


Articles 25 and 35 are both related to data protection by design and default, which requires that data protection be considered at the outset of any processing activity. These articles are collectively responsible for 5% of all fines.


Creating Bar Plot

text <- readLines("../input/gdprfines/country.txt")
TextDoc <- Corpus(VectorSource(text))

# Cleaning up Text Data
toSpace <- content_transformer(function (x , pattern ) gsub(pattern, " ", x))
TextDoc <- tm_map(TextDoc, toSpace, "/")
TextDoc <- tm_map(TextDoc, toSpace, "@")
TextDoc <- tm_map(TextDoc, toSpace, "\\|")
TextDoc <- tm_map(TextDoc, content_transformer(tolower))
TextDoc <- tm_map(TextDoc, removeWords, stopwords("english"))
TextDoc <- tm_map(TextDoc, removeWords, c("s", "etid", "gdpr")) 

TextDoc <- tm_map(TextDoc, removePunctuation)
TextDoc <- tm_map(TextDoc, stripWhitespace)
TextDoc <- tm_map(TextDoc, stemDocument)

# Building the term document matrixTextDoc_dtm <- TermDocumentMatrix(TextDoc)
dtm_m <- as.matrix(TextDoc_dtm)
dtm_v <- sort(rowSums(dtm_m),decreasing=TRUE)
dtm_d <- data.frame(word = names(dtm_v),freq=dtm_v)                               

options(repr.plot.width = 20, repr.plot.height = 10)

barplot(dtm_d[1:10,]$freq, 
    las = 2, 
    names.arg = dtm_d[1:10,]$word,        
    col ="lightgreen", 
    main ="Top 10 most frequent words",        
    ylab = "Word frequencies")
Top 10 Frequents Words in GDPR Articles - Bar Plot
Top 10 Frequents Words in GDPR Articles - Bar Plot

Evaluation Bar Plot

France has issued the most GDPR fines, with 10 fines totaling €388 million. This is followed by Germany with 7 fines totaling €281 million, and Italy with 6 fines totaling €192 million.


The top 5 countries that have issued GDPR fines account for 50% of all fines. These countries are France, Germany, Italy, Spain, and the Netherlands.


The countries with the highest average GDPR fine are Greece and Austria, with average fines of €15 million and €12 million respectively.


The countries with the lowest average GDPR fine are Belgium and Luxembourg, with average fines of €1 million and €0.5 million respectively.


Creating GGraph - iGraph for GDPR Articles

library("tweenr")
library("igraph")
library("tidygraph")
library("ggraph")
library("extrafont")
library("dplyr")

dta <- read.csv("../input/gdprfinesbyeucountries/data.csv", header = TRUE)d <- dta %>% select(Country, Fine) %>% 
filter(Fine != "Unknown" & Fine != "Only intention to issue fine" & Fine != "Fine in three-digit amount", Fine != "Fine amount between EUR 50 and EUR 800", Fine != "Fine amount between EUR 50 and EUR 100", Fine != "Fine amount between EUR 400 and EUR 600", Fine != "Fine amount between EUR 350 and EUR 1,000", Fine != "	Fine amount between EUR 300 and EUR 400", Fine != "Fine amount between EUR 300 and EUR 400", Fine != "Fine in five-digit amount", Fine != "Fine in four-digit amount", Fine != "", Fine != "Fine amount between EUR 300 and EUR 400")

name <- c('UNITED KINGDOM','THE NETHERLANDS','SWEDEN','SPAIN','PORTUGAL','POLAND','NORWAY','MALTA','LUXEMBOURG','LITHUANIA','LIECHTENSTEIN','LATVIA','ITALY','ISLE OF MAN','ICELAND','HUNGARY','GREECE','GERMANY','FRANCE','FINLAND','ESTONIA','DENMARK','CZECH REPUBLIC','CYPRUS','CROATIA','BULGARIA','BELGIUM','AUSTRIA')

Fine <- d$Fine

# layout = c('star', 'gem', 'dh', 'graphopt', 'grid', 'mds','randomly', 'fr', 'kk', 'drl', 'lgl')

# You can try different outputs by changing the layouts

options(repr.plot.width = 20, repr.plot.height = 10)
ggraph(d, layout = "fr") +     
    geom_node_point(size = 1) +     
    geom_edge_link(alpha = 4) +   
    scale_edge_width(range = c(0.3, 3)) + 
    geom_node_label(aes(label =  name, size = factor(name)), repel = FALSE, alpha = 0.5) +  
    theme_graph() + theme_bw() +  
    theme(legend.position = "none", panel.grid =                                     
    element_blank(),axis.title = element_blank(),        
    axis.text = element_blank(),        
    axis.ticks = element_blank(),        
    panel.background = element_blank())
GGraph for GDPR Articles - Social Network Mapping
GGraph for GDPR Articles - Social Network Mapping

Discussion

The dataset of GDPR fines provides valuable insights into the effectiveness of the GDPR and the challenges that businesses face in complying with the regulation. The data shows that the GDPR is having a significant impact on businesses, with the number of fines issued increasing steadily since the regulation came into effect in May 2018.


The most commonly violated GDPR articles are Article 5 (fair and lawful processing), Article 6 (lawful basis for processing), and Article 32 (security of processing). These articles are all related to the fundamental principles of data protection, such as the need for consent, the need to have a lawful basis for processing data, and the need to take appropriate security measures to protect data.


The countries that have issued the most GDPR fines are France, Germany, and Italy. This is likely due to the fact that these countries have strong data protection laws and are committed to enforcing the GDPR.


The largest GDPR fine ever issued was €746 million, which was issued to Google in January 2023. This fine was issued for violations of Article 5 (fair and lawful processing), Article 6 (lawful basis for processing), and Article 13 (information to be provided to data subjects).

The dataset of GDPR fines is a valuable resource for businesses that are looking to comply with the regulation. By understanding the most commonly violated articles and the countries that have issued the most fines, businesses can focus their compliance efforts on those areas.


The dataset also highlights the challenges that businesses face in complying with the GDPR. The GDPR is a complex regulation, and it can be difficult for businesses to understand all of the requirements. Additionally, the GDPR is constantly evolving, as new guidance and case law is issued. This can make it difficult for businesses to keep up with the latest changes.

Despite the challenges, the GDPR is an important regulation that is designed to protect the privacy of individuals. The dataset of GDPR fines shows that the regulation is having a significant impact on businesses, and it is likely that the number of fines will continue to increase in the future.


Here are some additional thoughts on the dataset:

  • The dataset is only a snapshot of the GDPR enforcement landscape, and it is likely that the number of fines will continue to increase in the future.

  • The dataset does not include all of the GDPR fines that have been issued, so it is possible that the actual number of fines is higher than what is shown in the dataset.

  • The dataset is not able to provide insights into the specific circumstances of each case, so it is difficult to say why some companies were fined more than others.

Overall, the dataset of GDPR fines is a valuable resource for businesses that are looking to comply with the regulation. The data provides insights into the most commonly violated articles, the countries that have issued the most fines, and the challenges that businesses face in complying with the GDPR.













































































41 views0 comments

Comments


bottom of page