Quick Access Dataset Notesheet
-
Confidential Information:
- Q1: 1i confidential (probably animal research space?)
- Q3: Amount of research animal space - not included (no big deal)
- Q7: Condition of research NASF
- Q10: NASF research animal space
-
Abbreviations:
- R/R -> Repair and Renovation
- NASF -> Net Assignable Square Feet
- S&E -> Science & Engineering
- R&D -> Research & Development
-
Necessary Modules:
- Pandas
- Geopandas
- Matplotlib
- Pathlib
- os path
- cse163_utils (for test file)
-
Coding issues to watch out for:
- The CSVs are encoded in ISO-8859-1, so anytime you call ‘read_csv’ you must put the argument
encoding='ISO-8859-1 - This is also in a comment in sanitize_data.py, but the flake8-neccessitated formatting makes a little unclear.
To call sanitize_data.py, use the following syntax in your command line of choice:
[python executable] [path of sanitize_data.py] [path of raw_data directory] [path of location directory] [year]
For example:
python ./src/sanitize_data.py ./raw_data/ ./data/ '2007:2019'
-
-Running data_analysis and func_tests:
- Run the python executable in command line or an IDE
- If issues with the directories arise, double-check that the "path" and "geopath" variables point to the correct files
- The path variable should point to the desired year(s) of data (ex. 2007-2019_sanitized.csv)
- Similarly, the path_2007 and path_2019 variables in funct_tests are the two years being tested, and may be any year's data file
- The geopath variable should point to the geodata (should always be state_geodata.json)
- If pictures are not saving properly, check where pics_dir is saving to
- The pics_dir variable should point to where you want to send the output figures
It should be possible to run both data_analysis and funct_tests without any additional inputs.
-
Data file naming conventions:
- Raw data is named in the form: "facilities_[year].csv", and is stored in the subdirectory "raw_data". They must be compiled with sanitize_data before use
- Note that the year in the file name is the fiscal year so ex. the file for 2019 is actually data from 2018
- sanitize_data will output files into the desired location with the desired naming; for best results, be consistent with naming conventions and especially be consistent with using the same target directory
- In the program authors' version of the code, the data was stored in folder "data" and used the naming convention "[start year]-[end year]_sanitized.csv"