@@ -9,6 +9,7 @@ interface DatasetFeature {
99 componentSubgroup ?: string ;
1010 fileName : string ;
1111 linkToInfo : string ;
12+ deprecated ?: boolean ;
1213}
1314
1415type DatasetFeatures = Record < string , DatasetFeature > ;
@@ -31,12 +32,16 @@ interface ComprehensiveDatasetFeature extends DatasetFeature {
3132
3233export function groupFeaturesByComponent (
3334 features : string [ ] = Object . keys ( DATASET_FEATURES ) ,
35+ removeDeprecated = false ,
3436) : Record < string , DatasetComponentFeature [ ] > {
3537 const groupedFeatures : Record < string , DatasetComponentFeature [ ] > = { } ;
3638
3739 features . forEach ( ( feature ) => {
3840 const featureData = DATASET_FEATURES [ feature ] ;
3941 if ( featureData !== undefined ) {
42+ if ( removeDeprecated && featureData . deprecated === true ) {
43+ return ;
44+ }
4045 const component =
4146 featureData . component !== '' ? featureData . component : 'Other' ;
4247 if ( groupedFeatures [ component ] === undefined ) {
@@ -287,24 +292,43 @@ export const DATASET_FEATURES: DatasetFeatures = {
287292 } ,
288293} ;
289294// SPELLING CORRECTIONS
290- DATASET_FEATURES [ 'Text-to-Speech' ] = DATASET_FEATURES [ 'Text-To-Speech' ] ;
295+ DATASET_FEATURES [ 'Text-to-Speech' ] = {
296+ ...DATASET_FEATURES [ 'Text-To-Speech' ] ,
297+ deprecated : true ,
298+ } ;
291299
292300// DEPRECATED FEATURES
293301DATASET_FEATURES [ 'Wheelchair Accessibility' ] = {
294302 // as of 6.0
295303 component : 'Accessibility' ,
296304 fileName : 'trips.txt' ,
297305 linkToInfo : 'https://gtfs.org/getting-started/features/accessibility' ,
306+ deprecated : true ,
307+ } ;
308+ DATASET_FEATURES [ 'Bikes Allowance' ] = {
309+ ...DATASET_FEATURES [ 'Bike Allowed' ] ,
310+ deprecated : true ,
311+ } ;
312+ DATASET_FEATURES [ 'Transfer Fares' ] = {
313+ ...DATASET_FEATURES [ 'Fare Transfers' ] ,
314+ deprecated : true ,
315+ } ; // as of 6.0
316+ DATASET_FEATURES [ 'Pathways (basic)' ] = {
317+ ...DATASET_FEATURES [ 'Pathway Connections' ] ,
318+ deprecated : true ,
319+ } ; // as of 6.0
320+ DATASET_FEATURES [ 'Pathways (extra)' ] = {
321+ ...DATASET_FEATURES [ 'Pathway Details' ] ,
322+ deprecated : true ,
323+ } ; // as of 6.0
324+ DATASET_FEATURES [ 'Traversal Time' ] = {
325+ ...DATASET_FEATURES [ 'In-station Traversal Time' ] ,
326+ deprecated : true ,
298327} ;
299- DATASET_FEATURES [ 'Bikes Allowance' ] = DATASET_FEATURES [ 'Bike Allowed' ] ;
300- DATASET_FEATURES [ 'Transfer Fares' ] = DATASET_FEATURES [ 'Fare Transfers' ] ; // as of 6.0
301- DATASET_FEATURES [ 'Pathways (basic)' ] = DATASET_FEATURES [ 'Pathway Connections' ] ; // as of 6.0
302- DATASET_FEATURES [ 'Pathways (extra)' ] = DATASET_FEATURES [ 'Pathway Details' ] ; // as of 6.0
303- DATASET_FEATURES [ 'Traversal Time' ] =
304- DATASET_FEATURES [ 'In-station Traversal Time' ] ;
305328DATASET_FEATURES [ 'Pathways Directions' ] = {
306329 // as of 6.0
307330 component : 'Pathways' ,
308331 fileName : 'pathways.txt' ,
309332 linkToInfo : 'https://gtfs.org/schedule/reference/#pathwaystxt' ,
333+ deprecated : true ,
310334} ;
0 commit comments