Skip to content

Commit

Permalink
Merge pull request #20 from UrbanInstitute/ntee_dev
Browse files Browse the repository at this point in the history
[MOD - Code + Lang]: Edit NTEE Table
  • Loading branch information
lecy authored Jan 19, 2024
2 parents ab871a2 + 1a3f66a commit c8f19c2
Show file tree
Hide file tree
Showing 30 changed files with 4,920 additions and 26 deletions.
32 changes: 16 additions & 16 deletions widgets/ntee_tables/ntee_descriptions.html

Large diffs are not rendered by default.

46 changes: 36 additions & 10 deletions widgets/ntee_tables/ntee_descriptions.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ library( DT )
library( readr )
library( dplyr )
library( kableExtra )
library( reactable )
```

```{r}
Expand Down Expand Up @@ -54,7 +55,7 @@ df$LEV5[ div == "19" ] <- "NS"
df$LEV5[ as.numeric(div2) >= 2 ] <- "RG"
df$LEV5[ div == "" ] <- "LEV2-MG"
df$LEV5[ div == "" ] <- "Major Group"
fix_org_type <- function( div34, d ) {
div <- substr( df$ntee, 2, 3 )
Expand Down Expand Up @@ -117,12 +118,27 @@ df$LEV1[ major.group == "Z" ] <- "UNU"
df <- df[ c("LEV1","ntee","LEV5","description","definition") ]
# Terminology Revisions
df$definition[ df$ntee == "P82" ] <- "Organizations that provide or coordinate a wide variety of programs and services for people with developmental disabilities."
# Rename Variables
df$definition[ df$ntee == "G25" ] <- "Voluntary health organizations active in the prevention or treatment of Down Syndrome, a hereditary condition that results in intellectual disability."
df$definition[ df$ntee == "H25" ] <- "Organizations that conduct research which can be used to improve the prevention, diagnosis and treatment of Down Syndrome, a hereditary condition that results in intellectual disability."
# Wrangle Data
df <-
df %>%
dplyr::rename( "LEV234" = ntee,
dplyr::mutate(LEV1 = as.factor(LEV1),
LEV5 = as.factor(LEV5),
description = stringr::str_replace(
description,
"<.*>",
""
)) %>%
dplyr::rename( "Level 1" = LEV1,
"Levels 2-4" = ntee,
"Level 5" = LEV5,
"Category Name" = description,
"Category Description" = definition )
Expand All @@ -138,8 +154,19 @@ write.csv( df, "nteev2-descriptions.csv", row.names=F )
```{r}
#| echo: false
DT::datatable( df, filter="top", rownames=FALSE,
options = list( pageLength = 5 ) )
DT::datatable( df,
filter="top",
rownames=FALSE,
options = list( pageLength = 10,
autoWidth = TRUE,
columnDefs = list(
list(
width = "80px",
targets = c( 0, 1, 2 )
), list(
width = "150px",
targets = c(3)
))))
```

<br>
Expand All @@ -156,7 +183,6 @@ The NTEE code convention below reflects the new format of NTEE, NTEE Version 2.0

<a href="nteev2-descriptions-tidy-format.csv" download="nteev2-descriptions-tidy-format.csv">Download CSV of NTEE Category Descriptions Tidy Format</a>


The NTEEV2 codes are structured in three parts:

1. Level 1: Industry Group
Expand All @@ -172,7 +198,7 @@ The NTEEV2 codes are structured in three parts:
ind <-
tribble(
~LEV1, ~`Industry Group`,
~`Level 1`, ~`Industry Group`,
"ART", "Arts, Culture, and Humanities",
"EDU", "Education",
"UNI", "Universities",
Expand All @@ -197,7 +223,7 @@ ind %>%

### Level 5 Organization Type Codes:

In the new system, code levels 2-4 (LEV234) are the same as the original NTEE system except organizational type has been changed from a LEV34 code designation (x01-x19) to an independent feature (the LEV5 column).
In the new system, code levels 2-4 are the same as the original NTEE system except organizational type has been changed from a LEV34 code designation (x01-x19) to an independent feature (the LEV5 column).

<br>

Expand All @@ -206,8 +232,8 @@ In the new system, code levels 2-4 (LEV234) are the same as the original NTEE sy
org.type <-
tribble(
~LEV5, ~`Organization Type`,
"LEV2-MG", "LEVEL 2 NTEE MAJOR GROUP DESIGNATION",
~`Level 5`, ~`Organization Type`,
"Major Group", "Level 2 NTEE Major Group Designation",
"RG", "Regular Nonprofit",
"AA", "Alliance/Advocacy Organizations (*formerly 01*)",
"MT", "Management and Technical Assistance (*formerly 02*)",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2014-2017 Denis Pushkarev

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"devDependencies": {
"@babel/cli": "^7.7.7",
"@babel/core": "^7.7.7",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.7.4",
"@babel/plugin-proposal-optional-catch-binding": "^7.7.4",
"@babel/plugin-proposal-optional-chaining": "^7.7.5",
"@babel/plugin-transform-arrow-functions": "^7.7.4",
"@babel/plugin-transform-block-scoped-functions": "^7.7.4",
"@babel/plugin-transform-block-scoping": "^7.7.4",
"@babel/plugin-transform-classes": "^7.7.4",
"@babel/plugin-transform-computed-properties": "^7.7.4",
"@babel/plugin-transform-destructuring": "^7.7.4",
"@babel/plugin-transform-exponentiation-operator": "^7.7.4",
"@babel/plugin-transform-literals": "^7.7.4",
"@babel/plugin-transform-member-expression-literals": "^7.7.4",
"@babel/plugin-transform-parameters": "^7.7.7",
"@babel/plugin-transform-property-literals": "^7.7.4",
"@babel/plugin-transform-shorthand-properties": "^7.7.4",
"@babel/plugin-transform-spread": "^7.7.4",
"@babel/plugin-transform-template-literals": "^7.7.4",
"babel-loader": "^8.0.6",
"babel-plugin-transform-es2015-modules-simple-commonjs": "~0.3.0",
"babel-plugin-transform-for-of-as-array": "^1.1.1",
"es-observable": "git+https://github.com/tc39/proposal-observable.git#bf4d87144b6189e793593868e3c022eb51a7d292",
"eslint": "^6.8.0",
"eslint-import-resolver-webpack": "^0.12.0",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-node": "^10.0.0",
"eslint-plugin-optimize-regex": "^1.1.7",
"eslint-plugin-qunit": "^4.0.0",
"eslint-plugin-sonarjs": "^0.5.0",
"eslint-plugin-unicorn": "^15.0.0",
"grunt": "^1.0.4",
"grunt-cli": "^1.3.2",
"grunt-contrib-clean": "^2.0.0",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-uglify": "^4.0.1",
"grunt-karma": "^3.0.2",
"grunt-webpack": "^3.1.3",
"karma": "^4.4.1",
"karma-chrome-launcher": "^3.1.0",
"karma-phantomjs-launcher": "~1.0.4",
"karma-qunit": "^4.0.0",
"lerna": "^3.19.0",
"moon-unit": "^0.2.2",
"phantomjs-prebuilt": "~2.1.16",
"promises-aplus-tests": "^2.1.2",
"puppeteer": "~2.0.0",
"qunit": "~2.9.3",
"webpack": "^4.41.4"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/zloirock/core-js.git"
},
"scripts": {
"bootstrap": "lerna bootstrap --no-ci",
"build": "grunt clean copy && npm run bootstrap && npm run build-compat && grunt bundle uglify",
"build-compat": "npm run build-compat-data && npm run build-compat-entries && npm run build-compat-modules-by-versions",
"build-compat-data": "node packages/core-js-compat/src/build-data",
"build-compat-entries": "node packages/core-js-compat/src/build-entries",
"build-compat-modules-by-versions": "node packages/core-js-compat/src/build-modules-by-versions",
"lint": "grunt clean copy && npm run bootstrap && npm run build-compat && eslint ./",
"unit-tests": "grunt clean copy && npm run bootstrap && npm run build-compat && grunt bundle webpack:helpers webpack:tests karma:tests",
"unit-tests-pure": "grunt clean copy && npm run build-compat && grunt webpack:helpers webpack:pure karma:pure",
"bundle-promises-tests": "grunt webpack:promises-aplus-tests",
"promises-tests": "promises-aplus-tests tests/promises-aplus/adapter --timeout 1000",
"observables-tests": "babel node_modules/es-observable/test/ -d tests/bundles/observables-tests/ && node tests/observables/adapter && node tests/observables/adapter-pure",
"commonjs-tests": "node tests/commonjs",
"commonjs-entries-content": "node tests/commonjs-entries-content",
"targets-parser-tests": "node tests/targets-parser",
"test": "grunt clean copy && npm run bootstrap && npm run build-compat && eslint ./ && grunt webpack:helpers webpack:tests bundle uglify karma:tests webpack:helpers webpack:pure karma:pure && npm run promises-tests && npm run observables-tests && npm run commonjs-tests && npm run commonjs-entries-content && npm run targets-parser-tests"
},
"engines": {
"node": ">=8.9.0"
}
}

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c8f19c2

Please sign in to comment.