generated from posit-conf-2023/workshop-template
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from posit-conf-2023/rm-slido
Remove Slido references + tweaks to in-memory slide order
- Loading branch information
Showing
12 changed files
with
127 additions
and
55 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
_freeze/materials/05-arrow-in-memory-exercise/execute-results/html.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"hash": "980fb7425ba8aa5035e98dd2e64f240d", | ||
"result": { | ||
"markdown": "---\ntitle: \"Arrow In-Memory Exercise\"\nexecute:\n echo: true\n messages: false\n warning: false\n---\n\n::: {.cell}\n\n```{.r .cell-code}\nlibrary(arrow)\nlibrary(dplyr)\n```\n:::\n\n\n\n::: {#exercise-hello-nyc-taxi .callout-tip}\n## Exercises: Arrow Table\n\n::: panel-tabset\n## Problems\n\n1. Read in a single NYC Taxi parquet file using `read_parquet()` as an Arrow Table\n2. Convert your Arrow Table object to a `data.frame` or a `tibble`\n\n## Solution 1\n\n\n::: {.cell}\n\n```{.r .cell-code}\nparquet_file <- here::here(\"data/nyc-taxi/year=2019/month=9/part-0.parquet\")\n\ntaxi_table <- read_parquet(parquet_file, as_data_frame = FALSE)\ntaxi_table\n```\n\n::: {.cell-output .cell-output-stdout}\n```\nTable\n6567396 rows x 22 columns\n$vendor_name <string>\n$pickup_datetime <timestamp[ms]>\n$dropoff_datetime <timestamp[ms]>\n$passenger_count <int64>\n$trip_distance <double>\n$pickup_longitude <double>\n$pickup_latitude <double>\n$rate_code <string>\n$store_and_fwd <string>\n$dropoff_longitude <double>\n$dropoff_latitude <double>\n$payment_type <string>\n$fare_amount <double>\n$extra <double>\n$mta_tax <double>\n$tip_amount <double>\n$tolls_amount <double>\n$total_amount <double>\n$improvement_surcharge <double>\n$congestion_surcharge <double>\n$pickup_location_id <int64>\n$dropoff_location_id <int64>\n```\n:::\n:::\n\n\n## Solution 2\n\n\n::: {.cell}\n\n```{.r .cell-code}\ntaxi_table |> collect()\n```\n\n::: {.cell-output .cell-output-stdout}\n```\n# A tibble: 6,567,396 × 22\n vendor_name pickup_datetime dropoff_datetime passenger_count\n <chr> <dttm> <dttm> <int>\n 1 CMT 2019-08-31 18:09:30 2019-08-31 18:15:42 1\n 2 CMT 2019-08-31 18:26:30 2019-08-31 18:44:31 1\n 3 CMT 2019-08-31 18:39:35 2019-08-31 19:15:55 2\n 4 VTS 2019-08-31 18:12:26 2019-08-31 18:15:17 4\n 5 VTS 2019-08-31 18:43:16 2019-08-31 18:53:50 1\n 6 VTS 2019-08-31 18:26:13 2019-08-31 18:45:35 1\n 7 CMT 2019-08-31 18:34:52 2019-08-31 18:42:03 1\n 8 CMT 2019-08-31 18:50:02 2019-08-31 18:58:16 1\n 9 CMT 2019-08-31 18:08:02 2019-08-31 18:14:44 0\n10 VTS 2019-08-31 18:11:38 2019-08-31 18:26:47 1\n# ℹ 6,567,386 more rows\n# ℹ 18 more variables: trip_distance <dbl>, pickup_longitude <dbl>,\n# pickup_latitude <dbl>, rate_code <chr>, store_and_fwd <chr>,\n# dropoff_longitude <dbl>, dropoff_latitude <dbl>, payment_type <chr>,\n# fare_amount <dbl>, extra <dbl>, mta_tax <dbl>, tip_amount <dbl>,\n# tolls_amount <dbl>, total_amount <dbl>, improvement_surcharge <dbl>,\n# congestion_surcharge <dbl>, pickup_location_id <int>, …\n```\n:::\n:::\n\n\nor\n\n\n::: {.cell}\n\n```{.r .cell-code}\nas_tibble(taxi_table)\n```\n\n::: {.cell-output .cell-output-stdout}\n```\n# A tibble: 6,567,396 × 22\n vendor_name pickup_datetime dropoff_datetime passenger_count\n <chr> <dttm> <dttm> <int>\n 1 CMT 2019-08-31 18:09:30 2019-08-31 18:15:42 1\n 2 CMT 2019-08-31 18:26:30 2019-08-31 18:44:31 1\n 3 CMT 2019-08-31 18:39:35 2019-08-31 19:15:55 2\n 4 VTS 2019-08-31 18:12:26 2019-08-31 18:15:17 4\n 5 VTS 2019-08-31 18:43:16 2019-08-31 18:53:50 1\n 6 VTS 2019-08-31 18:26:13 2019-08-31 18:45:35 1\n 7 CMT 2019-08-31 18:34:52 2019-08-31 18:42:03 1\n 8 CMT 2019-08-31 18:50:02 2019-08-31 18:58:16 1\n 9 CMT 2019-08-31 18:08:02 2019-08-31 18:14:44 0\n10 VTS 2019-08-31 18:11:38 2019-08-31 18:26:47 1\n# ℹ 6,567,386 more rows\n# ℹ 18 more variables: trip_distance <dbl>, pickup_longitude <dbl>,\n# pickup_latitude <dbl>, rate_code <chr>, store_and_fwd <chr>,\n# dropoff_longitude <dbl>, dropoff_latitude <dbl>, payment_type <chr>,\n# fare_amount <dbl>, extra <dbl>, mta_tax <dbl>, tip_amount <dbl>,\n# tolls_amount <dbl>, total_amount <dbl>, improvement_surcharge <dbl>,\n# congestion_surcharge <dbl>, pickup_location_id <int>, …\n```\n:::\n:::\n\n\nor\n\n\n::: {.cell}\n\n```{.r .cell-code}\nas.data.frame(taxi_table)\n```\n\n::: {.cell-output .cell-output-stdout}\n```\n# A tibble: 6,567,396 × 22\n vendor_name pickup_datetime dropoff_datetime passenger_count\n <chr> <dttm> <dttm> <int>\n 1 CMT 2019-08-31 18:09:30 2019-08-31 18:15:42 1\n 2 CMT 2019-08-31 18:26:30 2019-08-31 18:44:31 1\n 3 CMT 2019-08-31 18:39:35 2019-08-31 19:15:55 2\n 4 VTS 2019-08-31 18:12:26 2019-08-31 18:15:17 4\n 5 VTS 2019-08-31 18:43:16 2019-08-31 18:53:50 1\n 6 VTS 2019-08-31 18:26:13 2019-08-31 18:45:35 1\n 7 CMT 2019-08-31 18:34:52 2019-08-31 18:42:03 1\n 8 CMT 2019-08-31 18:50:02 2019-08-31 18:58:16 1\n 9 CMT 2019-08-31 18:08:02 2019-08-31 18:14:44 0\n10 VTS 2019-08-31 18:11:38 2019-08-31 18:26:47 1\n# ℹ 6,567,386 more rows\n# ℹ 18 more variables: trip_distance <dbl>, pickup_longitude <dbl>,\n# pickup_latitude <dbl>, rate_code <chr>, store_and_fwd <chr>,\n# dropoff_longitude <dbl>, dropoff_latitude <dbl>, payment_type <chr>,\n# fare_amount <dbl>, extra <dbl>, mta_tax <dbl>, tip_amount <dbl>,\n# tolls_amount <dbl>, total_amount <dbl>, improvement_surcharge <dbl>,\n# congestion_surcharge <dbl>, pickup_location_id <int>, …\n```\n:::\n:::\n\n:::\n:::\n", | ||
"supporting": [], | ||
"filters": [ | ||
"rmarkdown/pagebreak.lua" | ||
], | ||
"includes": {}, | ||
"engineDependencies": {}, | ||
"preserve": {}, | ||
"postProcess": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.