Experiences from extracting large data sets from Swedish

  • Slides: 41
Download presentation
Experiences from extracting large data sets from Swedish public offices Fredrik Liljeros 2022 -02

Experiences from extracting large data sets from Swedish public offices Fredrik Liljeros 2022 -02 -14 1

Outline • Why use data sets from public offices? • Three example of available

Outline • Why use data sets from public offices? • Three example of available Swedish datasets Workplace and household data In-patient data Data of suspected criminals • Problems with Swedish public office data

Sociological data • • Expensive to collect Time consuming (Especially time series) Low response

Sociological data • • Expensive to collect Time consuming (Especially time series) Low response rate Network data are associated with special problems

Sampling of Network Data

Sampling of Network Data

We can’t use a random sample

We can’t use a random sample

Extracting data from existing databases!

Extracting data from existing databases!

Sweden may be seen as an outlier when it comes to available public data

Sweden may be seen as an outlier when it comes to available public data • 1686 All priests was ordered to keep track of all people living in their parishes (We had a state church until 2000 in Sweden) • 1749 First census • 1756 Foundation of the governmental office ”Tabell kommisionen” (Sweden and Finland) • 1858 Foundation of Statistics Sweden SCB (www. SCB. SE)

All individuals officially living in Sweden have an unique identifier ”personnummer” 700209 -0960

All individuals officially living in Sweden have an unique identifier ”personnummer” 700209 -0960

Example 1 The Sweden database

Example 1 The Sweden database

The network • Individuals 8, 861, 392 • Families 4, 641, 829 • Workplaces

The network • Individuals 8, 861, 392 • Families 4, 641, 829 • Workplaces 437, 936

Giant component 5 942 389 Average path distance 8. 5 Diameter 22

Giant component 5 942 389 Average path distance 8. 5 Diameter 22

Send home (or vaccinate) everyone except max size of workplace

Send home (or vaccinate) everyone except max size of workplace

Send home people randomly

Send home people randomly

Average path distance

Average path distance

Example 2 Data about suspected criminals

Example 2 Data about suspected criminals

The data • All individuals that have been registered as suspected for having committed

The data • All individuals that have been registered as suspected for having committed a criminal act for every year between 1997 and 2005 • Total number of suspected individuals: 348 402 • Types of crimes: 144 • Total number of reported individual crimes: 924 783 • Average number of suspected crime types per individual: 2. 65 • Standard deviation of number of suspected crime types per individual: 3. 3

Purpose • Can social network visualization tools help us to give a better sense

Purpose • Can social network visualization tools help us to give a better sense of how different crimes are related to each other?

Basic concepts • Node: A specific type of crime. (For example, • “Assualt, outdoors,

Basic concepts • Node: A specific type of crime. (For example, • “Assualt, outdoors, against child 0 -6 year of age, unacquainted with the victim” • “Trafficking for sexual purposes “ • Link: Exists between two types of crimes if at least one individual have been suspected for both crimes different years

Example 2002 Bank “Robbery, with firearm, (Bank)” Post “Robbery, with firearm, (Post)” 2005

Example 2002 Bank “Robbery, with firearm, (Bank)” Post “Robbery, with firearm, (Post)” 2005

The mess of all violent crimes

The mess of all violent crimes

A minimum spanning tree

A minimum spanning tree

What is a minimum spanning tree? 4 1 3 6 2 5

What is a minimum spanning tree? 4 1 3 6 2 5

Number of mutual links A B

Number of mutual links A B

Number of mutual links may not be a good measure

Number of mutual links may not be a good measure

Highly correlated A B

Highly correlated A B

Weak correlation A B

Weak correlation A B

A simple measure of correlation between crimes

A simple measure of correlation between crimes

A simple Example A B

A simple Example A B

A minimum spanning tree based on crime correlation

A minimum spanning tree based on crime correlation

A minimum spanning tree based on crime correlation with a lower threshold of 0.

A minimum spanning tree based on crime correlation with a lower threshold of 0. 01

The “mess” of sexbuyers

The “mess” of sexbuyers

A minimum spanning tree of suspected crimes of suspected sex buyers based on crime

A minimum spanning tree of suspected crimes of suspected sex buyers based on crime correlation

Conclusion • To play with different graphs may give a good first picture of

Conclusion • To play with different graphs may give a good first picture of how different crimes are associated with each other • We still need traditional statistical techniques to test hypotheses • Existing software package are not very user friendly (Three different softwares was needed to produce these pictures Windows SQL server, Mathcad and Pajek)

Example 3 Data about inpatients in a hospital system

Example 3 Data about inpatients in a hospital system

The hospital network

The hospital network

The network • • • All hospitalizations of individuals in Stockholm 2001 -2002 295,

The network • • • All hospitalizations of individuals in Stockholm 2001 -2002 295, 108 individuals 570, 382 institutional, healthcare occasions 702 wards located at different hospitals The mean number of patients admitted to the wards, per day, varied between one and 69 (mean 10. 05 and standard deviation 9. 44)

Degree distributions

Degree distributions

Duration of hospital stays

Duration of hospital stays

Problem with Swedish public office data • You usually have to pay for the

Problem with Swedish public office data • You usually have to pay for the data • You are only allowed to use the data for the purpose you bought i for • You can’t share the data for free • Swedish data may not be of general interest

A last animation

A last animation

Relevant publications

Relevant publications