csv_to_sqlite: load csvs into database

Description Usage Arguments Details Author(s) See Also Examples

View source: R/csv_to_sqlite.R

Description

point at a directory and load fusion derived tabular csv data into an sqlite database

Usage

1
2
3
4
csv_to_sqlite(db, csv_folder, tb_summary = "gm_summary", tb_csv = "gm",
  project = "naip_2015", resolution = "66", units = "feet",
  proj4 = "", notes = "", skip_loaded = T, n_load = NA,
  use_col_classes = T)

Arguments

db

sqlite database connection

csv_folder

location of csv files

tb_summary

output name of summary table of csv files

tb_csv

table to dump csv files into

project

name of project

resolution

resolution of input data

units

unites of resolution

proj4

proj4 string of coordinate data

notes

any relevant notes

skip_loaded

should csv files which are already loaded be skipped

n_load

max number of files to load

use_col_classes

read colClasses from first file, and apply to remaining files - big read speedup

Details

<Delete and Replace>


Revision History

1.0 1/18/2018 header added

Author(s)

Jacob Strunk <Jstrunk@fs.fed.us>

See Also

run_gridmetrics
lasR_project

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
 library(lasR)
 dir_csv="I:\\projects\\2017_WA_DSM_Pilot\\2017Aug_NAIP\\gridmetrics1\\gridmetrics_csv\\"
   dir_sqlite="I:\\projects\\2017_WA_DSM_Pilot\\2017Aug_NAIP\\sqlite\\"
   dir.create(dir_sqlite)

   require(RSQLite)
   db <- dbConnect(SQLite(), dbname=file.path(dir_sqlite,"2015_NAIP_Metrics2.db"),sychronous = "off")


   csv_to_sqlite(db=db
                 ,csv_folder=dir_csv
   )

jstrunk001/lasR documentation built on April 20, 2020, 7:24 a.m.