Code to help clean and format the 2017 New Coder Survey by freeCodeCamp.
Table of Contents
- Introduction
- Prerequisites for data cleaning
- Download survey data
- Run script to reproduce clean data
- Read in combined data after cleaning
- Repository structure
The survey data is cleaned and the metadata (i.e. the data dictionary) is in
the datapackage.json
file, which follows closely to the specifications
described by the data packages format. The format was generated with
the help of Data Packagist.
The cleaning script clean-data-2017.R
should be run with the working
directory in R being the root of this repository.
The raw survey data will be downloaded into the raw-data/
directory.
git clone https://github.com/erictleung/2017-new-coder-survey.git
cd 2017-new-coder-survey
make download
The clean and combined data will appear in the clean-data/
directory.
make cleaning
From within R, you can run the following to read in the clean data.
library(dplyr)
setwd("clean-data") # Change this accordingly
survey <- read.csv("2017-fCC-New-Coders-Survey-Data.csv",
stringsAsFactors = FALSE) %>% tbl_df()
.
├── clean-data
│ ├── clean-data-2017.R
│ └── datapackage.json
├── Makefile
└── README.md
2 directories, 4 files