Skip to content

Commit

Permalink
Persist program regions
Browse files Browse the repository at this point in the history
This commit adds collecting the Continent, Country, Region and
Settlement columns from the Programs Metadata table when
`npm run fetch-episodes` is run.

refs #20
  • Loading branch information
edsu committed Jun 8, 2021
1 parent 18727b9 commit 8d26c14
Show file tree
Hide file tree
Showing 8 changed files with 182,420 additions and 21,506 deletions.
38 changes: 37 additions & 1 deletion src/commands/fetch-episodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const episodeMap = {
"instantiationLocation": "location",
"coverageType_Temporal": "temporal",
"pbcoreinstantiationLanguage": "language",
"AssetDate dateType_broadcast version_year": "year"
"AssetDate dateType_broadcast version_year": "year"
},

things: {
Expand Down Expand Up @@ -98,6 +98,42 @@ const episodeMap = {
name: g.name
}
})
},
"Continent": {
property: "continent",
expander: makeIdExpander("places.json", g => {
return {
id: g.id,
name: g.name
}
})
},
"Country": {
property: "country",
expander: makeIdExpander("places.json", g => {
return {
id: g.id,
name: g.name
}
})
},
"Region": {
property: "region",
expander: makeIdExpander("places.json", g => {
return {
id: g.id,
name: g.name
}
})
},
"Settlement": {
property: "settlement",
expander: makeIdExpander("places.json", g => {
return {
id: g.id,
name: g.name
}
})
}
},

Expand Down
Loading

0 comments on commit 8d26c14

Please sign in to comment.