--- date: 02/19/2024 author: Fatma Saffan, Aiman Hanif, Nathan Goehring, Feyza Sakin format: html: theme: cosmo toc: true embed-resources: true --- # CS-24-330-capstone/tools/src ## Command Descriptions In this directory, the built-in commands are stored. Below, command with their descriptions are listed. | The Command | Description | Notes | |-----------------|-----------------|-----------------| | add_csv_to_database | Adds the data in a given folder to the "scannedData.db" sqlite database based on its metric after converting it to csv format | | | clean_convert_to_csv | Converts Excel and txt files in the given path to CSV type files | | | create_clean_folder | Creates a new folder with the given path | | | dbtable-to-csv | Prints data from a specific table in SQLite database "data.db" to a CSV file with the given table name | Doesn't show data from "scannedData.db" | | scan_for_new_files | Scan the given directory for all files and compare against the database | | | move_csv_new_folder | Moves all the CSV files in the given path to a new folder | | | reset-database | Reset the data in the SQLite database by deleting all records from all tables corresponding to the provided data folder path. | | ## List of codes to format the data before adding to the database | The Code | Description | Notes | |-----------------|-----------------|-----------------| | format_dominion | Processes dominion files by reading the first line for column titles and saving "Date" column's values as date values | | | format_ecap | Processes ECap files by reading the first line for column titles and removing quotation marks that "ccf" column's values are in | | | format_navigator | Processes navigator files by parsing the datetime column to separate into date and time and adding column names | | | format_pme | Processes PME files by reading the first line for column titles, removing quotation marks that the column titles are in, and parsing the "Timestamp" column values, which has both date and time values, into "PME - date" and "PME - time" | | | format_waterscope | Processes waterscope files by skipping lines until column titles "Number", "Date", "Consumption", "Flow Rate", "Hourly Total", "Daily Total","Daily Read", and "Billing Read" are read | It deletes the origional file that it reads, and it replaces with a new file that is in the command's format. | | format_weather | Processes weather files by reading the first line for column titles and parsing the "valid" column values, which has both date and time values, into "weather - date" and "weather - time" | | ## Additional Notes: 1 - To have README.html using the README.qmd, "quarto render README.qmd to --html"