Skip to content

ScotGovAnalysis/nrs-baby-names

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Baby names

A R shiny app showing baby names trends in Scotland since 1974. Go to the app.

Project Status: Active – The project has reached a stable, usable state and is being actively developed.

Screenshot of the baby names shiny app

How it works

Tidy up the user input and split into a vector of valid names. Plot these names and display a list of similar names by Levenshtein distance. Each of these similar names is an ActionLink that updates the plot.

How to update

  1. Make a copy of the most recent files
  2. Update the CSV file
    • Check for names that contain characters that aren’t letters, dashes or apostrophes (regex: [^A-Za-z'-])
    • User input is split by these characters in server.R (e.g. commas and spaces)
  3. Update the code
    • Update the data download link: data_url on line 22 in global.R
  4. Create a feather file from the CSV file
    • There is a script for this
    • This format is used to reduce the load time of the app. In future, the data could be uploaded to statistics.gov.scot. This would allow the app to use the API instead.
  5. The day before launch, scale up performance noting the original values you used
  6. Once demand has returned back to normal (usually after a few days) scale performance back down by returning the settings in step 5 back to normal
    • This has been ramped up permanently, but may need to go back to doing this if it causes problems

Licence

This repository is available under the Open Government Licence v3.0.

About

A R shiny app showing baby names trends in Scotland since 1974

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published