View source: R/csv_to_sqlite.R
csv_to_sqlite | R Documentation |
point at a directory and load fusion derived tabular csv data into an sqlite database
csv_to_sqlite( db_path = "c:/temp/gridmetrics_compilation.sqlite", 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, ncore = 4, dir_status = "c:\\temp\\csv_to_sqlite_status\\some_project\\" )
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 |
ncore |
number of parallel threads to use at one time, ssds can handle many |
dir_status |
a way to report the status of the parallel threads, there is an output file for each input csv with at TRUE or FALSE in the name for write status |
db |
sqlite database connection |
<Delete and Replace>
This program is free software but it is provided WITHOUT WARRANTY and with ABSOLUTELY NO GUARANTEE of fitness or functionality for any purpose; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Revision History
1.0 | 1/18/2018 header added |
1.1 | 1/21/2021 parallel writes enabled |
Jacob Strunk <jacob.strunk@usda.gov>
run_gridmetrics
lasR_project
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 )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.