U-Shift / SiteSelection

Script for a site selection - Streets4All Project
https://u-shift.github.io/SiteSelection/
Other
1 stars 0 forks source link

GTFS filter trips in a given date #9

Closed temospena closed 1 month ago

temospena commented 2 months ago

The function tidytransit::filter_feed_by_date() retrieves all the services that run in that date but that also sun in other dates. This is not what we want.

Another option is to identify which service pattern has more days, trips and routes, and filter that service_id.

Here is how: https://cran.r-project.org/web/packages/tidytransit/vignettes/frequency.html

valenca13 commented 2 months ago

braga

Here are the Results for Braga. Braga has a total of 11 service patterns. It is important to mention that the Calendar dates are from: 28/03/2024 - 04/04/2024.

valenca13 commented 2 months ago

lisbon

AML has 188 service patterns. We can choose the ones that operate during more days the year. Calendar dates from AML range from 01/07/2023 to 31/12/2024.

temospena commented 2 months ago

Can you choose more than one?

On Tue, Apr 9, 2024 at 5:07 PM Gabriel Valença @.***> wrote:

lisbon.png (view on web) https://github.com/U-Shift/SiteSelection/assets/69808511/ae35a94b-5d5b-433c-8570-ec34001ffad9

AML has 188 service patterns. We can choose the ones that operate during more days the year. Calendar dates from AML range from 01/07/2023 to 31/12/2024.

— Reply to this email directly, view it on GitHub https://github.com/U-Shift/SiteSelection/issues/9#issuecomment-2045567900, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJKLUXWFQ6BL36653XKJ75LY4QG3XAVCNFSM6AAAAABFZMNIXCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBVGU3DOOJQGA . You are receiving this because you authored the thread.Message ID: @.***>

valenca13 commented 2 months ago

Analyze the service patterns of AML. Take a look at the locations.

valenca13 commented 2 months ago

aml

All the bus stops that are present in the AML. Check the locations of the most frequent service patterns. Are they in different locations?

valenca13 commented 2 months ago

service_pattern_1

Bus routes of service pattern "s_d38ffee" (192 days)

valenca13 commented 2 months ago

service_pattern_2

Bus routes of service pattern "s_0973a74" (191 days)

valenca13 commented 2 months ago

service_pattern_3

Bus routes of service patterns "s_70dfe23" (188 days)

valenca13 commented 2 months ago

The most frequent service patterns are actually in different locations in the AML. Should we aggregate the 3? What are the next steps? @temospena

temospena commented 2 months ago

I would expect that. But there should be 4 expressive service patterns, not 3, 1 for each area. After finding this 4th one, I would suggest to change the calendar dates of the less expressive ones, to be compatible with the most expressive one. For instance, if service_pattern 3 is running between 01-01-2024 to 31-03-2024 and service_pattern 1 is running between 01-10-2023 to 31-12-2023, recode the calendar dates of this one to be at same date and time than the previous one (looking at the calendar and matching monday with monday)

valenca13 commented 2 months ago

service_pattern_7

This is the service pattern with that operates in 7th most days of the year ("s_a6bf59d (44 days)). The other 3 service patterns are very similar to the ones that I have already got.

valenca13 commented 2 months ago

service_pattern_10

Service pattern 10 ("s_ba5dcc4" (39 days)). The routes appear more in the north with 143 routes (ranked 26th in terms of number of routes)

valenca13 commented 2 months ago

service_pattern_11 Service pattern 11 seems to be the fourth region ("s_f22b75f" (39 days)). @temospena

valenca13 commented 2 months ago

service_pattern_12 Also service pattern 12 (""s_fff1bcb" (39 days)) @temospena

temospena commented 2 months ago

Service pattern 11 seems to be the fourth region ("s_f22b75f" (39 days)). @temospena

There should be a service pattern going south, to Montijo, Alcochete, and so on...

valenca13 commented 2 months ago

Service pattern 11 seems to be the fourth region ("s_f22b75f" (39 days)). @temospena

There should be a service pattern going south, to Montijo, Alcochete, and so on...

service_pattern_18

Service_pattern "s_bc376dc" (37 days)

valenca13 commented 2 months ago

Adopted service patterns (ranked by "days in service"):

  1. Service pattern 1: "s_d38ffee" (192 days)
  2. Service pattern 2: "s_0973a74" (191 days)
  3. Service pattern 3: "s_70dfe23" (188 days)
  4. Service pattern 12: "s_fff1bcb" (39 days)
  5. Service pattern 18: "s_bc376dc" (37 days)
valenca13 commented 2 months ago

5. "s_bc376dc"

Captura de ecrã 2024-04-30 111946

O service pattern 18 só opera 1 mês. Vou ter que analisar os próximos passos. @temospena

valenca13 commented 2 months ago
valenca13 commented 2 months ago
valenca13 commented 1 month ago

Critérios:

@temospena Captura de ecrã 2024-05-05 130336

valenca13 commented 1 month ago

@temospena Já fiz o código dos níveis de serviço dentro da célula no código "cellcandidates.R". Por favor verifique se está tudo ok. Obrigado.

temospena commented 1 month ago

The file was generated for Portugal (great work @valenca13 !) and is available at releases.

The code is not fully reproducible because tidytransit](tidytransit::set_servicepattern() generates random hash numbers for identificators.

Something to consider when rebuilding for other year/region.