2025-10-06
airquality datasetozone, solar.R, Wind, Tempairquality datasetozone, solar.R, Wind, TempGeorge Heilmeier developed a series of questions he would ask of potential DARPA grant recipients
The answers to these questions get you to the core of your idea

| time_hour | carrier | dep_time |
|---|---|---|
| 2013-01-01 05:00:00 | UA | 517 |
| 2013-01-01 05:00:00 | UA | 533 |
| 2013-01-01 05:00:00 | AA | 542 |
| 2013-01-01 05:00:00 | B6 | 544 |
| 2013-01-01 06:00:00 | DL | 554 |
| 2013-01-01 05:00:00 | UA | 554 |
| 2013-01-01 06:00:00 | B6 | 555 |
| 2013-01-01 06:00:00 | EV | 557 |
| faa | name | lat | lon |
|---|---|---|---|
| 04G | Lansdowne Airport | 41.13047 | -80.61958 |
| 06A | Moton Field Municipal Airport | 32.46057 | -85.68003 |
| 06C | Schaumburg Regional | 41.98934 | -88.10124 |
| 06N | Randall Airport | 41.43191 | -74.39156 |
| 09J | Jekyll Island Airport | 31.07447 | -81.42778 |
| 0A9 | Elizabethton Municipal Airport | 36.37122 | -82.17342 |
| 0G6 | Williams County Airport | 41.46731 | -84.50678 |
| 0G7 | Finger Lakes Regional Airport | 42.88356 | -76.78123 |
A Primary Key is a column/group of columns whose values uniquely determine each row of the data frame.
planes it is tailnum| tailnum | year | type | model |
|---|---|---|---|
| N10156 | 2004 | Fixed wing multi engine | EMB-145XR |
| N102UW | 1998 | Fixed wing multi engine | A320-214 |
| N103US | 1999 | Fixed wing multi engine | A320-214 |
| N104UW | 1999 | Fixed wing multi engine | A320-214 |
| N10575 | 2002 | Fixed wing multi engine | EMB-145LR |
A Primary Key is a column/group of columns whose values uniquely determine each row of the data frame.
planes it is tailnumtailnum proving that it is a primary keySometimes no single variable uniquely identifies rows.
Multiple variables can combine to be a primary key
For weather it requires origin and time-hour:
A Foreign Key is a variable/group of variables that is a primary key for another data frame.
| flight | time_hour | tailnum |
|---|---|---|
| 1545 | 2013-01-01 05:00:00 | N14228 |
| 1714 | 2013-01-01 05:00:00 | N24211 |
| 1141 | 2013-01-01 05:00:00 | N619AA |
| 725 | 2013-01-01 05:00:00 | N804JB |
tailnum is a primary key for planessomething_join(x,y,by = join_by(...))
something is either:
left_joinright_joinfull_joininner_joinsemi_joinanti_joinTwo main “types” of joins:
left_join, right_join, full_join, inner_joinsemi_join, anti_joinleft_join: Keeps all rows of x, matches/adds from yright_join: reversed left_joinfull_join: keeps all rows of bothinner_join: only rows occurring in bothR4DS 19.8
R4DS 19.2
R4DS 19.2
R4DS 19.2
R4DS 19.2
join functions automatically try to find a foreign keyjoin_by and a formula:# A tibble: 5 × 6
year month day dep_time sched_dep_time dep_delay
<int> <int> <int> <int> <int> <dbl>
1 2013 1 1 517 515 2
2 2013 1 1 533 529 4
3 2013 1 1 542 540 2
4 2013 1 1 544 545 -1
5 2013 1 1 554 600 -6
semi_join(x,y) removes rows of x that don’t have matches in ysemi_join to restrict airports to the destination airports# A tibble: 3 × 8
faa name lat lon alt tz dst tzone
<chr> <chr> <dbl> <dbl> <dbl> <dbl> <chr> <chr>
1 EWR Newark Liberty Intl 40.7 -74.2 18 -5 A America/New_York
2 JFK John F Kennedy Intl 40.6 -73.8 13 -5 A America/New_York
3 LGA La Guardia 40.8 -73.9 22 -5 A America/New_York
anti_join(x,y) removes rows of x that have matches in yanti_join to find implicit missing values# A tibble: 5 × 6
year month day dep_time sched_dep_time dep_delay
<int> <int> <int> <int> <int> <dbl>
1 2013 1 1 1153 1200 -7
2 2013 1 1 1154 1200 -6
3 2013 1 1 1155 1200 -5
4 2013 1 1 1155 1200 -5
5 2013 1 1 1157 1200 -3
Please fill out the following google form after the meeting or watching the video: