Last semester we were given a sample dataset that we put the following variables into a dictionary: start date of program, end date of program, length of stay, personal ID, and project type (Emergency Shelter, Rapid Re-housing, Street Outreach, etc.). With the new dataset, we need to add these same variables into a new dictionary. This will be a general function that can read in any of the 12 files and return a list of dictionaries.
My goal for this past week:
- To analyze the dataset and familiarize myself with the new data
- Write the existing dictionary to a file and read it in using Python
- Determine which process is more efficient/faster: 1. Reading in the text file and creating a dictionary or 2. Reading in a file with the existing dictionaries
Results: I started to analyze the dataset and have finished the headings for the first file. Reading in a file with the dictionaries is much quicker (~35x faster!!!!)
My goal for the following week:
- Create a function that reads in the new dataset but creates the same dictionary as last semester
- Analyze the variables within two of the files
35x faster!!! Crazy.
ReplyDelete