0% found this document useful (0 votes)
7 views5 pages

Warm Up

Uploaded by

Almira Damara
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views5 pages

Warm Up

Uploaded by

Almira Damara
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

WarmUp Task - Research Portfolio 2023-2024

FEATHERS-tazToAddrDisaggr-MATSim chain

October 19, 2023

Contents
1 Intro 1

2 Getting started 1
2.1 Data describing FEATHERS schedules . . . . . . . . . . . . . . . . . . 2
2.1.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2.1.2 Encoding - Metadata . . . . . . . . . . . . . . . . . . . . . . . . 3

3 TAZ to position Disaggregation 4

4 Warm up tasks 4
4.1 Compute overall aggregations . . . . . . . . . . . . . . . . . . . . . . . 4
4.2 Compute personal classifications and aggregations . . . . . . . . . . . 5

1 Intro
1. This text presents some non-trivial (but also not too difficult) tasks that can be
used as a warm up for the research portfolio. The tasks well be useful for the
project and are supplied as an opportunity to learn Python3.

2. Examples in Python3 will be made available if needed (feel free to ask).


3. Feel free to use R instead of Python3 if you think that is more comfortable for
you.

2 Getting started
1. All warm up tasks are similar. From the second task on, each task is a (small)
extension of the predecessor.
2. The warm up tasks are common to all sub-projects.

1
Research Portfolio 2023-2024: FEATHERS-tazToAddrDisaggr-MATSim chain

3. In order to get started:


ˆ The tutorial https://docs.python.org/3/tutorial/ is a good start.
ˆ Use the tutorial together with https://www.youtube.com/watch?v=rfscVS0vtbw.
ˆ For details and examples about specific modules (e.g. to read CSV files)
look at https://docs.python.org/3/library//
4. For the later tasks, matplotlib is used. This is non-trivial but very productive.
Have a look at
ˆ https://matplotlib.org/
ˆ https://matplotlib.org/3.3.0/gallery/index.html
ˆ https://matplotlib.org/stable/plot types/index.html.

2.1 Data describing FEATHERS schedules


2.1.1 General
1. File schedules baseYear.csv contains the FEATHERS prediction for the baseyear
for The Netherlands. Please consider this a confidential info. The file contains
14640387 lines. This one will be used to produce the final result.
2. File schedules baseYear 996.csv contains the first 996 lines of the prediction
file. Use this one for testing. It contains the complete schedules (travel plans)
for 259 people. You can open this in Excel (or any other spreadsheet tool) to
get familiar with the data.
3. A FEATHERS prediction (schedules.csv) applies to a single day.

4. Each line in a schedules file represents one (1) episode.


5. Important: you can assume that in all schedules files the episodes for a par-
ticular individual are in consecutive lines.
6. The columns in schedules files (at least in the version hat we use) are:
1: person id # numeric p e r s o n i d e n t i f i e r
2: activity type # 1 : home , 2 : work , 3 : b u s i n e s s , 4 : bringGet ,
# 5 : s c h o o l , 6 : shopping , 7 : o t h e r
3: activity location # numeric TAZ i d e n t i f i e r
4: activity start time # minute o f t h e day [ 1 8 0 . . 1 6 2 0 ]
# ( from 0 3 : 0 0 h t o 0 3 : 0 0 h )
5: activity duration # minutes
6: trip transport mode # 1 : walk , 2 : bike , 3 : bike , 4 : car , 5 : car , 6 : pt ,
# 7 : pt , 8 : bike , 9 : bi ke , 1 0 : car , 1 1 : c a r
7: trip origin # numeric TAZ i d e n t i f i e r
8: trip destination # numeric TAZ i d e n t i f i e r
9: trip start time # minute o f t h e day [ 1 8 0 . . 1 6 2 0 ]

Version 1.0 Generated October 19, 2023 00:56h Page 2


Research Portfolio 2023-2024: FEATHERS-tazToAddrDisaggr-MATSim chain

10: trip duration # minutes


11: trip distance # hm ( h e c t o m e t e r s )
12: t r i p i d # u i d ( unique i d e n t i f i e r )
13: tour id # u i d ( unique i d e n t i f i e r )
14: age person # categories :
# 1 : ( 1 8 to 35) , 2 : ( 3 5 to 55) , 3 : ( 5 5 to 65) ,
# 4 : ( 6 5 to 75) , 5 : ( 7 5 to 100)
15: gender # g e n d e r mapping : 1 :m, 2 : f
16: roots person # ?? ( Encoding = ? ? )
17: d r iv i ng l ic e ns e # hasDriverLicense = 1
18: hh composition # h o u s e h o l d c o m p o s i t i o n ( Encoding = ? ? )
19: hh nr of cars # number o f c a r s i n h o u s e h o l d
2 0 : day # day o f week ( Encoding = ? ? )
2 1 : paid work # hasPaidJob = 1
22: education # e c u c a t i o n l e v e l ( Encoding = ? ? )
23: student pt # has s t u d e n t pt c a r d ( Dutch phenomenon )
24: urbanized # ?? ( Encoding = ? ? )
2 5 : hh income # inxome c a t e g o r y ( Encoding = ? ? )
26: veh type # v e h i c l e ( presumably c a r ) type ( Encoding = ? ? )
27: bicycle type # b i c y c l e type ( Encoding = ? ? )
2 8 : new mode 1 # project specific
2 9 : new mode 2 # project specific
3 0 : new mode 3 # project specific
3 1 : new mode 4 # project specific
3 2 : new mode 5 # project specific
3 3 : new mode 6 # project specific
3 4 : new mode 7 # project specific

Note that many fields are not relevant for the Research Portfolio 2023 project.

2.1.2 Encoding - Metadata


1. Notes on travel modes: the UTNii project distinguishes between several types of
bikes. When the FEATHERS schedules are transformed to MATSim plans, UTNii
bike modes are folded into a single bike mode according to the table below.

Version 1.0 Generated October 19, 2023 00:56h Page 3


Research Portfolio 2023-2024: FEATHERS-tazToAddrDisaggr-MATSim chain

Code Name Description TravelType CollectivityType


1 micro5 nietgedeeld walk soloTravel noCollectiveOwnership
2 micro15 nietgedeeld regular bike soloTravel noCollectiveOwnership
3 micro25 nietgedeeld electric bike, soloTravel noCollectiveOwnership
motorbike
4 prive nietgedeeld passenger car soloTravel noCollectiveOwnership
5 gedeeldprive nietgedeeld passenger car coTravel noCollectiveOwnership
(carpooling)
6 gedeeldondemand gedeeld public, collec- coTravel collectiveOwnershop
tive transport
on demand
7 gedeeldtraditioneel gedeeld traditional coTravel collectiveOwnershop
public, collec-
tive transport
8 micro15 gedeeld regular bike soloTravel collectiveOwnership
(shared regular bike)
9 micro25 gedeeld electric bike soloTravel collectiveOwnership
(shared electric bike)
10 prive gedeeld passenger car soloTravel collectiveOwnership
(shared car)
11 gedeeldprive gedeeld passenger car coTravel collectiveOwnership
(shared car)

2. If the value for a quantity is unknown or undefined it is represented by −2 (in


the FEATHERS version we use).
Example: the first home activity in the day is prefixed by a null-trip with zero
distance and duration. For such null-trips trip transport mode = -2.

3 TAZ to position Disaggregation


The paper Knapen et al. (2023) is relevant for tasks proposalSubmission 2023 04b
and proposalSubmission 2023 04c. It describes the initial version of the tools. The
software has been elaborated in the meantime but the new version has not yet been
published in a paper. A design document and a set of slides are available about the
software upgrade.

4 Warm up tasks
4.1 Compute overall aggregations
1. Extract the total distance driven on the day for which the prediction holds.
Thereto
(a) read the episodes
(b) extract the trip travel distance
(c) accumulate the travel distances
2. Extract for each mode the total distance driven on the day for which the pre-
diction holds. Thereto

Version 1.0 Generated October 19, 2023 00:56h Page 4


Research Portfolio 2023-2024: FEATHERS-tazToAddrDisaggr-MATSim chain

(a) read the episodes


(b) extract the trip travel distance and the trip mode
(c) accumulate the travel distances by mode (Hint: use a dictionary)

4.2 Compute personal classifications and aggregations


1. Count the number of people making at least one trip but do not use the car.
Hint: consider the following classes of persons: (i) non-travellers (ii) traveller-
s-non-car (iii) travellers-using-car

(a) read the episodes


(b) extract the person id and the trip mode. Count the number of trips for
each mode for the person during the day. Classify the person according to
the number of trips in each mode.
(c) accumulate the travel distances by mode (Hint: use a dictionary)

2. Extract the average daily travel time per person from the FEATHERS schedules
file. Thereto
(a) read the episodes
(b) extract the person identifier and the trip travel time. Hint: each time the
person id differs from the previous one, you found an episode to the next
person.
(c) accumulate the travel times for the person (this is the daily travel time)
(d) sum all personal daily travel times
(e) divide by the number of persons

References
Knapen, L., Adnan, M., Bellemans, T., 2023. Location disaggregation for zone based
travel plans. Procedia Computer Science 220, 283–290. URL: https://www.
sciencedirect.com/science/article/pii/S1877050923005720, doi:https://
doi.org/10.1016/j.procs.2023.03.037.

Version 1.0 Generated October 19, 2023 00:56h Page 5

You might also like