ONSvisual / local-statistics

https://local-statistics.vercel.app
2 stars 0 forks source link

Fix indicator slugs with spaces + capital letters #8

Open bothness opened 7 months ago

bothness commented 7 months ago

Some of the indicators have slug strings like "employment-rate-long-Economic Activity Rate", which leads to a url like this: https://local-statistics-dev.vercel.app/datasets/employment-rate-long-Economic%20Activity%20Rate

We need to fix these so that they are only composed of lowercase letters and hyphens, like employment-rate-long-economic-activity-rate. This is important for launch as we want these to be permalinks

sveltifier commented 7 months ago

should just be able to use our slugify function i think?

jtrim-ons commented 7 months ago

There are also ones like annual-personal-wellbeing-estimates-Satisfaction mean score (where 10 is 'completely satisfied')

Maybe the bit in brackets could be deleted from this before slugification?

jtrim-ons commented 7 months ago

I've added a draft column of slugs to https://github.com/ONSvisual/local-statistics/blob/dev/scripts/insights/raw/config-data/indicators/indicators-metadata.csv. These get put into config.json.

Still to do:

jtrim-ons commented 7 months ago

I've added some checks in the processing script. Just need to check the slugs manually now.