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

autoupdate weekly files added, fix cellrefs for scotland #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

waterleat
Copy link

Can I have that gold star you offered for the auto update?

  • I take the current time and compare to "zero" publish time (you might know when these actually occur, using 12:00) and get number of weeks. This uses a lookup table to find the correct end col, or row for NI.
  • The base directory for the files has been added so the source address can be created for use in curl
  • A function has been added to create the English still date which is displayed on the plots. I have commented out the year as you had placed that in the text for each file. Sorry me being lazy, and have other tasks to do.

I have had to fix the cell references in the Scottish file all had to move 1 row down

This has been my first project in R so my code might not be the most efficient and best presented, but getting the hang of it. There are some error messages from the very last plot but I have not studied that enough to workout the reason for the messages - possibly needs more data points

@waterleat
Copy link
Author

OOPS! I had left setwd line in - line10
sorry not to familiar with PRs to know how to change that

@VictimOfMaths
Copy link
Owner

Oh wow, this looks great, thanks! I think I will need to work through it a little, because the file names can't be totally automated - NI keep randomly capitalising and uncapitalising the file name and ONS and NRS have sometimes published revisions which get a _1 appended to the filename. So I need to think about how to allow a manual override to your automatic code for those situations.

@waterleat
Copy link
Author

Glad you like it. I had been following the stats over the year from Andrew Mather, and Ivor Cummins via youtube, with more recently yourself and some other from twitter. However, your R code seems to be a great way at collecting and presenting the data. I will look forward to seeing your updates

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

Successfully merging this pull request may close these issues.

2 participants