Research Guide HTML FUNCTIONS




library( htmltools )
library( dplyr )
<div class="parent">
  <div class="div1"><h4>VarName_01_X</h4></div>
  
  <div class="div2">
    Ipsum is simply dummy text of the printing and typesetting industry. 
  </div>
  
  <div class="div3">
    <table>
  <tr>
<td>DATA TYPE</td>
<td>numeric</td>
  </tr>
  <tr>
<td>SCOPE</td>
<td>PZ</td>
  </tr>
  <tr>
<td>LENGTH</td>
<td>6</td>
  </tr>
</table>
  </div>
  
  <div class="div4">
    DEFINITION: Lorem Ipsum is simply dummy text of the printing and typesetting 
    industry. Lorem Ipsum has been the industry's standard dummy text ever since 
    the 1500s, when an unknown printer took a galley of type and scrambled it to 
    make a type specimen book.
  </div>

</div>

VarName_01_X

Ipsum is simply dummy text of the printing and typesetting industry.

DATA TYPE numeric
SCOPE PZ
LENGTH 6

DEFINITION: Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.

vname    <- "F9_00_ALL_AFFIL_INCL_X"        
vlabel  <- "All subordinates included"   
vtype    <- "checkbox"                   
vscope   <- "HD"                          
vdesc    <- "Indicates this form includes all subordinate organizations"


v.layout <- 
  tagList(
    
    div( class="parent",
         
    div( class="div1", h4( vname ) ),
    div( class="div2", p( vlabel)  ), 
    
    div( class="div3", withTags(

      table(
              tr(
                  td( "DATA TYPE"  ),
                  td( vtype  )
                ),

              tr(
                  td( "SCOPE"  ),
                  td( vscope  )
                )
           )

    ) ),
  
    div( class="div4", p( paste0( "DESCRIPTION: ", vdesc ) )  ) 
  ) )

print( v.layout )
<div class="parent">
  <div class="div1">
    <h4>F9_00_ALL_AFFIL_INCL_X</h4>
  </div>
  <div class="div2">
    <p>All subordinates included</p>
  </div>
  <div class="div3">
    <table>
      <tr>
        <td>DATA TYPE</td>
        <td>checkbox</td>
      </tr>
      <tr>
        <td>SCOPE</td>
        <td>HD</td>
      </tr>
    </table>
  </div>
  <div class="div4">
    <p>DESCRIPTION: Indicates this form includes all subordinate organizations</p>
  </div>
</div>
v.layout

F9_00_ALL_AFFIL_INCL_X

All subordinates included

DATA TYPE checkbox
SCOPE HD

DESCRIPTION: Indicates this form includes all subordinate organizations

containerize_v <- function( vname, vlabel, vtype, vscope, vdesc )
{
  v <- 
  tagList(
    
    div( class="parent",
         
      div( class="div1", h4( vname ) ),
      div( class="div2", p( vlabel )  ), 
      
      div( class="div3", withTags(
  
        table(
                tr(
                    td( "DATA TYPE"  ),
                    td( vtype  )
                  ),
  
                tr(
                    td( "SCOPE"  ),
                    td( vscope  )
                  )
             )
  
      ) ),
    
      div( class="div4", p( paste0( "DESCRIPTION: ", vdesc ) )  )
    
    ),
    
    withTags(  HTML("<br><hr><br>"), p('\n')  )
   
  )
  
  return(v)
} 


containerize_v( vname, vlabel, vtype, vscope, vdesc )

F9_00_ALL_AFFIL_INCL_X

All subordinates included

DATA TYPE checkbox
SCOPE HD

DESCRIPTION: Indicates this form includes all subordinate organizations




dat <- read.csv( "concordance-v98.csv" )
names( dat ) <- toupper( names( dat ) )

# remove special characters that will 
# wreck table formatting like ($) 
dat$DESCRIPTION <- gsub( "\\(\\$\\)[ ]{0,1}", "", dat$DESCRIPTION )
dat$LABEL <- gsub( "\\(\\$\\)[ ]{0,1}", "", dat$LABEL )

d <- dplyr::sample_n( dat, 25 )
rlist <- list()

for( i in 1:25 )
{
  namev   <- d$VARIABLE_NAME[i] 
  labelv  <- d$LABEL[i] 
  dts     <- d$DATA_TYPE_SIMPLE[i] 
  scopev  <- d$VARIABLE_SCOPE[i] 
  descr   <- d$DESCRIPTION[i] 
  
  var.info <- 
  containerize_v( vname=namev, 
                  vlabel=labelv, 
                  vtype=dts, 
                  vscope=scopev, 
                  vdesc=descr ) 

  rlist[[i]] <- var.info

}

renderTags( rlist )$html

SA_02_PUB_TAXREV_LEVIED_CY_M3

Tax revenues levied for organization benefit during the current tax year minus three years

DATA TYPE numeric
SCOPE PZ

DESCRIPTION: Current tax year minus three years




F9_09_EXP_OTH_EMPL_BEN_TOT

Other employee benefits - total expenses

DATA TYPE numeric
SCOPE PC

DESCRIPTION: Other Employee Benefits - Total




SG_03_GAMING_EXP_RENT_OTH

Rent/facility costs from other gaming

DATA TYPE numeric
SCOPE PZ

DESCRIPTION: Rent or facility costs; other gaming




SH_05_HOSPITAL_CHILDREN_X

Children's hospital [x]

DATA TYPE checkbox
SCOPE PC

DESCRIPTION: Children's hospital




F9_08_REV_MISC_OTH_TOT

Other miscellaneous revenue - total

DATA TYPE numeric
SCOPE PC

DESCRIPTION: Misc. Revenue Total Revenue (Col A)




SH_02_ADVOCACY_EXP_TOT_COM_BLDG

Community health improvement advocacy - percent of total expense

DATA TYPE numeric
SCOPE PC

DESCRIPTION: Total community building expense




SM_01_BOOK_PUBLICA_NONCSH_CONTR

Books and publications - noncash contribution amounts

DATA TYPE numeric
SCOPE PC

DESCRIPTION: Revenues reported on F990; Pt VIII; line 1g




SA_02_PUB_GIFT_GRANT_CONTR_CY_M3

Gifts, grants, contributions, and membership fees received during the current tax year minus three years

DATA TYPE numeric
SCOPE PZ

DESCRIPTION: Current tax year minus three years




SR_05_TRANSAC_PURCHASE_ASSET_X

Engaged in purchase of assets from related organization(s) [x]

DATA TYPE checkbox
SCOPE PC

DESCRIPTION: Purchase of assets from other organization?




SI_02_GRANT_US_ORG_ADDR_CNTR

Grantee country

DATA TYPE text
SCOPE PC

DESCRIPTION: Foreign Address - Country




SK_01_BOND_ISSUE_DEFEASED_X

Defeased [x]

DATA TYPE checkbox
SCOPE PC

DESCRIPTION: Form990 Schedule KPart I - Defeased?




F9_04_FRGN_OFFICE_X

Maintained a foreign office [x]

DATA TYPE checkbox
SCOPE PZ

DESCRIPTION: Foreign office?




SI_03_GRANT_US_INDIV_TYPE_GRANT

Type of grant or assistance

DATA TYPE text
SCOPE PC

DESCRIPTION: Type of grant or assistance




F9_00_PRIN_OFF_ADDR_L2

Principal officer street address line 2

DATA TYPE text
SCOPE HD

DESCRIPTION: Address of Principal Officer (US Line 2)




SG_03_GRK_ADDR_ZIP

Preparer of gaming/special events books and records - zip

DATA TYPE text
SCOPE PZ

DESCRIPTION: Address Of Gaming Rec Keeper US - ZIPCode




SL_03_GRANT_INT_NAME_ORG_L1

Interested organization name line 1

DATA TYPE text
SCOPE PZ

DESCRIPTION: Business Name - BusinessNameLine1




F9_01_EXP_REV_LESS_EXP_PY

Revenue less expenses - prior year

DATA TYPE numeric
SCOPE PC

DESCRIPTION: Revenues less expenses - prior year




SN_02_DOA_RECIP_NAME_PERS

Recipient person name

DATA TYPE text
SCOPE PZ

DESCRIPTION: Disposition Table - Name - Person




SC_01_ORG_TOT_EXEMPT_FUNC_EXP

Total exempt function expenditures

DATA TYPE numeric
SCOPE PZ

DESCRIPTION: Total of direct and indirect exempt function expenditures. Add lines 1 and 2




SA_02_TOT_INCOME_GRO_CY_M2

Gross investment income during the current tax year minus two years

DATA TYPE numeric
SCOPE PZ

DESCRIPTION: Current tax year minus two years




SF_99_FRGN_ORG_GRANT_LT_5K_X

No one recipient received more than $5,000 [x]

DATA TYPE checkbox
SCOPE PC

DESCRIPTION: Checked if no one recipient organization outside the US received more than $5;000 (see SF-FORM-VERSION-2011-PART-02)




F9_10_ASSET_OTH_EOY

Other assets - end of year

DATA TYPE numeric
SCOPE PZ

DESCRIPTION: Other assets, end of year




SF_01_FRGN_REG_NUM_EMPL_CONTIN

Total from continuation sheets to Part 1 number of employees, agents, and independent contractors

DATA TYPE numeric
SCOPE PC

DESCRIPTION: Total number of employees from continuation sheets working on region activities outside the US (Part I)




F9_08_REV_CONTR_OTH

All other contributions, gifts, grants, and similar amounts not included above

DATA TYPE numeric
SCOPE PC

DESCRIPTION: All other contributions; gifts; grants; and similar amounts not included in above




SF_03_FRGN_INDIV_GRANT_REGION

Region

DATA TYPE text
SCOPE PC

DESCRIPTION: Region of the grant to the individuals outside the US