https://github.com/ansleybrown1337/water-data-converter-in-r-and-python
Tool created to convert old and new water quality data formats back and forth both using R coding language and Python for educational purposes
https://github.com/ansleybrown1337/water-data-converter-in-r-and-python
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.4%) to scientific vocabulary
Repository
Tool created to convert old and new water quality data formats back and forth both using R coding language and Python for educational purposes
Basic Info
- Host: GitHub
- Owner: ansleybrown1337
- License: mit
- Language: Python
- Default Branch: main
- Size: 114 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md

Water Quality Data Format Converter
This repository serves as a dual-purpose tool: it not only provides utilities to convert between new and old water quality data formats used by the Colorado State University (CSU) Agricultural Water Quality Program (AWQP) but also acts as an educational resource for those interested in learning about performing the functions using both Python and R coding languages.
Table of Contents
Introduction
With the ever-changing nature of data standards, the need for converting between new and old formats becomes crucial and commonplace for many organizations. This repository contains scripts in both R and Python to perform an example conversion using water quality data, providing an opportunity for users to compare and contrast methodologies across two popular programming languages.
Directory Structure
Code: This directory contains all the R and Python scripts used for converting data formats.R: Folder containing R scripts.Python: Folder containing Python scripts.
Example Data: Sample datasets in the old and new formats to help users understand the kind of data the scripts work with.images: Contains banner PNGOutput: This directory is where the converted files will be saved after running the scripts.
Getting Started
Clone the repository:
bash git clone https://github.com/your-username/water-quality-data-converter.git cd water-quality-data-converterIf you are using Python, it's recommended to set up a virtual environment. I personally use VS Code and Miniconda3 as my IDE.
bash python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate` pip install -r requirements.txtFor R users, make sure to install the required packages listed in the
requirements.Rfile. I use R Studio with R as my IDE.
Usage
[!NOTE]
This is example usage at the moment, exact usage will be refined as the code is developed and finalized
Python
Navigate to the Code/Python directory:
bash
cd Code/Python
Run the script:
bash
python converter.py --input "../Example Old Data/sample_old_data.csv" --output "../Output/sample_new_data.csv"
R
Navigate to the Code/R directory:
bash
cd Code/R
Run the script:
bash
Rscript converter.R --input "../Example Old Data/sample_old_data.csv" --output "../Output/sample_new_data.csv"
Bugs and Future Work
- Code works with example data, but didn't work with test kerbel data. Need to figure out why.
Contribute
Contributions are always welcome! Please read the CONTRIBUTING.md file for details on how to contribute.
License
This project is licensed under the MIT License. See the LICENSE.md file for details.
Owner
- Name: AJ Brown
- Login: ansleybrown1337
- Kind: user
- Company: Colorado State University
- Website: sites.google.com/view/ansleyjbrown
- Repositories: 4
- Profile: https://github.com/ansleybrown1337
Data Specialist & Agronomist | Ag Water Quality Program