Coder Social home page Coder Social logo

seacucumber-location-extraction's Introduction

Sea Cucumber Location Extraction from ROV Data

This code is used specifically to extract sea cucumber location data on Remotely Operated Vehicle (ROV) missions through a collaboration between Macquarie University (MQ), GeoNadir, and the University of Newcasctle (UoN). It matches items in a CSV file with the closest timestamps in shapefiles and saves the results to a new CSV file.

Installation

To run this code, you need to set up the necessary environment. Here's how to do it:

  1. Install Miniconda (Optional)

    If you don't have Miniconda or Anaconda installed, you can download and install Miniconda, a minimal installer for Conda. Visit the Miniconda website and follow the installation instructions for your operating system.

  2. Create a Conda Environment (Optional)

    Once Miniconda is installed, you can create a new Conda environment for this project. Open your terminal or command prompt and execute the following commands:

    • Create a new environment:

      conda create -n seacucumber-env python=3.7
    • Activate the environment:

      conda activate seacucumber-env
  3. Install Required Libraries

    Install the necessary libraries using pip or conda in your environment:

    pip install geopandas pandas shapely argparse fiona pyogrio

    or with Conda:

    conda install -c conda-forge geopandas pandas shapely fiona pyogrio
  4. Download and Organize Your Data

    • Prepare your CSV file with item data and ensure it has a 'datetime' column. The format of the date and time shoud be compatible with ISO format, e.g. YYYY-DD-MM hh:mm:ss
    • All rov gps track has been renamed and organised in the ./rov_trackpts folder, with each shapefile containing a 'ltime' (timestamp) field.

Running the Code

To execute the code, follow these steps:

  1. Open your terminal or command prompt.

  2. Download the code from the GitHub repository to your desired location using the git clone command. Use the download button above or specify the directory where you want to save the code with the command below:

    git clone repository_url /path/to/your/code-directory

    and navigate to the directory where the code script is located:

    cd /path/to/your/code-directory
  3. Run the code with the following command, replacing the placeholders with your specific file paths:

    python main.py /path/to/your/csv_file.csv /path/to/your/shapefile_folder /path/to/output_csv_file.csv

    Example:

    python main.py ./test/gouldreef-rov-id.csv ./rov_trackpts ./test/gouldreef-testoutput.csv
  4. The code will process the data and generate the output CSV file with sea cucumber locations.

  5. You can visualise the cuke location in QGIS or other gis platform that can read csv files.


Note: This code is designed for a specific collaborative project and may require customization for use in other contexts.

© Joan Li, 2023

Make sure to customize the installation and usage instructions with your specific file paths and script name.

seacucumber-location-extraction's People

Contributors

joanlyq avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.