FLOCK.DataLoading
index
c:\users\james\gitrepos\gps-ruck\flock\dataloading.py

Functions for loading of .CSV data for movement analysis
 
Datasets should be organized such that each row of the csv is one timepoint
each individual should have a column for latitude and longitude, or UTM x and y

 
Modules
       
gpxpy
os
pandas

 
Functions
       
load_data(data_dir)
From a data directory, load a list of all group movement datasets
 
Each file in the directory should be .csv with data from one group's movement activity
Each row in the file represents one timepoint for one idividual and
they should have 'latitude' and 'longitude' columns or 'UTM_x' and 'UTM_y' columns
 
Args:
    data_dir (str): filepath where data is located
 
Returns:
    datasets (list): list of DataFrames, one for each group movement dataset
pivot_datsets(datasets)
Pivot datasets to work with processing functions
 
This pivots the dataset such that each row is one timepoint 
all group members are included in each timepoint
 
Args:
    datasets (list): list of raw Dataset dfs
 
Returns:
    new_dfs (list): list of pivotted Dataset dfs