Network Rail Data Feeds Refresh #1

Closed
opened 2023-01-05 16:04:27 +00:00 by fred.boniface · 3 comments

Network Rail Data feeds have been refreshed.

https://wiki.openraildata.com/index.php?title=NROD_System_Refresh

Key Points:

Requirements:

  • Update calls to the Network Rail API Endpoints.

  • Test existing functions work with the new data format.

  • Test database calls with the new data format.

Network Rail Data feeds have been refreshed. https://wiki.openraildata.com/index.php?title=NROD_System_Refresh Key Points: * New URL: https://publicdatafeeds.networkrail.co.uk/ntrod * The existing endpoint (https://datafeeds.networkrail.co.uk/ntrod) will continue working throughout Jan '23. * Empty JSON Fields will be filtered from the new feed, this means filter functions no longer need to be created. * Authentication details and methods have not changed. Requirements: - [ ] Update calls to the Network Rail API Endpoints. - [ ] Test existing functions work with the new data format. - [ ] Test database calls with the new data format.
fred.boniface added this to the v1.0.0 Release project 2023-01-05 16:06:20 +00:00
fred.boniface self-assigned this 2023-01-05 16:07:05 +00:00
fred.boniface started working 2023-01-05 16:07:10 +00:00
fred.boniface added the due date 2023-01-31 2023-01-05 16:07:55 +00:00
fred.boniface canceled time tracking 2023-01-05 16:15:45 +00:00
Author
Owner

Currently in /src/services/corpus.services.js the clean(input) function cleans elements which have STANOX and 3ALPHA values of ' '.

async function clean(input) {
    let clean = [];
    for (const element of input) {
        if (element.STANOX != ' ' && element['3ALPHA'] != ' '){
            delete(element.UIC);
            delete(element.NLCDESC16);
            delete(element.NLC);
            clean.push(element);
        }
    }
    return clean;

When migrating to the new API, this will need to check for elements with missing keys rather than values of ' '.

Currently in /src/services/corpus.services.js the `clean(input)` function cleans elements which have STANOX and 3ALPHA values of ' '. ``` async function clean(input) { let clean = []; for (const element of input) { if (element.STANOX != ' ' && element['3ALPHA'] != ' '){ delete(element.UIC); delete(element.NLCDESC16); delete(element.NLC); clean.push(element); } } return clean; ``` When migrating to the new API, this will need to check for elements with missing keys rather than values of ' '.
fred.boniface added the
bug
label 2023-01-06 14:51:48 +00:00
Author
Owner

Currently in /src/services/corpus.services.js the clean(input) function cleans elements which have STANOX and 3ALPHA values of ' '.

async function clean(input) {
    let clean = [];
    for (const element of input) {
        if (element.STANOX != ' ' && element['3ALPHA'] != ' '){
            delete(element.UIC);
            delete(element.NLCDESC16);
            delete(element.NLC);
            clean.push(element);
        }
    }
    return clean;

When migrating to the new API, this will need to check for elements with missing keys rather than values of ' '.

clean(input) will probably need to look more like:

async function clean(input){
    let clean = [];
    for (const element of input){
        if (typeof element.STANOX != 'undefined' && typeof element['3ALPHA'] != 'undefined'){
            delete(element.UIC);
            delete(element.NLCDESC16);
            delete(element.NLC);
            clean.push(element);
        }
    }
    return clean;
}
> Currently in /src/services/corpus.services.js the `clean(input)` function cleans elements which have STANOX and 3ALPHA values of ' '. > > ``` > async function clean(input) { > let clean = []; > for (const element of input) { > if (element.STANOX != ' ' && element['3ALPHA'] != ' '){ > delete(element.UIC); > delete(element.NLCDESC16); > delete(element.NLC); > clean.push(element); > } > } > return clean; > ``` > > When migrating to the new API, this will need to check for elements with missing keys rather than values of ' '. clean(input) will probably need to look more like: ``` async function clean(input){ let clean = []; for (const element of input){ if (typeof element.STANOX != 'undefined' && typeof element['3ALPHA'] != 'undefined'){ delete(element.UIC); delete(element.NLCDESC16); delete(element.NLC); clean.push(element); } } return clean; } ```
Author
Owner

Network Rail have extended the shutdown date for the existing API.

New shutdown date is 31/03/2023 at which point the current URL will point to the new service.

Network Rail have extended the shutdown date for the existing API. New shutdown date is 31/03/2023 at which point the current URL will point to the new service.
fred.boniface modified the due date from 2023-01-31 to 2023-03-31 2023-01-26 14:42:07 +00:00
This repo is archived. You cannot comment on issues.
No Milestone
No project
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

2023-03-31

Dependencies

No dependencies set.

Reference: fred.boniface/OwlBoard#1
No description provided.