YEARP is repeated on person records." # But after using ifelse it is gone cps_data % mutate( YEAR = ifelse(YEAR = 1962, 62, NA)) ipums_var_desc(cps_data $YEAR) #> NA # So you can use the DDI ipums_var_desc(cps_ddi, "YEAR") #> "YEAR reports the year in which the survey was conducted. Library(ipumsr) library(dplyr, nflicts = FALSE) # Note that you can pass in the loaded DDI into the `read_ipums_micro()` cps_ddi "YEAR reports the year in which the survey was conducted. Library(ipumsr) library(dplyr, nflicts = FALSE) # Note that you can pass in the loaded DDI into the `read_ipums_micro()` cps_ddi % select_if(is.labelled) #> # A tibble: 7,668 × 3 #> STATEFIP MONTH INCTOT #> #> 1 55 3 4883 #> 2 55 3 5800 #> 3 55 3 99999998 #> 4 27 3 14015 #> 5 27 3 16552 #> 6 27 3 6375 #> 7 19 3 99999999 #> 8 19 3 0 #> 9 19 3 600 #> 10 19 3 99999999 #> # ... with 7,658 more rows # Notice how the tibble print function shows the dbl+lbl class on top # Investigate labels ipums_val_labels(cps_data $STATEFIP) #> # A tibble: 75 × 2 #> val lbl #> #> 1 1 Alabama #> 2 2 Alaska #> 3 4 Arizona #> 4 5 Arkansas #> 5 6 California #> 6 8 Colorado #> 7 9 Connecticut #> 8 10 Delaware #> 9 11 District of Columbia #> 10 12 Florida #> # ... with 65 more rows # Convert the labels to factors (and drop the unused levels) cps_data % mutate( STATE_factor = as_factor( lbl_clean(STATEFIP))) table(cps_data $STATE_factor, useNA = "always") #> #> Iowa Minnesota North Dakota South Dakota Wisconsin #> 1892 2362 1 0
A better finder attributes 6 serial download#
Wrong version of these two will download a file with a. However, Safari users must select “Download Linked File” instead On most browsers you should right-click the file and select “Save As…”.
Once your extract is complete, download the data file and the DDI.ĭownloading the DDI is a little bit different depending on your browser. Should choose to download your data in either a fixed-width text (.datįile extension) or comma delimited (.csv file extension) format. Only the samples and variables that are relevant to your researchįor microdata projects (all supported projects except NHGISĪnd IPUMS Terra), once you have created your extract, you Website provides an interactive extract system that allows you to select Registered users can download IPUMS data from our website at.