# Mac PC
nameOfReport <- "Homebase_Report.R"
hmisDataPath <- "C:/Users/Ladvien/Dropbox/HMIS/Warehouse/All Projects 2016 -- 10-01-2013 to 02-17-2017 -- HMIS CSV 5.1"
vispdatDataPath <- "C:/Users/Ladvien/Dropbox/HMIS/Coordinated_Entry_Report/VI-SPDAT and HUD Flat Export for SQL -- 3-6-2017.xlsx"
staffInfoDataPath <- "C:/Users/Ladvien/Dropbox/HMIS/Coordinated_Entry_Report/Staff Contact Info for SQL -- 3-6-2017.xlsx"
executionPath <- "C:/Users/Ladvien/Dropbox/HMIS/Coordinated_Entry_Report"
hmisFunctions <- "C:/Users/Ladvien/Dropbox/HMIS/HMIS_R_Functions/HMIS_R_Functions.R"
hmisGraphsPath <- "C:/Users/Ladvien/Dropbox/HMIS/Warehouse/TX-601_Graphs"
source(hmisFunctions)
enrollment <- loadEnrollment(hmisDataPath)
##############################################
############## Point Map #####################
##############################################
# https://thedhrelay.wordpress.com/2014/04/08/creating-a-density-map-in-r-with-zipcodes/
library(plyr)
library(ggmap)
library(zipcode)
personalIDsAndZips <- sqldf("SELECT ...
Veteran's Report 2.0
#homebaseFunctionFilePath <- "C:/Users/Ladvien/Dropbox/HMIS/Homebase_Function/Homebase_Function.R"
#nameOfReport <- "Homebase_Report.R"
#hmisDataPath <- "C:/Users/Ladvien/Dropbox/HMIS/Warehouse/All Programs -- 5.1 -- 12-1-2016 to 2-28-2017"
#vispdatDataPath <- "C:/Users/Ladvien/Dropbox/HMIS/Coordinated_Entry_Report/VI-SPDAT and HUD Flat Export for SQL -- 3-6-2017.xlsx"
#staffInfoDataPath <- "C:/Users/Ladvien/Dropbox/HMIS/Coordinated_Entry_Report/Staff Contact Info for SQL -- 3-6-2017.xlsx"
#executionPath <- "C:/Users/Ladvien/Dropbox/HMIS/Coordinated_Entry_Report"
#hmisFunctionsFilePath <- "C:/Users/Ladvien/Dropbox/HMIS/HMIS_R_Functions/HMIS_R_Functions.R"
#homebaseFunctionFilePath <- "C:/Users/Ladvien/Dropbox/HMIS/Homebase_Function/Homebase_Function.R"
#outputPath <- "C:/Users/Ladvien/Dropbox/HMIS/Warehouse"
#veteranMasterListTemplateFilePath <- "C:/Users/Ladvien/Dropbox/HMIS/Veteran Report 2.0/Veteran_Report_v2/Master-List-Template ...
Coordinated Entry By-Name-List using HMIS CSV 5.1, R, and SQL
This is a build out of TX-601's Coordinated Entry By-Name List. The report is written using SQLDF inside of an R environment.
Homebase Function
homebase <- function(
hmisDataPath,
vispdatDataPath,
staffInfoDataPath,
executionPath,
hmisFunctionsFilePath,
viSpdat2DataPath,
clientContactInfoPath) {
library("tcltk")
# Load the weights for progress bar
loadingPackagesIncrement <- 2
loadingHMISDataIncrement <- 10
addDisabilitiesIncrement <- 5
householdIdIncrement <- 4
calculatingAgeIncrement <- 1
gettingEnrollmentsIncrement <- 10
gettingStaffInfoIncrement <- 5
calculatingCHIncrement <- 10
addVispdatIncrement <- 5
getFamilyWithChildIncrement <- 5
loadServicesIncrement <- 15
nbnStaysIncrement <- 5
outreachContactsIncrement <- 5
outreachAndNbnCountIncrement <- 5
clientContactinfoIncrement <- 3
makeHmisCodesReadableIncrement <- 2
formatHomebaseIncrement <- 1
# Find the progress bar max.
total <- (loadingPackagesIncrement +
loadingHMISDataIncrement +
addDisabilitiesIncrement +
householdIdIncrement +
calculatingAgeIncrement +
gettingEnrollmentsIncrement +
gettingStaffInfoIncrement +
calculatingCHIncrement +
addVispdatIncrement +
getFamilyWithChildIncrement +
loadServicesIncrement +
nbnStaysIncrement +
outreachAndNbnCountIncrement +
makeHmisCodesReadableIncrement +
formatHomebaseIncrement +
clientContactinfoIncrement
)
# Initialize progress bar ...
Lumi4 -- LumiCommunication
Lumi Communication
This namespace contains the serial device handling functions. The goal is to have two abstract classes which define the interaction between the main device and the peripheral These two classes will be responsible for searching, connecting, exchanging data, closing connections, and device failure handling. To get going I'm going to take some advice from Mythical Man Month: "Show me your flowcharts and conceal your tables, and I shall continue to be mystified. Show me your tables, and I won’t usually need your flowcharts; they’ll be obvious." Well, I don't have tables, so I guess my charts ...
Lumi4 - init()
Lumi4
This is the next iteration in a three year project. Here are the current iterations:
- Vorpal Hoff -- an attempt at wireless uploading with a HM-11 and LPC1114 combination. Written in C / C++ (Initialized May 22nd 2014).
- HM-1X Aid -- this project was meant to be a GUI on top of the HM-1X modules, allowing "easy" editing of the module's behavior. It was my first venture into C#. (It's sooo bad;although, the serial communication was asynchronous.) (Initialized Dec. 19th 2015)
- Lumi1 -- this the first successful TinySafeBoot uploader. It was written in C# using the .NET WinForms. Unfortunately, it was synchronous ...
Lumi3 Debriefing Notes
C# Learning Journal: Refactoring Lumi
Lumi Uploader
I’ve been working on writing my own flash UART uploader since May 2014. Originally, I was trying to write an uploader in C using the GCC compiler. The idea was to upload a Intel HEX file compiled for the LPC1114 to the uC remotely, using a Bluetooth LE connection. Here’s a description of the custom circuit board designed for the project:
Unfortunately, the project was out of my league. After spending months writing C code there it was not usable. Of course, learned a lot about C in ...
JPS DSRIP Report V2.0
JPS DSRIP Report V2.0
options(java.parameters = "-Xmx14336m") ## memory set to 14 GB
library("XLConnect")
library("sqldf")
library("tcltk")
startDate <- "2015-10-01"
endDate <- "2016-09-30"
df <- readWorksheetFromFile("JPS_Raw_Data.xlsx", sheet = 1, startRow = 2)
#sampleVector <- sample(1:nrow(df), 30000)
#df2 <- df[sampleVector,]
#write.csv(df2, file="Sample of JPS_Raw_Data (30000).csv", na="")
#df3 <- read.csv("Sample of JPS_Raw_Data (30000).csv")
### Formatting ###################################
df3[is.na(df3)] <- ""
df3$Participant.Enterprise.Identifier <- gsub("-", "", df3$Participant.Enterprise.Identifier)
colnames(df3)[2] <- "peid"
colnames(df3)[5] <- "CaseNumber"
colnames(df3)[7] <- "Gender"
colnames(df3)[8] <- "Race"
colnames(df3)[9] <- "Ethnicity"
colnames(df3)[10] <- "ProgramName"
colnames(df3)[11 ...
Identifying Chronically Homeless and Veteran Participants throughout a COC
This is my attempt to write SQL against the HMIS 5.1 CSVs. It includes:
- Identifying Chronically Homeless (CHP) Participants enterprise Wide
- Identifying Veterans (Vets) enterprise wide
- Sorting CHPs and Vets to identify those who've exited the literal homelessness and where they went.
- Sorting CHPs and Vets to identify those are still in the literal homelessness
- Filtering to Active Participants in Projects using Entry / Exit
- Filtering to Active Participants in Projects using NBN
- Getting total NBN stays by participant
To actualy get anything done through writing SQL against these CSVs, one will need the HMIS Vendor CSV Specifications
Sampling Large Data
This R function allows sampling of a dataframe. This is helpful when writing a script which will be used against a large dataframe, however, writing the script is iterative. Sampling allows the overall reduction in time of testing iterations, without losing the validity of realistic results.
options(java.parameters = "-Xmx14336m") ## memory set to 14 GB
library("sqldf")
library("XLConnect")
library("tcltk")
df <- readWorksheetFromFile("Data_X.xlsx", sheet = 1, startRow = 1)
sampleVector <- sample(1:nrow(df), 30000)
df2 <- df[sampleVector,]
write.csv(df2, file="Sample of Data_X (30000).csv", na="")
ESPER -- ESP8266 Serial Communication Web Server
Lumi3
This project is meant as stepping stone to implement Lumi2. The Lumi projects I've been working on are over-the-air uploaders of Arduino / AVR programs to Atmega and Atiny chips which are programmed with the TinySafeBoot bootloader. The goal is to allow the user to select either WiFi or Bluetooth, create a connection to either an ESP8266 or HM-1X device, and upload whatever program to an AVR connected to the wireless receiving device.
The last iteration of Lumi was written in Windows Universal Apps SDK. Unfortunately, the code-base turned into spaghetti. I've diagnosed the issues to be due to God-modules ...