1

I have downloaded the full ("all data") version of the college scorecard data form https://collegescorecard.ed.gov/data/. Along with the data it contains an extensive data dictionary listing variable names, descriptions and labels for categorical variables. The team I am working with prefer to use Stata, so we would like to load this dictionary in along with the data. Has someone already written Stata code to do this?

Edited to clarify: The data have a large number of categorical variables stored as numbers. For instance, the variable "CONTROL" can take values 1, 2 and 3. According to the data dictionary (CollegeScorecardDataDictionary-09-12-2015.csv) these values correspond to Public, Private nonprofit and Private for-profit respectively. To have Stata recognize these labels I could manually enter the command:

label define CONTROL 1 "Public" 2 "Private nonprofit" 3 "Private for-profit"

In R we would run something like:

CONTROL <- factor(CONTROL, levels = c(1,2,3), labels = c("Public", "Private nonprofit", "Private for-profit"))

I want to do this so that my software automatically gives meaningful names when preparing tables and so I don't have to go searching through the data dictionary manually whenever I want to look at the data directly.

Now obviously I should not write code analogous to the above for all variables by hand. Instead I can write some code that loops over all the variables in the data dictionary and, for those with labels, loops over those labels and assigns them to the relevant number. Before I do this task I thought I would ask if someone had already solved this problem.

  • just a heads up - voting to close as off-topic because this seems to be seeking....open-sourced solutions for proprietary data? is that correct? – albert Mar 9 '16 at 2:46
  • @albert No, the data are publicly available. I have edited the question to clarify. I'll be working with people using Stata, which one does have to pay for, to analyze the data, but the question could equally well apply to R (as above). – Adam J Smith Mar 10 '16 at 23:35
  • 1
    so closed source solutions. did you try the mailing list/forum/whatever they have first? i guess it doesn't hurt you to ask, so more power to you. you should start recreating stata in javascript and then open source it. hint hint. – albert Mar 11 '16 at 0:59

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.