Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show green (or another non-red) colour for upgrades available other than FTTP #361

Closed
lyricnz opened this issue May 18, 2024 · 16 comments
Closed
Labels
enhancement New feature or request

Comments

@lyricnz
Copy link
Contributor

lyricnz commented May 18, 2024

Eg
image

Current code has some requirements around FTTN/FTTC, and an implicit assumption that all upgrades are FTTP

    // Eligible for immediate upgrade
    if ((status == "Eligible To Order") && (tech == "FTTN" || tech == "FTTC")) {
        return dotTypes.FTTPUpgrade;
    }

    // Eligible for upgrade soon
    if ((status == "Build Finalised" || status == "MDU Complex Eligible To Apply" || status == "MDU Complex Premises In Build") && (tech == "FTTN" || tech == "FTTC")) {
        return dotTypes.FTTPUpgradeSoon;
    }
@lyricnz
Copy link
Contributor Author

lyricnz commented May 18, 2024

Related to #359 and #350 and #327

@lyricnz
Copy link
Contributor Author

lyricnz commented May 20, 2024

image

@lyricnz
Copy link
Contributor Author

lyricnz commented May 20, 2024

Added a tool for dumping status -> tech -> upgrade.

For 'Eligible To Order' this is:

 'Eligible To Order': {'FTTB': {'FTTP': 151},
                       'FTTC': {'FTTP': 554, 'FTTP_SA': 1123220, 'NULL_NA': 11},
                       'FTTN': {'FTTC': 16,
                                'FTTP': 161861,
                                'FTTP_SA': 1212985,
                                'NULL': 1,
                                'NULL_NA': 96,
                                'WIRELESS': 4},
                       'FTTP': {'NULL_NA': 11187},
                       'HFC': {'FTTP': 20},
                       'NULL': {'FTTP_SA': 3, 'NULL_NA': 2},
                       'SATELLITE': {'FTTC': 1,
                                     'FTTN': 10,
                                     'FTTP': 81,
                                     'NULL_NA': 2,
                                     'SATELLITE': 3,
                                     'WIRELESS': 4413},
                       'WIRELESS': {'FTTC': 1012,
                                    'FTTN': 178,
                                    'FTTN_SA': 246,
                                    'FTTP': 1089,
                                    'NULL_NA': 422}},

@lyricnz
Copy link
Contributor Author

lyricnz commented May 20, 2024

image

@LukePrior
Copy link
Owner

For 'Eligible To Order' this is:

Oh this is very interesting indeed.

@lyricnz
Copy link
Contributor Author

lyricnz commented May 20, 2024

image

@lyricnz
Copy link
Contributor Author

lyricnz commented May 20, 2024

@LukePrior the full status -> tech -> upgrade:count dump is

{'?': {'FTTB': {'NULL_NA': 610471},
       'FTTC': {'NULL_NA': 38320},
       'FTTN': {'NULL_NA': 1},
       'FTTP': {'NULL_NA': 2806138},
       'HFC': {'NULL_NA': 2735177},
       'NULL': {'NULL_NA': 138737, 'UNKNOWN': 1731},
       'SATELLITE': {'NULL_NA': 397569, 'UNKNOWN': 5},
       'WIRELESS': {'NULL_NA': 744029, 'UNKNOWN': 23}},
 'Build Finalised': {'FTTB': {'FTTP_NA': 33},
                     'FTTC': {'FTTP_NA': 66},
                     'FTTN': {'FTTP_NA': 56915},
                     'FTTP': {'FTTP_NA': 21, 'SAT_NA': 1},
                     'NULL': {'FTTP_NA': 83},
                     'SATELLITE': {'FTTP_NA': 131, 'FW_NA': 6},
                     'WIRELESS': {'FTTP_NA': 1098}},
 'Committed': {'FTTB': {'FTTP_NA': 3},
               'FTTC': {'FTTP_NA': 4},
               'FTTN': {'FTTP_NA': 809872},
               'FTTP': {'FTTP_NA': 3},
               'NULL': {'FTTP_NA': 43},
               'SATELLITE': {'FTTP_NA': 1},
               'WIRELESS': {'FTTP_NA': 3}},
 'Eligible To Order': {'FTTB': {'FTTP': 151},
                       'FTTC': {'FTTP': 554, 'FTTP_SA': 1123220, 'NULL_NA': 11},
                       'FTTN': {'FTTC': 16,
                                'FTTP': 161861,
                                'FTTP_SA': 1212985,
                                'NULL': 1,
                                'NULL_NA': 96,
                                'WIRELESS': 4},
                       'FTTP': {'NULL_NA': 11187},
                       'HFC': {'FTTP': 20},
                       'NULL': {'FTTP_SA': 3, 'NULL_NA': 2},
                       'SATELLITE': {'FTTC': 1,
                                     'FTTN': 10,
                                     'FTTP': 81,
                                     'NULL_NA': 2,
                                     'SATELLITE': 3,
                                     'WIRELESS': 4413},
                       'WIRELESS': {'FTTC': 1012,
                                    'FTTN': 178,
                                    'FTTN_SA': 246,
                                    'FTTP': 1089,
                                    'NULL_NA': 422}},
 'Eligible to Order': {'FTTN': {'FTTP_NA': 2}, 'FTTP': {'FTTP_NA': 446}},
 'In Design': {'FTTN': {'FTTP_NA': 537030},
               'NULL': {'FTTP_NA': 25},
               'WIRELESS': {'FTTP_NA': 2}},
 'MDU Complex Eligible To Apply': {'FTTB': {'FTTP_NA': 385},
                                   'FTTC': {'FTTP_NA': 345779},
                                   'FTTN': {'FTTP_NA': 458221},
                                   'FTTP': {'FTTP_NA': 413},
                                   'HFC': {'FTTP_NA': 36},
                                   'NULL': {'FTTP_NA': 428},
                                   'WIRELESS': {'FTTP_NA': 2}},
 'MDU Complex Premises In Build': {'FTTC': {'FTTP_NA': 95},
                                   'FTTN': {'FTTP_NA': 533}},
 'New Tech Connected': {'FTTB': {'FTTP': 190},
                        'FTTC': {'FTTP': 3496},
                        'FTTN': {'FTTC': 29, 'FTTP': 11586, 'FTTP_NA': 1},
                        'FTTP': {'FTTP_NA': 33},
                        'HFC': {'FTTP': 98},
                        'SATELLITE': {'FTTN': 6, 'FTTP': 11, 'WIRELESS': 94},
                        'WIRELESS': {'FTTC': 57, 'FTTN': 49, 'FTTP': 45}},
 'Not Planned': {'FTTC': {'NULL_NA': 6},
                 'FTTN': {'NULL_NA': 748337},
                 'FTTP': {'NULL_NA': 65},
                 'HFC': {'NULL_NA': 1},
                 'NULL': {'NULL_NA': 33782},
                 'WIRELESS': {'NULL_NA': 2}},
 'Planned': {'FTTN': {'FTTP_NA': 429}},
 'Previous Tech Disconnected': {'FTTB': {'NULL_NA': 4},
                                'FTTC': {'NULL_NA': 21},
                                'FTTN': {'FTTP_NA': 62, 'NULL_NA': 267},
                                'FTTP': {'FTTP_NA': 175873, 'NULL_NA': 21006},
                                'NULL': {'FTTP_NA': 27},
                                'SATELLITE': {'NULL_NA': 5},
                                'WIRELESS': {'NULL_NA': 453}}}

@LukePrior
Copy link
Owner

I'm not sure on the colours especially for other upgrade which could for example be from Wireless to FTTN but would still show up as "better" then like FTTC. Or in your latest image where Satellite to FW is shown as "better" then SAT/FW.

I'm not sure what the best way to approach this, maybe the behaviour is fine and we can leave as is.

Some other options would be to dynamically generate for each tech/upgrade but that would need a lot of colours.

@LukePrior
Copy link
Owner

LukePrior commented May 20, 2024

If we were to split it out as much as possible I think we would have the following, organised "best to worst"

  • FTTP
  • FTTP Upgrade Available
  • FTTP Upgrade Soon
  • HFC
  • FTTC
  • FTTC Upgrade Available
  • FTTB
  • FTTN
  • FTTN Upgrade Available
  • Wireless
  • Wireless Upgrade Available
  • Satellite

@lyricnz
Copy link
Contributor Author

lyricnz commented May 20, 2024

Why is Wireless->FTTN (blue) "better" than FTTC? Because red/orange is bad?
Feel free to change them to whatever you like :)

@lyricnz
Copy link
Contributor Author

lyricnz commented May 20, 2024

You missed HFC->FTTP upgrade available (there are 98 of those). And satellite with/without upgrade? (there are upgrades to FTTN, FTTC, FTTP and wireless, with wireless being the most common)

@LukePrior
Copy link
Owner

LukePrior commented May 20, 2024

You missed HFC->FTTP upgrade available (there are 98 of those). And satellite with/without upgrade?

Oh the way I wrote it was listing the technology which can be upgraded to rather then the one upgrading from, not sure what is clearer.

i.e. no one is getting upgraded to Satellite

@lyricnz
Copy link
Contributor Author

lyricnz commented May 20, 2024

I guess it all comes down to what you're trying to show - current tech, upgrade availability / upgrade-to, etc. It's all up to function getDotType(tech, upgrade, date, status, generated) which currently shows "upgrade" by preference, followed by current tech type.

@LukePrior LukePrior added the enhancement New feature or request label May 20, 2024
@LukePrior
Copy link
Owner

Yeah it would be good to better understand who's using the site and what for so could then customise the experience to best suit their needs but for time being this seems like a good setup.

@lyricnz
Copy link
Contributor Author

lyricnz commented May 20, 2024

@LukePrior maybe raise another issue to revisit node-colouring as a whole? This PR was attempting to show people who had non-FTTP upgrades a different colour.

@lyricnz
Copy link
Contributor Author

lyricnz commented May 20, 2024

Maybe you could even have a toggle/selector that switched out getDotType() completely for a couple of different options?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants