Skip to content

The R code to calculate marital compatibility between people with different degrees

License

Notifications You must be signed in to change notification settings

TimeMagazine/marriage_by_degrees

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Marriage by Degrees

The R code to calculate marital compatibility between people with different academic degrees

Getting started

  • You need R, and I recommend RStudio
  • Unzip the IPUMS data (ipums/usa_00094.sav.zip) file manually or via unzip ipums/usa_00094.sav.zip

The Data

The raw data was compiled from six years of American Community Survey data via ipums.org, the fantastic Census microdata site, in SPSS format (.sav) for easy importing into R. You can see the codebook for the extract at ipums/usa_00094.txt, which contains all the information on the variables that were extracted.

Citation: IPUMS-USA, University of Minnesota, www.ipums.org.

Running the script

You need the "foreign" library, which you can install manually through the R interface or like so:

install.packages("foreign")

Then open analyze.R to see the heavily commented code, data.Rproj in RStudio for a nice visual version, or just run the file:

RScript analyze.R

This will spit out a file called filtered.csv with all of the information used in the interactive.

LICENSE

Creative Commons Attribution 4.0

tl;dr

You are free to:

  • Share — copy and redistribute the material in any medium or format
  • Adapt — remix, transform, and build upon the material for any purpose, even commercially.
  • You must give appropriate credit by linking to this repository and the associated TIME article, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.

About

The R code to calculate marital compatibility between people with different degrees

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages