Skip to content

Update filter condition in data processing pipeline - #106

Open
mar-baute wants to merge 1 commit into
RohanAlexander:mainfrom
mar-baute:patch-1
Open

Update filter condition in data processing pipeline#106
mar-baute wants to merge 1 commit into
RohanAlexander:mainfrom
mar-baute:patch-1

Conversation

@mar-baute

Copy link
Copy Markdown

On the current version of the Wikipedia page, the header row is no longer removed by this filter. html_table() returns the column titles as the first data row, and the exact string it produces has changed since this was written, so the != comparison no longer matches. The header row survives distinct() and reaches separate(), where it has no four-digit year — producing an NA row and a warning, and inflating the counts downstream.

Rather than update the hardcoded string, this changes the filter to keep only rows containing a four-digit year, which is what separate() requires anyway.

On the current version of the Wikipedia page, the header row is no longer removed by this filter. html_table() returns the column titles as the first data row, and the exact string it produces has changed since this was written, so the != comparison no longer matches. The header row survives distinct() and reaches separate(), where it has no four-digit year — producing an NA row and a warning, and inflating the counts downstream.

Rather than update the hardcoded string, this changes the filter to keep only rows containing a four-digit year, which is what separate() requires anyway.
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.

1 participant