|
| 1 | +/* |
| 2 | +Stores ILI data from the CDC. |
| 3 | +
|
| 4 | ++---------------+-------------+------+-----+---------+----------------+ |
| 5 | +| Field | Type | Null | Key | Default | Extra | |
| 6 | ++---------------+-------------+------+-----+---------+----------------+ |
| 7 | +| id | int(11) | NO | PRI | NULL | auto_increment | |
| 8 | +| release_date | date | NO | MUL | NULL | | |
| 9 | +| issue | int(11) | NO | MUL | NULL | | |
| 10 | +| epiweek | int(11) | NO | MUL | NULL | | |
| 11 | +| region | varchar(12) | NO | MUL | NULL | | |
| 12 | +| lag | int(11) | NO | MUL | NULL | | |
| 13 | +| num_ili | int(11) | NO | | NULL | | |
| 14 | +| num_patients | int(11) | NO | | NULL | | |
| 15 | +| num_providers | int(11) | NO | | NULL | | |
| 16 | +| wili | double | NO | | NULL | | |
| 17 | +| ili | double | NO | | NULL | | |
| 18 | +| num_age_0 | int(11) | YES | | NULL | | |
| 19 | +| num_age_1 | int(11) | YES | | NULL | | |
| 20 | +| num_age_2 | int(11) | YES | | NULL | | |
| 21 | +| num_age_3 | int(11) | YES | | NULL | | |
| 22 | +| num_age_4 | int(11) | YES | | NULL | | |
| 23 | +| num_age_5 | int(11) | YES | | NULL | | |
| 24 | ++---------------+-------------+------+-----+---------+----------------+ |
| 25 | +
|
| 26 | +id: |
| 27 | + unique identifier for each record |
| 28 | +release_date: |
| 29 | + the date when this record was first published by the CDC |
| 30 | +issue: |
| 31 | + the epiweek of publication (e.g. issue 201453 includes epiweeks up to and |
| 32 | + including 2014w53, but not 2015w01 or following) |
| 33 | +epiweek: |
| 34 | + the epiweek during which the data was collected |
| 35 | +region: |
| 36 | + the name of the location (e.g. 'nat', 'hhs1', 'cen9', 'pa', 'jfk') |
| 37 | +lag: |
| 38 | + number of weeks between `epiweek` and `issue` |
| 39 | +num_ili: |
| 40 | + the number of ILI cases (numerator) |
| 41 | +num_patients: |
| 42 | + the total number of patients (denominator) |
| 43 | +num_providers: |
| 44 | + the number of reporting healthcare providers |
| 45 | +wili: |
| 46 | + weighted percent ILI |
| 47 | +ili: |
| 48 | + unweighted percent ILI |
| 49 | +num_age_0: |
| 50 | + number of cases in ages 0-4 |
| 51 | +num_age_1: |
| 52 | + number of cases in ages 5-24 |
| 53 | +num_age_2: |
| 54 | + number of cases in ages 25-64 |
| 55 | +num_age_3: |
| 56 | + number of cases in ages 25-49 |
| 57 | +num_age_4: |
| 58 | + number of cases in ages 50-64 |
| 59 | +num_age_5: |
| 60 | + number of cases in ages 65+ |
| 61 | +*/ |
| 62 | + |
| 63 | +CREATE TABLE `fluview` ( |
| 64 | + `id` int(11) NOT NULL AUTO_INCREMENT, |
| 65 | + `release_date` date NOT NULL, |
| 66 | + `issue` int(11) NOT NULL, |
| 67 | + `epiweek` int(11) NOT NULL, |
| 68 | + `region` varchar(12) NOT NULL, |
| 69 | + `lag` int(11) NOT NULL, |
| 70 | + `num_ili` int(11) NOT NULL, |
| 71 | + `num_patients` int(11) NOT NULL, |
| 72 | + `num_providers` int(11) NOT NULL, |
| 73 | + `wili` double NOT NULL, |
| 74 | + `ili` double NOT NULL, |
| 75 | + `num_age_0` int(11) DEFAULT NULL, |
| 76 | + `num_age_1` int(11) DEFAULT NULL, |
| 77 | + `num_age_2` int(11) DEFAULT NULL, |
| 78 | + `num_age_3` int(11) DEFAULT NULL, |
| 79 | + `num_age_4` int(11) DEFAULT NULL, |
| 80 | + `num_age_5` int(11) DEFAULT NULL, |
| 81 | + PRIMARY KEY (`id`), |
| 82 | + UNIQUE KEY `issue` (`issue`,`epiweek`,`region`), |
| 83 | + KEY `release_date` (`release_date`), |
| 84 | + KEY `issue_2` (`issue`), |
| 85 | + KEY `epiweek` (`epiweek`), |
| 86 | + KEY `region` (`region`), |
| 87 | + KEY `lag` (`lag`) |
| 88 | +) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
0 commit comments