File size: 2,042 Bytes
42078dd
f950742
 
42078dd
 
f950742
 
 
 
a7dfb64
f950742
 
 
 
 
 
02e9842
f950742
 
 
42078dd
02e9842
 
 
 
 
 
 
 
 
 
721e636
 
 
 
 
 
 
 
02e9842
 
721e636
02e9842
 
 
 
 
 
 
 
721e636
02e9842
19e81c5
 
02e9842
 
 
 
 
721e636
02e9842
19e81c5
 
02e9842
 
 
 
 
721e636
02e9842
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import pandas as pd
import streamlit as st

import codebook as cb

source_url = "https://results2021.ref.ac.uk/"

page_title = "REF 2021 Data Explorer"
st.set_page_config(page_title=page_title,
                   layout="centered",
                   initial_sidebar_state="expanded",
                   )

st.title(page_title)

# page content
# ------------
st.markdown("## Data source")
st.markdown(f"The data used in this app is from the [REF 2021 website]({source_url})"
            ", accessed 2023/08/10.")

st.markdown("## About the REF 2021 process")

st.markdown("Submissions consisted of")
st.markdown("- outputs (e.g. journal articles, books, datasets, etc.)")
st.markdown("- impact case studies")
st.markdown("- research groups information")
st.markdown("- research income information")
st.markdown("- research environment statements for each institution and unit")
st.markdown("- doctoral degrees awarded")

columns = [cb.COL_PANEL_NAME,
           cb.COL_UOA_NAME,
           cb.COL_OUTPUT_TYPE_NAME,
           cb.COL_OPEN_ACCESS
           ]

tabs = st.tabs(columns)

# MAIN PANELS
# ------------
with tabs[0]:
    dset_to_print = pd.DataFrame.from_dict(cb.PANEL_NAMES,
                                           orient="index",
                                           columns=["Main Panel"])
    dset_to_print.index.name = "Code"
    st.dataframe(dset_to_print)

# UOAs
# ----
with tabs[1]:
    dset_to_print = pd.DataFrame.from_dict(cb.UOA_NAMES,
                                           orient="index",
                                           columns=["UOA"])
    dset_to_print.index.name = "Code"
    st.dataframe(dset_to_print)

# OUTPUT TYPES
# ------------
with tabs[2]:
    dset_to_print = pd.DataFrame.from_dict(cb.OUTPUT_TYPE_NAMES,
                                           orient="index",
                                           columns=["Output type"])
    dset_to_print.index.name = "Code"
    st.dataframe(dset_to_print)

# OPEN ACCESS
# -----------
with tabs[3]:
    st.write(cb.OPEN_ACCESS_NAMES)