Commit b8e931f1 authored by Jamie Forth's avatar Jamie Forth

t06 quizzes

parent 29fd46ec
......@@ -127,16 +127,18 @@ nottype=manual]
** Introduction
:PROPERTIES:
:ACTIVITY_TYPE: video
:ACTIVITY_TYPE: text
:EFFORT: 0:05
:END:
#+BEGIN: columnview :id local :maxlevel 2
| Activity | Type | Time |
|--------------+-------+------|
| Introduction | video | 0:05 |
| Activity | Type | Time |
|--------------+------+------|
| Introduction | text | 0:05 |
#+END:
Use topic description text.
** Lesson 1 – Time-series data
:PROPERTIES:
:COLUMNS: %40ITEM(Activity) %12ACTIVITY_TYPE(Type) %5EFFORT(Time){:} %18NOTE(Note)
......@@ -145,10 +147,10 @@ nottype=manual]
#+BEGIN: columnview :id local :maxlevel 3
| Activity | Type | Time | Note |
|------------------------------------------------+-------+------+--------------|
| Lesson 1 – Time-series data | | 0:20 | |
| Lesson 1 – Time-series data | | 0:10 | |
| Video – Time-series data | video | 0:10 | slides+audio |
| Further reading – \citetitle[154–165]{Yau2013} | book | 0:00 | |
| Quiz – Trends and patterns | quiz | 0:10 | |
| Quiz – Trends and patterns | quiz | 0:00 | |
#+END:
*** Video – Time-series data
......@@ -170,10 +172,10 @@ nottype=manual]
- 4.3 Visualising time-series
*** Quiz – Trends and patterns
*** CANCEL Quiz – Trends and patterns
:PROPERTIES:
:ACTIVITY_TYPE: quiz
:EFFORT: 0:10
:EFFORT: 0:00
:END:
Multiple-chose questions matching plots to trend.
......@@ -240,6 +242,9 @@ Question bank category:
- based on previous video and reading
Question bank category:
- Time-series → Representing time
*** Video – Periods, offsets and time-deltas
:PROPERTIES:
:ACTIVITY_TYPE: video
......@@ -284,6 +289,9 @@ Question bank category:
- based on previous video and reading
Question bank category:
- Time-series → Periods, offsets and time-deltas
*** Code activity – Parsing and data processing
:PROPERTIES:
:ACTIVITY_TYPE: code (auto non-rand)
......@@ -378,7 +386,7 @@ Question bank category:
- smoothing, rate of change, correlation, lag plots, autocorrelation
*** Essential reading – ?
*** TODO Essential reading – ?
:PROPERTIES:
:ACTIVITY_TYPE: web
:EFFORT: 0:10
......@@ -392,6 +400,9 @@ Question bank category:
- based on previous video and reading
Question bank category:
- Time-series → Time-series analysis
*** CANCEL Case study – Visualising time-series statistics
:PROPERTIES:
:ACTIVITY_TYPE: case-study
......@@ -447,12 +458,12 @@ No module assessment in this topic.
#+name: topic6_summary
| Activity | Type | Time |
|--------------------------------------------------------+----------------------+------|
| Time-series data | | 8:00 |
| \_ Introduction | video | 0:05 |
| \_ Lesson 1 – Time-series data | | 0:20 |
| Time-series data | | 7:50 |
| \_ Introduction | text | 0:05 |
| \_ Lesson 1 – Time-series data | | 0:10 |
| \_ Video – Time-series data | video | 0:10 |
| \_ Further reading – \citetitle[154–165]{Yau2013} | book | 0:00 |
| \_ Quiz – Trends and patterns | quiz | 0:10 |
| \_ Quiz – Trends and patterns | quiz | 0:00 |
| \_ Lesson 2 – Representing time | | 4:55 |
| \_ Video – Representing time | video | 0:10 |
| \_ Essential reading – \citetitle{pandasTimeseries} | web | 1:00 |
......
No preview for this file type
......@@ -42,9 +42,12 @@ notcategory=essential, nottype=article, nottype=book,
nottype=incollection, nottype=inproceedings, nottype=manual]
#+end_export
** TODO Introduction
** Introduction
Use topic description text.
** Lesson 1 – Time-series data
*** DRAFT Video 1 – Time-series data
*** FINAL Video 1 – Time-series data
:PROPERTIES:
:export_file_name: export/06-slides+scripts/dv-06-1-ts-intro
:export_latex_class: beamer169
......@@ -311,26 +314,8 @@ TBC
- 4.3 Visualising time-series
*** Quiz – Trends and patterns
- generate fake data to generate plots visualising the following types
of trends
- cycles and seasonal variation
- variability
- rate of change
- correlations
- exceptions / significant events
- natural disasters, changes of government, tax
regulation…
Multiple-chose questions matching plots to trend.
Question bank category:
- Time-series → Trends and patterns
** Lesson 2 – Representing time
*** DRAFT Video 2 – Representing time
*** FINAL Video 2 – Representing time
:PROPERTIES:
:export_file_name: export/06-slides+scripts/dv-06-2-time
:export_latex_class: beamer169
......@@ -944,15 +929,137 @@ a data analysis context.
- Converting to timestamps
- Generating ranges of timestamps
- Timestamp limitations
- +Indexing+ is here but cover this later
- Indexing
- Time/date components
- =DateOffset= objects
- Time Series-Related Instance Methods
- Resampling
*** Quiz – Representing time
- based on previous video and reading
{{{quiz-intro}}}
{{{quiz-ref(video 2 and \citetitle{pandasTimeseries})}}}
**** Sampling rate: Wind
:PROPERTIES:
:QUESTION_TYPE: multiple choice
:END:
For producing a line graph, what would be an appropriate sampling rate
for a visualisation showing the average wind speed in London over one
year?
- [ ] month
- [X] day
- [ ] hour
- [ ] minute
**** Sampling rate: Tube
:PROPERTIES:
:QUESTION_TYPE: multiple choice
:END:
For producing a line graph, what would be an appropriate sampling rate
for a visualisation showing the total number of passengers travelling
by the London Underground during a one week period?
- [ ] day
- [ ] 12-hour
- [X] hour
- [ ] minute
**** Pandas: =Timestamp=
:PROPERTIES:
:QUESTION_TYPE: multiple choice
:END:
In pandas what is a =Timestamp=?
- [X] A specific date and time with time-zone support
- [ ] An absolute time duration
- [ ] A span of time defined by a point in time and its associated
frequency
- [ ] A relative time duration that respects calendar arithmetic
**** Pandas: =Timedelta=
:PROPERTIES:
:QUESTION_TYPE: multiple choice
:END:
In pandas what is a =Timedelta=?
- [ ] A specific date and time with time-zone support
- [X] An absolute time duration
- [ ] A span of time defined by a point in time and its associated
frequency
- [ ] A relative time duration that respects calendar arithmetic
**** Pandas: =Period=
:PROPERTIES:
:QUESTION_TYPE: multiple choice
:END:
In pandas what is a =Period=?
- [ ] A specific date and time with time-zone support
- [ ] An absolute time duration
- [X] A span of time defined by a point in time and its associated
frequency
- [ ] A relative time duration that respects calendar arithmetic
**** Pandas: =DateOffset=
:PROPERTIES:
:QUESTION_TYPE: multiple choice
:END:
In pandas what is a =DateOffset=?
- [ ] A specific date and time with time-zone support
- [ ] An absolute time duration
- [ ] A span of time defined by a point in time and its associated
frequency
- [X] A relative time duration that respects calendar arithmetic
*** DRAFT Video 3 – Periods, offsets and time-deltas
**** Pandas: =DatetimeIndex= constructor
:PROPERTIES:
:QUESTION_TYPE: multiple choice
:END:
Which of the following can be used to generate an index of timestamps?
- [X] =pandas.to_datetime()=
- [X] =pandas.date_range()=
- [ ] =pandas.TimeIndex=
- [ ] =pandas.TimeStamp=
**** Pandas: =Timestamp= lowest precision
:PROPERTIES:
:QUESTION_TYPE: multiple choice
:END:
What is the lowest precision unit of time that can be represented by a
=Timestamp= object?
- [ ] Year
- [ ] Month
- [X] Day
- [ ] Hour
**** Pandas: =Timestamp= highest precision
:PROPERTIES:
:QUESTION_TYPE: multiple choice
:END:
What is the highest precision unit of time that can be represented by
a =Timestamp= object?
- [ ] Second
- [ ] Microsecond
- [X] Nanosecond
- [ ] Picosecond
*** FINAL Video 3 – Periods, offsets and time-deltas
:PROPERTIES:
:export_file_name: export/06-slides+scripts/dv-06-3-period
:export_latex_class: beamer169
......@@ -1559,12 +1666,130 @@ TBC
*** Quiz – Periods, offsets and time-deltas
- based on previous video and reading
{{{quiz-intro}}}
{{{quiz-ref(video 3, \citetitle{pandasTimeseries} and
\citetitle{pandasTimedeltas})}}}
**** Pandas: =Period= frequency
:PROPERTIES:
:QUESTION_TYPE: multiple choice
:END:
=Period= objects have a frequency attribute. What string would be used
to represent a frequency of calendar quarter to the year end?
- [ ] Q3M
- [ ] 12M
- [ ] Q-MAR
- [X] Q-DEC
*** Code activity – Parsing and data processing
**** Pandas: Resampling
:PROPERTIES:
:QUESTION_TYPE: multiple choice
:END:
How would you resample time series data to 10-minute median values?
- [X] Answer 1
#+begin_src jupyter-python
ts.resample('10Min').median()
#+end_src
- [ ] Answer 2
#+begin_src jupyter-python
ts.resample('10Median')
#+end_src
- [ ] Answer 3
#+begin_src jupyter-python
ts.resample.median('10Min')
#+end_src
- [ ] Answer 4
#+begin_src jupyter-python
ts.resample.median(10)
#+end_src
**** Pandas: =Timedelta= units
:PROPERTIES:
:QUESTION_TYPE: multiple choice
:END:
Assuming a =pandas.Timedelta= object stored in a variable =td=, how
would you calculate the duration in seconds?
- [X] Answer 1
#+begin_src jupyter-python
td / pd.Timedelta('1 second')
#+end_src
- [ ] Answer 2
#+begin_src jupyter-python
td * pd.Timedelta('1 second')
#+end_src
- [ ] Answer 3
#+begin_src jupyter-python
pd.Timedelta('1 second') / td
#+end_src
- [ ] Answer 4
#+begin_src jupyter-python
td / 60
#+end_src
**** Pandas: =Timestamp= arithmetic
:PROPERTIES:
:QUESTION_TYPE: multiple choice
:END:
What data type do you get if you subtract a =Timestamp= object from
another =Timestamp= object?
- [ ] =Timestamp=
- [ ] =Period=
- [X] =Timedelta=
- [ ] =DateOffset=
**** Pandas: =Timedelta= arithmetic
:PROPERTIES:
:QUESTION_TYPE: multiple choice
:END:
What data type do you get if you subtract a =Timedelta= object from
another =Timedelta= object?
- [ ] =Timestamp=
- [ ] =Period=
- [X] =Timedelta=
- [ ] =DateOffset=
**** Pandas: =Timestamp= and =Timedelta= arithmetic
:PROPERTIES:
:QUESTION_TYPE: multiple choice
:END:
What data type do you get if you subtract a =Timedelta= object from
=Timestamp= object?
- [X] =Timestamp=
- [ ] =Period=
- [ ] =Timedelta=
- [ ] =DateOffset=
*** TODO Code activity – Parsing and data processing
** Lesson 3 – Time-series data processing
*** Video 4 – Pre-processing and advanced indexing
*** FINAL Video 4 – Pre-processing and advanced indexing
:PROPERTIES:
:export_file_name: export/06-slides+scripts/dv-06-4-processing
:export_latex_class: beamer169
......@@ -2025,7 +2250,7 @@ TBC
TBC
*** Video 5 – Aggregation and merging
*** FINAL Video 5 – Aggregation and merging
:PROPERTIES:
:export_file_name: export/06-slides+scripts/dv-06-5-aggregation
:export_latex_class: beamer169
......@@ -2738,8 +2963,17 @@ TBC
{{{include-slide(<7>)}}}
{{{include-slide(<8>)}}}
*** Essential reading – \citetitle{pandasMultiIndex}
:PROPERTIES:
:ACTIVITY_TYPE: web
:EFFORT: 0:30
:END:
\fullcite{pandasMultiIndex}
*** TODO Code activity – Time-series data processing
** Lesson 4 – Time-series data analysis
*** Video 6 – Time-series analysis
*** FINAL Video 6 – Time-series analysis
:PROPERTIES:
:export_file_name: export/06-slides+scripts/dv-06-6-ts-analysis
:export_latex_class: beamer169
......@@ -3351,6 +3585,66 @@ TBC
- select all rows of inner London column
*** Quiz – Time-series analysis
{{{quiz-intro}}}
{{{quiz-ref(video 6)}}}
**** Difference
:PROPERTIES:
:QUESTION_TYPE: multiple choice
:END:
What method can be used to calculate the change between observations?
- [ ] =ts.change()=
- [ ] =ts.difference()=
- [X] =ts.diff()=
- [ ] =ts.divide()=
**** Rolling correlation
:PROPERTIES:
:QUESTION_TYPE: multiple choice
:END:
What does a rolling correlation measure?
- [X] How similar the change between two groups over a windowed period
of time.
- [ ] The change over time between groups averaged.
- [ ] A change in both groups of data.
- [ ] How similar two groups are.
**** Lag plot
:PROPERTIES:
:QUESTION_TYPE: multiple choice
:END:
What is a lag plot?
- [ ] A visualisation of the correlation between two variables.
- [ ] A scatter plot that visualises a random distribution.
- [X] A lag plot is a scatter plot that visualises data values on the
x-axis against the same data shifted one unit of time on the y-axis.
- [ ] A slow plot.
**** Autocorrelation plot
:PROPERTIES:
:QUESTION_TYPE: multiple choice
:END:
Which of the following statements are true?
- [X] An autocorrelation plot visualises the correlation between
time-series data and itself shifted across all time intervals.
- [ ] An autocorrelation plot visualises the correlation between
time-series data and a second time-series.
- [ ] An autocorrelation plot visualises the correlation between
time-series data and another variable with a constant lag.
- [X] Both lag plots and autocorrelation plots visualise how
correlated a time-series is with itself.
** TODO Topic summary
TBC
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment