Skip to content

Commit

Permalink
correct population historical path
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasrodes committed Jul 25, 2024
1 parent 75b4f9c commit 44de866
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/@ourworldindata/grapher/src/core/GrapherConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ export const isContinentsVariableId = (id: string | number): boolean =>

// ETL paths are composed of channel/namespace/version/dataset/table#columnname
// We want to identify the any version of these two columns (added whitespaces for readability):
// grapher / demography / ANY VERSION / population # population
// grapher / demography / ANY VERSION / population # population_historical
// grapher / demography / ANY VERSION / population / population # population
// grapher / demography / ANY VERSION / population / historical # population_historical
const population_regex =
/^grapher\/demography\/[\d-]+\/population\/population#population(_historical)?$/
/^grapher\/demography\/[\d-]+\/population\/(population#population|historical#population_historical)$/

export const isPopulationVariableETLPath = (path: string): boolean => {
return population_regex.test(path)
Expand Down

0 comments on commit 44de866

Please sign in to comment.