Consider CODE CHUNK #5. What is the purpose of this code? Discuss. (3 pts) Consider CODE CHUNK #6. What is the purpose of this code? Discuss. (3 pts) Lines 78- 82 in the above code chunk is using the CASE statement. To the best of your ability, describe the purpose of this CASE statement. Discuss. (4 pts) Consider CODE CHUNK #7. Review this code and the table returned by this code. Consider one row in this table. Carefully interpret the meaning of the values provided in this table. (4 pts) Consider CODE CHUNK #8. Review this code. What is this code doing different than CODE CHUNK #7? Discuss. (5 pts) The ORDER BY statement can be added to sort a table that is returned by and SQL statement. For example, consider Line 93 in the CODE CHUNK #7 which sorts the table by Exceeds_Percent in descending order. Purpose a ORDER BY Statement for CODE CHUNK #8 that would make it easier to identify which states have a large proportion of nursing homes whose actual staffing levels exceed their expected staffing levels. (2 pts) Code for Line 105: ORDER BY ________________________________________; Next, we will consider the most difficult data management task for preparing this data. Table 1: Contains information about staffing, e.g. Actual and Expected HRD values, etc. Table 2: Contains information about the relationship between SSA values (which are provided in the Staffing dataset) and FIPS (which are provided in Table 3). Table 3: Information obtained from the US Census Bureau regarding the Elderly Population in the United States. Example API Pull from Census Bureau: Table 1: Staffing Table Table 3: Census Table
Consider CODE CHUNK #5. What is the purpose of this code? Discuss. (3 pts) Consider CODE CHUNK #6. What is the purpose of this code? Discuss. (3 pts) Lines 78- 82 in the above code chunk is using the CASE statement. To the best of your ability, describe the purpose of this CASE statement. Discuss. (4 pts) Consider CODE CHUNK #7. Review this code and the table returned by this code. Consider one row in this table. Carefully interpret the meaning of the values provided in this table. (4 pts) Consider CODE CHUNK #8. Review this code. What is this code doing different than CODE CHUNK #7? Discuss. (5 pts) The ORDER BY statement can be added to sort a table that is returned by and SQL statement. For example, consider Line 93 in the CODE CHUNK #7 which sorts the table by Exceeds_Percent in descending order. Purpose a ORDER BY Statement for CODE CHUNK #8 that would make it easier to identify which states have a large proportion of nursing homes whose actual staffing levels exceed their expected staffing levels. (2 pts) Code for Line 105: ORDER BY ________________________________________; Next, we will consider the most difficult data management task for preparing this data. Table 1: Contains information about staffing, e.g. Actual and Expected HRD values, etc. Table 2: Contains information about the relationship between SSA values (which are provided in the Staffing dataset) and FIPS (which are provided in Table 3). Table 3: Information obtained from the US Census Bureau regarding the Elderly Population in the United States. Example API Pull from Census Bureau: Table 1: Staffing Table Table 3: Census Table
DSCI325_Midterm_Takehome.docx