Package: bgcombine
BGCombineBGCombine is a tool for transforming and combining data from ProCare.  This can be used for individual reports, aggregate ADA data, and concatenating aggregate data on to existing documents.InstallationThis program is designed to run on Linux, MacOs, and Windows Subsystem for Linux.
You will need to be sure that you have installed Python.UsageIn general, the tools will use patternbgcombine<command>[--o<output_path>--c<path_to_concatenate>--filtered<path_to_children_and_family_data>]CommandsInfobgcombineinfo--o~/outputInfo is used for combining student and family data from ProCare (in the "all format"). It will also create an IdXSite field for unique multi-site identification along with the name of the site for each student. The functionrequiresall source files to be prefixed with the site number. E.g. "101monthly_attendance_data" for the O.C. If no output path is specified, the current working directory will be used.Attendancebgcombineattendance--o~/output--c~/Documents/concat_doc.xlsx--filtered~/Documents/info_data_2023.xlsxAttendance is used for combining attendance data from ProCare. It will create a by-student attendance count as well as a duplicated check, along with the IdXSite field for multi-site identification.  Attendance also generates an ADA report and can be combined with the --c option to concatenate that information onto an existing historical data document.  If no output path is specified, the current working directory will be used.Enrollmentbgcombineenrollment--o~/outputEnrollment is used for getting the number of enrolled students by site for each site.  Any vision file may be used for this as long as it includes the fields Unit Code and Membership Number. Results are output to the console. If an output path is specified, the result will also be output to an Excel spreadsheet in the intended location.Cumulativebgcombinecumulative--o~/output--blacklistCumulative is used for getting a cumulative count of students (by site and total) across a given time frame.  It is designed to be used with Vision data containing "Member Full Name", Membership Number, and All Groups.  The program prints individual unit counts for both general studetns and teen students to the console along with total counts for both of those categories.  In addition, information on both general students and teens will be outputted to an Excel file, including which term the students last attended for as well as the specific location and program of that attendance.  If no output path is specified, the current working directory will be used.Argumentsinput_pathOnce a command is entered, a user will see the following prompt:Enterpathtoinputfolder:User should input theabsolutepath to a directory that holds all of the ProCare files for the intended operation.OptionsOutput Path (--o)The repository for combined output files. Do not specify a file name at this time.Concatenate (--c)Concatenate is an option used to append ADA data to an existing document along with datestamps of when that info was generated.  Its argument is the path to the file that should be concatenated.Filtered (--filtered)Filtered is an option to use a site data file created with command Info as a filter on procare data.  It will populate the "is_active" field with true or false values based on if the students in the attendance file exist in the given site data file.Output Unsorted Members (--blacklist)Option for use in the cumulative command.  List of unsorted members will be output to console and to a file in the specified output directory.Note to DevelopersSome portions of these programs may need to be amended as file types shift.  The most notable change will be to the cumulative.py file.  The start and end dates of terms are hard-coded in such as in:defis_teen(is_term_1,is_summer,dob):ifpd.isnull(dob):return0true_dob=datetime.strptime(str(dob),"%Y-%m-%d%H:%M:%S")ifis_term_1==1:return1ifrelativedelta(datetime(2023,5,26),true_dob).years>=13andrelativedelta(datetime(2023,5,26),true_dob).years<20else0elifis_summer==1:return1ifrelativedelta(datetime(2023,7,21),true_dob).years>=13andrelativedelta(datetime(2023,7,21),true_dob).years<20else0else:return1ifrelativedelta(datetime(2023,9,30),true_dob).years>=13andrelativedelta(datetime(2023,9,30),true_dob).years<20else0(similar code in the get_age function)
The dates in the datetime objects will need to be amended.Another amendment will be the blacklists, defined at the top of both general counting and teen counting code blocks:blacklist=['000','503','205','204','411','309']The unit codes of discluded units must be kept up to date, because the entire count hinges on these blacklists.LicenseMIT