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

Description

Like Voltron-ing your data

Usage

bulk_excel(folder=“DEFAULTBULKCSV2017”, export=“filenamedefaultbulkcsv2017.xls”)

Arguments

Note

This package is based on readxl, so passing on variables from read_excel will work in bulk_excel. These variables will apply to the import of each Excel spreadsheet.

Documentation

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

Folder full of Excel sheets

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_excel(folder="state_data")

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

bulk_excel(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_excel(folder="state_data", export="data_export/combined_data.csv")