You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: chapters/05-01-hcup-amadeus-usecase.Rmd
+48-14Lines changed: 48 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
### Integrating HCUP databases with Amadeus Exposure data {.unnumbered}
6
6
7
-
**Date Modified**: March 22, 2025
7
+
**Date Modified**: April 18, 2025
8
8
9
9
**Author**: Darius M. Bost
10
10
@@ -99,7 +99,8 @@ for (data_source in data_sources) {
99
99
start = c(1, 5, 10, 27, 31, 63, 68, 73, 75, 80),
100
100
end = c(3, 8, 25, 29, 61, 66, 71, 73, 78, NA) # NA for ragged column
101
101
)
102
-
}
102
+
} #Ends if statement
103
+
# 'data_source in data_sources' and 'year in years' loop continues below
103
104
```
104
105
105
106
The `fwf_positions()` function is utilizing column start and end positions found on the ahrq website (`meta_url` listed in next code chunk). We use these positions to read in the raw data files from their .asc format.
@@ -115,11 +116,18 @@ The `fwf_positions()` function is utilizing column start and end positions found
In preparation for the next section we are going to make two new dataframes from our `temp_covar` object. The first collapses our zipcodes taking the average of light, medium, or heavy days.
The second dataframe also groups by our zip but takes the summation of the smoke plume days instead of an average.
296
+
The second dataframe also groups by our zip but takes the summation of the smoke plume days instead of an average. We will keep the geometry with this dataframe as we will want to keep it for our merger later on. If we kept it for both dataframes, we would have repeating columns after our hcup/amadeus merge.
## Data Analysis using HCUP and Amadeus data sources
293
323
294
-
First we will load in our hcup data file we processed earlier and subset the file to a set of observations that make the data easier to work with (702 to 39 columns) and are still interesting for analysis. This includes zipcodes, age at admission, admission month, race identifier, sex, and ICD 10 diagnosis codes.
324
+
First we will load in our hcup data file we processed earlier and subset the file to a set of observations that make the data easier to work with (702 to 39 columns) and are still interesting for analysis. This includes zipcodes (ZIP), age at admission (AGE), admission month (AMONTH), race identifier (RACE), sex (FEMALE), and ICD 10 diagnosis codes (I10\_).
0 commit comments