Creating a single data frame from a folder of similarly structure CSV spreadsheets.

Description

Like Voltron-ing your data

Usage

bulk_csv(folder = “DEFAULTBULKCSV2017”, export = “filenamedefaultbulkcsv2017.csv”)

Arguments

Note

This package is based on readr, so passing on variables from read_csv will work in bulk_csv. These variables will apply to the import of each CSV sheet.

Documentation

In this example, these CSVs reside in a folder called state_data.

Folder full of CSVs

The data structure must be similar for each data set, as in column names and data types within the columns are consistent.

Or the bulk join will not work.

To create a new dataframe with all the data sets combined, the command would be:

combined_data <- bulk_csv(folder="state_data")

To simply export the data as a new combined CSV file, the command would be:

bulk_csv(folder="state_data", export="combined_data.csv")

This would save the file to the current working directory.

You can specify the location to download in export as long as you put the folder structure before the CSV file name, like:

bulk_csv(folder="state_data", export="data_export/combined_data.csv")