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

Add 3 new views for RAs basing on "genre" of "source" of RAs #528

Merged
merged 5 commits into from
Jun 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ jobs:
docker run --rm -t -v $(pwd):/tmp duncdrum/textql:alpine -output-header -output-file csv/views/view02_creator-matrix.csv -header -sql "select distinct a.act_id, a.act_object, w.creator, (select distinct ps.title from PrimarySource ps where a.act_object = ps.prim_source_id) as title, (select distinct coalesce(p.family_name, '') || ' ' || coalesce(p.first_name, '') from Person p where w.creator = p.person_id) as name from Act a, Work w inner join Work on a.act_object = w.work_id where a.act_object!='W0414'" csv/data/
docker run --rm -t -v $(pwd):/tmp duncdrum/textql:alpine -output-header -output-file csv/views/view03a_reader-author-nodes.csv -header -sql "select distinct a.agent_id as node_id from Agent a" csv/data/
docker run --rm -t -v $(pwd):/tmp duncdrum/textql:alpine -output-header -output-file csv/views/view03b_reader-author-edges.csv -header -sql "select distinct a.act_id, a.agent as source, w.creator as target from Act a, Work w inner join Work on a.act_object = w.work_id" csv/data/
docker run --rm -t -v $(pwd):/tmp duncdrum/textql:alpine -output-header -output-file csv/views/view05a_RA_source_G44.csv -header -sql "select distinct a.act_id, a.act_object, ps.title from Act a, PrimarySource ps inner join PrimarySource on a.act_object = ps.prim_source_id where ps.language != 'zh' and ps.language != 'zh-Latn-pinyin' and a.act_object!='W0414' and a.source in (select prim_source_id from (select * from PrimarySource union all select * from SecondarySource) AS ss where ss.genre=='G44')" csv/data/
docker run --rm -t -v $(pwd):/tmp duncdrum/textql:alpine -output-header -output-file csv/views/view05b_RA_source_G07.csv -header -sql "select distinct a.act_id, a.act_object, ps.title from Act a, PrimarySource ps inner join PrimarySource on a.act_object = ps.prim_source_id where ps.language != 'zh' and ps.language != 'zh-Latn-pinyin' and a.act_object!='W0414' and a.source in (select prim_source_id from (select * from PrimarySource union all select * from SecondarySource) AS ss where ss.genre=='G07')" csv/data/
docker run --rm -t -v $(pwd):/tmp duncdrum/textql:alpine -output-header -output-file csv/views/view05c_RA_source_fiction.csv -header -sql "select distinct a.act_id, a.act_object, ps.title from Act a, PrimarySource ps inner join PrimarySource on a.act_object = ps.prim_source_id where ps.language != 'zh' and ps.language != 'zh-Latn-pinyin' and a.act_object!='W0414' and a.source in (select prim_source_id from (select * from PrimarySource union all select * from SecondarySource) AS ss, Genre g inner join Genre where ss.genre=g.genre_id and g.genre_type=='fiction')" csv/data/


- name: Update JSON View Data
run: basex xml/modules/rAct-vega.xq > csv/views/view04a_rActs.json
- name: Check Git Status
Expand Down
108 changes: 108 additions & 0 deletions csv/datapackage.json
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,114 @@
}
}
}
},
{
"title": "Titles of textual works",
"resources": {
"name": "view5a",
"data": {
"url": "https://raw.githubusercontent.com/readchina/ReadAct/master/csv/views/view05a_RA_source_G44.csv"
},
"specType": "vega-lite",
"spec": {
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"description": "Textual works when Reading Acts are sellected basing on the genre of their source (autobiography)",
"data": {
"url": "https://raw.githubusercontent.com/readchina/ReadAct/master/csv/views/view05a_RA_source_G44.csv"
},
"mark": {
"type": "bar",
"tooltip": true
},
"encoding": {
"x": {
"field": "title",
"type": "ordinal",
"axis": {
"labelAngle": 0
},
"sort": "-y"
},
"y": {
"aggregate": "count",
"field": "act_object",
"type": "quantitative"
}
}
}
}
},
{
"title": "Titles of textual works",
"resources": {
"name": "view5b",
"data": {
"url": "https://raw.githubusercontent.com/readchina/ReadAct/master/csv/views/view05b_RA_source_G07.csv"
},
"specType": "vega-lite",
"spec": {
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"description": "Textual works when Reading Acts are sellected basing on the genre of their source (science fiction)",
"data": {
"url": "https://raw.githubusercontent.com/readchina/ReadAct/master/csv/views/view05b_RA_source_G07.csv"
},
"mark": {
"type": "bar",
"tooltip": true
},
"encoding": {
"x": {
"field": "title",
"type": "ordinal",
"axis": {
"labelAngle": 0
},
"sort": "-y"
},
"y": {
"aggregate": "count",
"field": "act_object",
"type": "quantitative"
}
}
}
}
},
{
"title": "Titles of textual works",
"resources": {
"name": "view5c",
"data": {
"url": "https://raw.githubusercontent.com/readchina/ReadAct/master/csv/views/view05c_RA_source_fiction.csv"
},
"specType": "vega-lite",
"spec": {
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"description": "Textual works, when Reading Acts are sellected basing on the genre type of their source (fiction)",
"data": {
"url": "https://raw.githubusercontent.com/readchina/ReadAct/master/csv/views/view05c_RA_source_fiction.csv"
},
"mark": {
"type": "bar",
"tooltip": true
},
"encoding": {
"x": {
"field": "title",
"type": "ordinal",
"axis": {
"labelAngle": 0
},
"sort": "-y"
},
"y": {
"aggregate": "count",
"field": "act_object",
"type": "quantitative"
}
}
}
}
}
]
}
Loading