diff --git a/.github/workflows/update_catalog.yml b/.github/workflows/update_catalog.yml index f53f991e..bfa37eb6 100644 --- a/.github/workflows/update_catalog.yml +++ b/.github/workflows/update_catalog.yml @@ -1,7 +1,7 @@ name: Update PSL catalog on: schedule: - - cron: '0 1 * * *' + - cron: "0 1 * * *" push: branches: - master @@ -10,32 +10,33 @@ jobs: build_catalog: runs-on: ubuntu-latest steps: - - name: Checkout repo - uses: actions/checkout@v2 + - name: Checkout repo + uses: actions/checkout@v2 - - name: Setup Miniconda - uses: conda-incubator/setup-miniconda@v2.0.1 - with: - activate-environment: catalog-env - environment-file: environment.yml - python-version: 3.8 - auto-activate-base: false + - name: Setup Miniconda + uses: conda-incubator/setup-miniconda@v2.0.1 + with: + activate-environment: catalog-env + environment-file: environment.yml + python-version: 3.8 + auto-activate-base: false - - name: Run python script - working-directory: ./Tools/Catalog-Builder/ - shell: bash -l {0} - run: | - pip install -e . - cd catalog_builder - python catalog.py + - name: Run python script + working-directory: ./Tools/Catalog-Builder/ + shell: bash -l {0} + run: | + pip install -e . + cd catalog_builder + python catalog.py + python catalog.py --incubating - - name: Commit new changes - working-directory: ./ - shell: bash -l {0} - run: | - git config user.name github-actions - git config user.email github-actions@github.com + - name: Commit new changes + working-directory: ./ + shell: bash -l {0} + run: | + git config user.name github-actions + git config user.email github-actions@github.com - git add -A - git commit --allow-empty -m "Update PSL-catalog on $(date +'%Y-%m-%d')" - git push \ No newline at end of file + git add -A + git commit --allow-empty -m "Update PSL-catalog on $(date +'%Y-%m-%d')" + git push diff --git a/.github/workflows/update_community_docs.yml b/.github/workflows/update_community_docs.yml index 107e7310..cae1359c 100644 --- a/.github/workflows/update_community_docs.yml +++ b/.github/workflows/update_community_docs.yml @@ -4,37 +4,38 @@ on: branches: - master paths: - - 'Community/**.md' - - 'Catalog/**.md' + - "Community/**.md" + - "Catalog/**.md" jobs: build_community_pages: runs-on: ubuntu-latest steps: - - name: Checkout repo - uses: actions/checkout@v2 + - name: Checkout repo + uses: actions/checkout@v2 - - name: Setup Miniconda - uses: conda-incubator/setup-miniconda@v2.0.1 - with: - activate-environment: catalog-env - environment-file: environment.yml - python-version: 3.8 - auto-activate-base: false + - name: Setup Miniconda + uses: conda-incubator/setup-miniconda@v2.0.1 + with: + activate-environment: catalog-env + environment-file: environment.yml + python-version: 3.8 + auto-activate-base: false - - name: Run shell script - working-directory: ./Tools/Page-Builder/ - shell: bash -l {0} - run: | - sh make_pages.sh + - name: Run shell script + working-directory: ./Tools/Page-Builder/ + shell: bash -l {0} + run: | + pip install -r requirements.txt + sh make_pages.sh - - name: Commit new changes - working-directory: ./ - shell: bash -l {0} - run: | - git config user.name github-actions - git config user.email github-actions@github.com + - name: Commit new changes + working-directory: ./ + shell: bash -l {0} + run: | + git config user.name github-actions + git config user.email github-actions@github.com - git add -A - git commit --allow-empty -m "Update PSL community pages on $(date +'%Y-%m-%d')" - git push \ No newline at end of file + git add -A + git commit --allow-empty -m "Update PSL community pages on $(date +'%Y-%m-%d')" + git push diff --git a/.gitignore b/.gitignore index ee247cf5..d3682275 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ __pycache__/ .pytest_cache/ htmlcov/ .coverage +.coverage.* # Sphinx documentation read-the-docs/_build/ @@ -13,4 +14,48 @@ read-the-docs/_build/ # Mac OS X *.DS_Store -*.egg-info/ \ No newline at end of file +# Egg-info directories +*.egg-info/ +*.egg + +# Jekyll build output +/_site/ +/.jekyll-cache/ + +# Python virtual environments +/venv/ + +# Node modules +/node_modules/ + +# IDE and editor directories +/.idea/ +/.vscode/ +*.sublime-workspace +*.sublime-project + +# Operating system files +Thumbs.db + +# Python +*.pyc + +# Jupyter Notebook +.ipynb_checkpoints + +# Environment variables and configuration files +.env +config/settings.yml + +# Backup files +*.bak +*.tmp +*.swp + +# Logs +logs/ +*.log + +# Others +*.sqlite3 +*.sqlitedb \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 092022fa..020f517e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,4 +19,4 @@ install: # command to run tests script: -- cd catalog_builder && pytest tests/ -v \ No newline at end of file + - cd catalog_builder && pytest tests/ -v diff --git a/CSS/catalog.css b/CSS/catalog.css index dd4a9923..cf7f275d 100644 --- a/CSS/catalog.css +++ b/CSS/catalog.css @@ -1,24 +1,399 @@ -/* CSS for the non-model pages */ +:root { + --primary-box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); + --hover-box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); + --primary-button-color: rgb(12, 84, 124); + --hover-button-color: rgb(8, 56, 81); + --font-family: "Roboto", sans-serif; + --link-color: gray; + --link-hover-color: black; + --separator-color: #3498db; + --background-color: #f9f9f9; + --text-color: #333; + --footer-text-color: #fff; + --separator-height: 2px; + --button-text-color: white; + --border-color: #555; + --banner-background: url("../imgs/blurry-gradient-haikei.svg"); + --icon-opacity: 0.7; + --icon-hover-opacity: 0.8; +} +*, +*:before, +*:after { + box-sizing: border-box; +} +html { + height: 100%; + font-size: 16px; +} +p { + font-size: 1.05rem; +} +body { + display: flex; + flex-direction: column; + min-height: 100%; + margin: 0; + font-family: var(--font-family); + background-color: var(--background-color); + overflow-x: hidden; +} #content a { - color: black; - text-decoration: underline; + color: var(--link-hover-color); + text-decoration: underline; } code { - color: inherit; - background-color: rgba(27,31,35,0.05); + color: inherit; + background-color: rgba(27, 31, 35, 0.05); +} +.fa { + padding: 30px; + font-size: 25px; + width: 40px; + text-align: center; + text-decoration: none; + opacity: var(--icon-opacity); +} +.fa-twitter { + color: #55acee; +} +.fa-linkedin { + color: #5d6d7e; +} +.fa-github { + color: var(--text-color); +} +.fa-youtube { + color: #d98880; +} +.navbar { + background-color: var(--primary-button-color); + border-bottom: none; + box-shadow: 0px 1px 0px #c7c8c9; + color: var(--button-text-color); + display: flex; + align-items: center; + justify-content: space-between; +} +.navbar-dark .navbar-nav .nav-link, +.navbar-dark .navbar-text { + color: var(--button-text-color); +} +.navbar-dark .navbar-nav .nav-link:hover, +.navbar-dark .navbar-nav .nav-link:focus { + text-decoration: underline; + color: rgba(255, 255, 255, 0.8); + text-decoration: none; +} +.logo-container { + background-color: var(--button-text-color); + padding: 3px 6px; + border-radius: 8px; + box-shadow: var(--primary-box-shadow); + transition: all 0.3s ease; +} +.logo-container:hover { + box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2); +} +.navbar-brand { + display: flex; + align-items: center; +} +.navbar-brand img { + display: block; + max-width: auto; + max-height: 50px; +} +.row { + display: flex; + align-items: center; +} +.row.border-top { + border-color: var(--border-color); +} +.banner { + display: flex; + align-items: center; + justify-content: center; + padding: 1vw 12vw; + background: center / cover var(--banner-background); +} +.banner-content { + display: flex; + align-items: center; + justify-content: flex-start; + gap: 2vw; + width: 90%; + margin: 0 auto; +} +.banner-text { + text-align: left; + flex: 1; + padding: 0; + margin: 0; +} +.banner-image img { + width: 100%; + max-width: 250px; + height: auto; + margin-top: 10px; } -.navbar{ - background-color: white; - border-bottom: solid thin gray; - box-shadow: 0px 1px 0px #c7c8c9; +.banner h1, .banner h5 { + margin: 0; + padding-left: 0; + text-align: left; } -#page{ - background-color: #f9f9f9; +.banner h1 { + font-size: 70px; + margin-bottom: 10px; + margin-left: -3px; +} +.banner h5 { + font-size: 20px; + margin-top: 10px; +} +.text-box { + width: 75%; + margin: 25px auto; + background-color: var(--button-text-color); + box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1); + border-radius: 10px; + overflow: hidden; + flex-grow: 1; +} +.text-box p, +.text-box h1, +.text-box h2 { + margin: 5px 0; +} +.box-header { + height: 30px; + background-color: rgba(9, 81, 126, 1); +} +.box-content { + padding: 10px 20px; + font-size: 1.05rem; +} +.button-container, +.footer-buttons { + display: flex; + justify-content: center; + flex-wrap: wrap; + gap: 15px; + margin: 20px 0; +} +.button { + padding: 10px 30px; + font-size: 16px; + font-weight: bold; + text-transform: uppercase; + text-decoration: none; + border-radius: 20px; + color: var(--button-text-color); + transition: all 0.3s ease; + transform: scale(1); + box-shadow: var(--primary-box-shadow); + background-color: var(--primary-button-color); +} +.button:hover, +.button:focus { + transform: scale(1.05); + box-shadow: var(--hover-box-shadow); + color: var(--button-text-color); +} +.footer-buttons .button:first-child { + background-color: var(--link-color); +} +.models-section, +.maintainers-section { + text-align: center; + padding-bottom: 20px; +} +.models-section h2, +.maintainers-section h2 { + text-align: left; + padding-left: 12.5%; +} +.model-container, +.maintainer-container { + width: 75%; + margin: 0 auto; +} +.models-grid, +.maintainers-grid { + display: grid; + gap: 1rem; + grid-template-columns: repeat(4, 1fr); +} +.model-card, +.maintainer-card { + display: flex; + flex-direction: column; + align-items: center; + padding-top: 25px; + color: inherit; + text-decoration: none; + border-radius: 10px; + box-shadow: var(--primary-box-shadow); + position: relative; + overflow: hidden; + transition: transform 0.2s ease; +} +.model-card::before, +.maintainer-card::before { + content: ""; + position: absolute; + top: 0; + left: 0; + right: 0; + height: 10px; + background-color: rgba(9, 81, 126, 255); + border-radius: 10px 10px 0 0; +} +.model-card:hover, +.maintainer-card:hover, +.model-card:focus, +.maintainer-card:focus { + transform: translateY(-10px); + text-decoration: none; + box-shadow: var(--hover-box-shadow); +} +.maintainer-image-btn { + display: block; + width: 100px; + height: 100px; + padding: 0; + margin: 0 auto 10px; + border: var(--separator-height) solid var(--separator-color); + background: transparent; + border-radius: 50%; + cursor: pointer; +} +.maintainer-image-btn img { + width: 100%; + display: block; + border-radius: 50%; + transition: opacity 0.2s ease; +} +.maintainer-image-btn:hover img { + opacity: var(--icon-hover-opacity); +} +.maintainer-card.non-clickable { + cursor: default; + text-decoration: none; + color: inherit; } @media (max-width: 900px) { - .navbar-text{ - display: none; - } + .navbar-text { + display: none; + } +} +@media (max-width: 768px) { + .banner { + padding: 2vw; + } + .banner-content { + flex-direction: row; + align-items: center; + justify-content: space-between; + } + .banner-text { + width: 60%; + padding-right: 10px; + } + .banner-image { + width: 35%; + } + .banner-image img { + margin-top: 0; + display: flex; + width: auto; + } + .banner h1 { + font-size: 50px; + } + .banner h5 { + font-size: 18px; + } + .text-box { + width: 95%; + margin: 30px auto; + } + .model-container, + .maintainer-container { + width: 95%; + margin: 30px auto; + } + .custom-section .box-content { + padding: 10px 15px; + } + .models-grid, + .maintainers-grid { + grid-template-columns: repeat(2, 1fr); + } + .slick-slider .carousel-item { + height: auto; + width: auto; + padding: 10px; + } + .slick-slider .carousel-item h3, + .slick-slider .carousel-item h4, + .slick-slider .carousel-item p { + font-size: smaller; + margin: 5px 0; + } + .slick-slider .carousel-item .pr-link-button { + padding: 8px 12px; + font-size: 12px; + } + .slick-slider .carousel-item img { + width: 100%; + max-width: 250px; + height: 75px; + display: block; + margin: 0 auto; + } +} +@media (max-width: 480px) { + .slick-slider .carousel-item { + flex-direction: column; + align-items: flex-start; + } + .slick-slider .carousel-item .repo-logo { + margin-bottom: 10px; + } + .slick-slider .carousel-item .text-content { + width: 100%; + } + .models-grid, + .maintainers-grid { + grid-template-columns: 1fr; + } +} +.footer .fa:hover, +.footer .fa:focus { + background-color: var(--hover-bg-color); +} +.footer { + background-color: var(--primary-bg-color); +} +.footer-text a:hover, +.footer-text a:focus { + text-decoration: underline; +} +.footer .fa { + margin: 0 15px; + padding: 10px; + border-radius: 50%; + background-color: rgba(174, 163, 163, 0.2); + transition: background-color 0.3s ease; +} +.footer .fa:hover { + background-color: rgba(255, 255, 255, 0.3); +} +.footer .text-center { + padding-top: 10px; + padding-bottom: 10px; } .fa { padding: 30px; @@ -26,26 +401,336 @@ code { width: 40px; text-align: center; text-decoration: none; - /*border-radius: 50%;*/ + opacity: var(--icon-opacity); } - -.fa:hover { - opacity: 0.7; - text-decoration: none; +.fa:hover, +.footer .fa:hover { + background-color: rgba(255, 255, 255, 0.3); } - .fa-twitter { - color: #55ACEE; + color: #55acee; } - .fa-linkedin { - color: #5D6D7E; + color: #5d6d7e; } - .fa-github { - color: #333; + color: var(--text-color); } - .fa-youtube { - color: #D98880; + color: #d98880; +} +.footer { + background-color: var(--text-color); + color: var(--footer-text-color); + padding: 0; + margin: 0; + border: none; + height: auto; +} +.footer-banner { + background-color: rgb(188, 229, 243); + padding: 0; + margin: 0; + text-align: center; + width: 100%; + border: none; +} +.footer-image img { + max-width: 240px; + height: auto; + margin: 0 auto; + padding-top: 5px; +} +.footer-buttons { + padding-bottom: 1px; + gap: 15px; +} +.footer-text { + margin-bottom: 20px; +} +.footer-text h5 { + color: #34495e; + margin-top: 20px; +} +.footer-text a { + text-decoration: none; + color: #2e4053; + margin-left: 5px; +} +.footer-banner + .footer { + margin-top: 0; +} +.footer-banner, +.footer { + overflow: auto; +} +.footer { + overflow-x: hidden; +} +.footer-buttons { + display: flex; + justify-content: center; + gap: 20px; +} +.footer-buttons .button { + width: 250px; + display: inline-flex; + justify-content: center; + align-items: center; +} +.custom-section { + display: flex; + justify-content: space-between; + margin: 2em 0; +} +.custom-section .box { + flex: 1; + background-color: var(--button-text-color); + box-shadow: var(--primary-box-shadow); + padding: 20px; + margin: 0 10px; + text-align: center; + border-radius: 5px; + transition: + transform 0.2s ease, + box-shadow 0.2s ease; +} +.custom-section .box:hover, +.custom-section .box:focus-within { + transform: translateY(-10px); + box-shadow: var(--hover-box-shadow); +} +.custom-section .box h3 { + margin-top: 10px; +} +.custom-section .box p { + margin-top: 10px; + color: #777; +} +.custom-section .box i { + font-size: 2em; + color: var(--primary-button-color); +} +@media (min-width: 768px) { + .custom-section { + margin: 2em 5%; + } +} +@media (max-width: 767px) { + .custom-section { + flex-direction: column; + } + .custom-section .box { + margin: 10px 0; + } +} +@media (min-width: 768px) { + .custom-section { + width: 75%; + margin: 25px auto; + } + .custom-section .box { + margin: 0 1%; + } +} +@media (max-width: 767px) { + .custom-section { + width: 95%; + margin: 30px auto; + flex-direction: column; + } + .custom-section .box { + margin: 10px auto; + } +} +.custom-section .box { + border-top: none; +} +.custom-section .box i { + color: var(--separator-color); +} +.models-section { + display: flex; + flex-wrap: wrap; + justify-content: center; +} +.models-section .card { + width: 23%; + margin: 1%; +} +@media (min-width: 992px) { + .models-grid { + display: flex; + flex-wrap: wrap; + justify-content: center; + } + .model-card { + flex: 0 0 calc(25% - 4%); + margin: 1%; + } +} +.model-card img { + width: 100px; + border-radius: 5px; +} +.model-card .maintainer-image-btn { + border-radius: 5px; + background-color: transparent; + border: var(--separator-height) solid var(--separator-color); +} +.model-card .maintainer-image-btn { + display: flex; + align-items: center; + justify-content: center; + padding: 0; +} +.model-card img { + width: 100%; + height: 100%; + object-fit: cover; +} +.col-sm.text-center { + display: flex; + justify-content: center; + flex-wrap: nowrap; +} +.col-sm.text-center a.fa:hover { + text-decoration: none; + background-color: #f5f5f5; + color: var(--link-hover-color); +} +.carousel-container { + margin: 2em auto; + width: 100%; + max-width: 75%; +} +.slick-slider .carousel-item { + margin: 5px 10px; + padding: 25px; + width: auto; + height: 200px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + display: flex; + justify-content: space-between; + background-color: var(--button-text-color); + box-shadow: var(--primary-box-shadow); + border-radius: 5px; + align-items: center; + text-align: left; +} +.slick-slider .carousel-item .repo-logo { + max-width: 80px; + height: auto; + margin-right: 20px; +} +.slick-slider .carousel-item .text-content { + flex-grow: 1; +} +.slick-slider .carousel-item .repo-title { + font-size: 18px; + margin-bottom: 12px; +} +.slick-slider .carousel-item .pr-title { + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; + text-overflow: ellipsis; + white-space: normal; + font-size: 15px; + margin-bottom: 5px; +} +.slick-slider .carousel-item .pr-time { + font-size: 14px; + color: #666; + margin-bottom: 10px; +} +.slick-slider .carousel-item .pr-link-button { + display: block; + text-align: center; + padding: 10px 15px; + background-color: var(--primary-button-color); + color: var(--button-text-color); + text-decoration: none; + border-radius: 5px; + transition: background-color 0.2s; + box-shadow: var(--primary-box-shadow); + margin-top: auto; +} +.slick-slider .carousel-item .pr-link-button:hover { + background-color: var(--hover-button-color); + box-shadow: var(--hover-box-shadow); +} +.user-grid-container { + display: flex; + flex-wrap: wrap; + column-gap: 25px; + row-gap: 25px; + justify-content: center; +} +.user-grid-item { + display: flex; + flex-direction: column; + vertical-align: bottom; + max-width: 250px; +} +.user-grid-item img { + height: 75px; + width: auto; + max-width: 250px; + vertical-align: bottom; +} +.user-grid-item p { + text-align: center; + word-wrap: break-word; + hyphens: auto; +} +.user-grid-item a { + color: var(--link-color); + text-decoration: none; +} +.user-grid-item a:hover, +.user-grid-item a:focus { + text-decoration: underline; +} +.separator { + border: 0; + height: var(--separator-height); + background-color: var(--separator-color); + margin: 10px 250px; +} +#userCarousel .carousel-item img { + max-width: 300px; + height: 75px; + margin: 0 auto; +} +#userCarousel .carousel-item { + justify-content: center; + padding: 15px; + height: auto; + text-align: center; + width: auto; +} +#userCarousel .carousel-item a { + color: var(--link-color); + text-decoration: none; +} +#userCarousel .carousel-item a:hover { + text-decoration: underline; +} +#userCarousel .carousel-item p { + margin-bottom: 5px; +} +table { + border-collapse: collapse; + width: 100%; +} +table, th, td { + border: 1px solid var(--link-hover-color); +} +th, td { + padding: 8px; + text-align: left; } \ No newline at end of file diff --git a/CSS/page.css b/CSS/page.css index 4053f50a..cf7f275d 100644 --- a/CSS/page.css +++ b/CSS/page.css @@ -1,160 +1,399 @@ -/* CSS for the non-model pages */ -a,p { - font-family: "Helvetica"; +:root { + --primary-box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); + --hover-box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); + --primary-button-color: rgb(12, 84, 124); + --hover-button-color: rgb(8, 56, 81); + --font-family: "Roboto", sans-serif; + --link-color: gray; + --link-hover-color: black; + --separator-color: #3498db; + --background-color: #f9f9f9; + --text-color: #333; + --footer-text-color: #fff; + --separator-height: 2px; + --button-text-color: white; + --border-color: #555; + --banner-background: url("../imgs/blurry-gradient-haikei.svg"); + --icon-opacity: 0.7; + --icon-hover-opacity: 0.8; } - -#content a { - color: black; - text-decoration: underline; +*, +*:before, +*:after { + box-sizing: border-box; +} +html { + height: 100%; + font-size: 16px; +} +p { + font-size: 1.05rem; } -#page{ - background-color: #f9f9f9; +body { + display: flex; + flex-direction: column; + min-height: 100%; + margin: 0; + font-family: var(--font-family); + background-color: var(--background-color); + overflow-x: hidden; +} +#content a { + color: var(--link-hover-color); + text-decoration: underline; } code { - color: inherit; - background-color: rgba(27,31,35,0.05); -} -@media(min-width: 900px){ - .sidenav{ - width: 20%; - padding-right: 2%; - padding-left: 2%; - float: right; - background-color: #e4e9ec; - border-left: solid thin gray; - border-bottom: solid thin gray; - } - .news-marg{ - margin-left: 18%; - position: absolute; - margin-top:-20px; - } - .twitter-card{ - display: none; - } - .home-row{ - margin-right:15%; - } - .home-container{ - margin-right:23%; - width: 73%; - max-width: 2000px; - } - .email-form{ - width: 405px !important; - margin-left: 10px; - } - .event-col{ - padding-left: 50px; - margin-bottom: -50px; - border-right-style: solid; - border-right-color: lightgray; - border-right-width: thin; - } - .event-banner{ - padding-top: 50px; - padding-left: 50px; - } + color: inherit; + background-color: rgba(27, 31, 35, 0.05); +} +.fa { + padding: 30px; + font-size: 25px; + width: 40px; + text-align: center; + text-decoration: none; + opacity: var(--icon-opacity); +} +.fa-twitter { + color: #55acee; +} +.fa-linkedin { + color: #5d6d7e; +} +.fa-github { + color: var(--text-color); +} +.fa-youtube { + color: #d98880; +} +.navbar { + background-color: var(--primary-button-color); + border-bottom: none; + box-shadow: 0px 1px 0px #c7c8c9; + color: var(--button-text-color); + display: flex; + align-items: center; + justify-content: space-between; +} +.navbar-dark .navbar-nav .nav-link, +.navbar-dark .navbar-text { + color: var(--button-text-color); +} +.navbar-dark .navbar-nav .nav-link:hover, +.navbar-dark .navbar-nav .nav-link:focus { + text-decoration: underline; + color: rgba(255, 255, 255, 0.8); + text-decoration: none; +} +.logo-container { + background-color: var(--button-text-color); + padding: 3px 6px; + border-radius: 8px; + box-shadow: var(--primary-box-shadow); + transition: all 0.3s ease; +} +.logo-container:hover { + box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2); +} +.navbar-brand { + display: flex; + align-items: center; +} +.navbar-brand img { + display: block; + max-width: auto; + max-height: 50px; +} +.row { + display: flex; + align-items: center; +} +.row.border-top { + border-color: var(--border-color); +} +.banner { + display: flex; + align-items: center; + justify-content: center; + padding: 1vw 12vw; + background: center / cover var(--banner-background); +} +.banner-content { + display: flex; + align-items: center; + justify-content: flex-start; + gap: 2vw; + width: 90%; + margin: 0 auto; +} +.banner-text { + text-align: left; + flex: 1; + padding: 0; + margin: 0; +} +.banner-image img { + width: 100%; + max-width: 250px; + height: auto; + margin-top: 10px; +} +.banner h1, .banner h5 { + margin: 0; + padding-left: 0; + text-align: left; +} +.banner h1 { + font-size: 70px; + margin-bottom: 10px; + margin-left: -3px; +} +.banner h5 { + font-size: 20px; + margin-top: 10px; +} +.text-box { + width: 75%; + margin: 25px auto; + background-color: var(--button-text-color); + box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1); + border-radius: 10px; + overflow: hidden; + flex-grow: 1; +} +.text-box p, +.text-box h1, +.text-box h2 { + margin: 5px 0; +} +.box-header { + height: 30px; + background-color: rgba(9, 81, 126, 1); +} +.box-content { + padding: 10px 20px; + font-size: 1.05rem; +} +.button-container, +.footer-buttons { + display: flex; + justify-content: center; + flex-wrap: wrap; + gap: 15px; + margin: 20px 0; +} +.button { + padding: 10px 30px; + font-size: 16px; + font-weight: bold; + text-transform: uppercase; + text-decoration: none; + border-radius: 20px; + color: var(--button-text-color); + transition: all 0.3s ease; + transform: scale(1); + box-shadow: var(--primary-box-shadow); + background-color: var(--primary-button-color); +} +.button:hover, +.button:focus { + transform: scale(1.05); + box-shadow: var(--hover-box-shadow); + color: var(--button-text-color); +} +.footer-buttons .button:first-child { + background-color: var(--link-color); +} +.models-section, +.maintainers-section { + text-align: center; + padding-bottom: 20px; +} +.models-section h2, +.maintainers-section h2 { + text-align: left; + padding-left: 12.5%; +} +.model-container, +.maintainer-container { + width: 75%; + margin: 0 auto; +} +.models-grid, +.maintainers-grid { + display: grid; + gap: 1rem; + grid-template-columns: repeat(4, 1fr); +} +.model-card, +.maintainer-card { + display: flex; + flex-direction: column; + align-items: center; + padding-top: 25px; + color: inherit; + text-decoration: none; + border-radius: 10px; + box-shadow: var(--primary-box-shadow); + position: relative; + overflow: hidden; + transition: transform 0.2s ease; +} +.model-card::before, +.maintainer-card::before { + content: ""; + position: absolute; + top: 0; + left: 0; + right: 0; + height: 10px; + background-color: rgba(9, 81, 126, 255); + border-radius: 10px 10px 0 0; +} +.model-card:hover, +.maintainer-card:hover, +.model-card:focus, +.maintainer-card:focus { + transform: translateY(-10px); + text-decoration: none; + box-shadow: var(--hover-box-shadow); +} +.maintainer-image-btn { + display: block; + width: 100px; + height: 100px; + padding: 0; + margin: 0 auto 10px; + border: var(--separator-height) solid var(--separator-color); + background: transparent; + border-radius: 50%; + cursor: pointer; +} +.maintainer-image-btn img { + width: 100%; + display: block; + border-radius: 50%; + transition: opacity 0.2s ease; +} +.maintainer-image-btn:hover img { + opacity: var(--icon-hover-opacity); +} +.maintainer-card.non-clickable { + cursor: default; + text-decoration: none; + color: inherit; } @media (max-width: 900px) { - .event-picture{ - display: none; - } - .archive{ - display: none; - } - .sidenav{ - display: none; - } - .navbar-text{ - display: none; - } - .email-form{ - width: 200px; - margin-left: 10px; - } - .event-col{ - border-bottom-style: solid; - border-bottom-color: lightgray; - border-bottom-width: thin; - } -} -.navbar{ - background-color: white; - border-bottom: solid thin gray; - box-shadow: 0px 1px 0px #c7c8c9; -} -a.event-link:link{ - color:black; -} -a.event-link:hover{ - color:black; - text-decoration: underline; -} -a.event-link:visited{ - color:black; -} -.event-button{ - margin-top: 20px; - margin-bottom: 5px; -} -.card-link{ - color: black; -} -.card-header{ - background-color: #e4e9ec; -} -a.card-link:hover{ - color: black; - text-decoration: none; -} -a.btn:hover{ - background-color: #d3dded; - color: black; -} -.card-home:hover{ - background-color: #e4e9ec; -} -.btn-lg{ - display: block; - margin-left: auto; - margin-right: auto; - width: 200px; + .navbar-text { + display: none; + } } -.img-fluid{ +@media (max-width: 768px) { + .banner { + padding: 2vw; + } + .banner-content { + flex-direction: row; + align-items: center; + justify-content: space-between; + } + .banner-text { + width: 60%; + padding-right: 10px; + } + .banner-image { + width: 35%; + } + .banner-image img { + margin-top: 0; + display: flex; + width: auto; + } + .banner h1 { + font-size: 50px; + } + .banner h5 { + font-size: 18px; + } + .text-box { + width: 95%; + margin: 30px auto; + } + .model-container, + .maintainer-container { + width: 95%; + margin: 30px auto; + } + .custom-section .box-content { + padding: 10px 15px; + } + .models-grid, + .maintainers-grid { + grid-template-columns: repeat(2, 1fr); + } + .slick-slider .carousel-item { + height: auto; + width: auto; + padding: 10px; + } + .slick-slider .carousel-item h3, + .slick-slider .carousel-item h4, + .slick-slider .carousel-item p { + font-size: smaller; + margin: 5px 0; + } + .slick-slider .carousel-item .pr-link-button { + padding: 8px 12px; + font-size: 12px; + } + .slick-slider .carousel-item img { + width: 100%; + max-width: 250px; + height: 75px; display: block; - margin-left: auto; - margin-right: auto; - width: 90%; + margin: 0 auto; + } } -.jumbotron { - background-color: #f9f9f9; +@media (max-width: 480px) { + .slick-slider .carousel-item { + flex-direction: column; + align-items: flex-start; + } + .slick-slider .carousel-item .repo-logo { + margin-bottom: 10px; + } + .slick-slider .carousel-item .text-content { + width: 100%; + } + .models-grid, + .maintainers-grid { + grid-template-columns: 1fr; + } } -.newsletter-input { - border-radius: 5px; - border-color: lightgrey; - border-width: 1px; - border-style: solid; - margin-bottom: 5px; - padding: 5px; +.footer .fa:hover, +.footer .fa:focus { + background-color: var(--hover-bg-color); } -#mc-embedded-subscribe { - margin-bottom: 100px; +.footer { + background-color: var(--primary-bg-color); } -.asterisk { - color: red; +.footer-text a:hover, +.footer-text a:focus { + text-decoration: underline; } -#aboutlink { - font-family: 'Courier New', Courier, monospace; +.footer .fa { + margin: 0 15px; + padding: 10px; + border-radius: 50%; + background-color: rgba(174, 163, 163, 0.2); + transition: background-color 0.3s ease; } -#subscribe { - margin-top: 20px; - font-size: 3.5vw; +.footer .fa:hover { + background-color: rgba(255, 255, 255, 0.3); } -.model-info a { - color: inherit; - text-decoration-line: underline; - text-decoration-style: solid; +.footer .text-center { + padding-top: 10px; + padding-bottom: 10px; } .fa { padding: 30px; @@ -162,26 +401,336 @@ a.btn:hover{ width: 40px; text-align: center; text-decoration: none; - /*border-radius: 50%;*/ + opacity: var(--icon-opacity); } - -.fa:hover { - opacity: 0.7; - text-decoration: none; +.fa:hover, +.footer .fa:hover { + background-color: rgba(255, 255, 255, 0.3); } - .fa-twitter { - color: #55ACEE; + color: #55acee; } - .fa-linkedin { - color: #5D6D7E; + color: #5d6d7e; } - .fa-github { - color: #333; + color: var(--text-color); } - .fa-youtube { - color: #D98880; + color: #d98880; +} +.footer { + background-color: var(--text-color); + color: var(--footer-text-color); + padding: 0; + margin: 0; + border: none; + height: auto; +} +.footer-banner { + background-color: rgb(188, 229, 243); + padding: 0; + margin: 0; + text-align: center; + width: 100%; + border: none; +} +.footer-image img { + max-width: 240px; + height: auto; + margin: 0 auto; + padding-top: 5px; +} +.footer-buttons { + padding-bottom: 1px; + gap: 15px; +} +.footer-text { + margin-bottom: 20px; +} +.footer-text h5 { + color: #34495e; + margin-top: 20px; +} +.footer-text a { + text-decoration: none; + color: #2e4053; + margin-left: 5px; +} +.footer-banner + .footer { + margin-top: 0; +} +.footer-banner, +.footer { + overflow: auto; +} +.footer { + overflow-x: hidden; +} +.footer-buttons { + display: flex; + justify-content: center; + gap: 20px; +} +.footer-buttons .button { + width: 250px; + display: inline-flex; + justify-content: center; + align-items: center; +} +.custom-section { + display: flex; + justify-content: space-between; + margin: 2em 0; +} +.custom-section .box { + flex: 1; + background-color: var(--button-text-color); + box-shadow: var(--primary-box-shadow); + padding: 20px; + margin: 0 10px; + text-align: center; + border-radius: 5px; + transition: + transform 0.2s ease, + box-shadow 0.2s ease; +} +.custom-section .box:hover, +.custom-section .box:focus-within { + transform: translateY(-10px); + box-shadow: var(--hover-box-shadow); +} +.custom-section .box h3 { + margin-top: 10px; +} +.custom-section .box p { + margin-top: 10px; + color: #777; +} +.custom-section .box i { + font-size: 2em; + color: var(--primary-button-color); +} +@media (min-width: 768px) { + .custom-section { + margin: 2em 5%; + } +} +@media (max-width: 767px) { + .custom-section { + flex-direction: column; + } + .custom-section .box { + margin: 10px 0; + } +} +@media (min-width: 768px) { + .custom-section { + width: 75%; + margin: 25px auto; + } + .custom-section .box { + margin: 0 1%; + } +} +@media (max-width: 767px) { + .custom-section { + width: 95%; + margin: 30px auto; + flex-direction: column; + } + .custom-section .box { + margin: 10px auto; + } +} +.custom-section .box { + border-top: none; +} +.custom-section .box i { + color: var(--separator-color); +} +.models-section { + display: flex; + flex-wrap: wrap; + justify-content: center; +} +.models-section .card { + width: 23%; + margin: 1%; +} +@media (min-width: 992px) { + .models-grid { + display: flex; + flex-wrap: wrap; + justify-content: center; + } + .model-card { + flex: 0 0 calc(25% - 4%); + margin: 1%; + } +} +.model-card img { + width: 100px; + border-radius: 5px; +} +.model-card .maintainer-image-btn { + border-radius: 5px; + background-color: transparent; + border: var(--separator-height) solid var(--separator-color); +} +.model-card .maintainer-image-btn { + display: flex; + align-items: center; + justify-content: center; + padding: 0; +} +.model-card img { + width: 100%; + height: 100%; + object-fit: cover; +} +.col-sm.text-center { + display: flex; + justify-content: center; + flex-wrap: nowrap; +} +.col-sm.text-center a.fa:hover { + text-decoration: none; + background-color: #f5f5f5; + color: var(--link-hover-color); +} +.carousel-container { + margin: 2em auto; + width: 100%; + max-width: 75%; +} +.slick-slider .carousel-item { + margin: 5px 10px; + padding: 25px; + width: auto; + height: 200px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + display: flex; + justify-content: space-between; + background-color: var(--button-text-color); + box-shadow: var(--primary-box-shadow); + border-radius: 5px; + align-items: center; + text-align: left; +} +.slick-slider .carousel-item .repo-logo { + max-width: 80px; + height: auto; + margin-right: 20px; +} +.slick-slider .carousel-item .text-content { + flex-grow: 1; +} +.slick-slider .carousel-item .repo-title { + font-size: 18px; + margin-bottom: 12px; +} +.slick-slider .carousel-item .pr-title { + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; + text-overflow: ellipsis; + white-space: normal; + font-size: 15px; + margin-bottom: 5px; +} +.slick-slider .carousel-item .pr-time { + font-size: 14px; + color: #666; + margin-bottom: 10px; +} +.slick-slider .carousel-item .pr-link-button { + display: block; + text-align: center; + padding: 10px 15px; + background-color: var(--primary-button-color); + color: var(--button-text-color); + text-decoration: none; + border-radius: 5px; + transition: background-color 0.2s; + box-shadow: var(--primary-box-shadow); + margin-top: auto; +} +.slick-slider .carousel-item .pr-link-button:hover { + background-color: var(--hover-button-color); + box-shadow: var(--hover-box-shadow); +} +.user-grid-container { + display: flex; + flex-wrap: wrap; + column-gap: 25px; + row-gap: 25px; + justify-content: center; +} +.user-grid-item { + display: flex; + flex-direction: column; + vertical-align: bottom; + max-width: 250px; +} +.user-grid-item img { + height: 75px; + width: auto; + max-width: 250px; + vertical-align: bottom; +} +.user-grid-item p { + text-align: center; + word-wrap: break-word; + hyphens: auto; +} +.user-grid-item a { + color: var(--link-color); + text-decoration: none; +} +.user-grid-item a:hover, +.user-grid-item a:focus { + text-decoration: underline; +} +.separator { + border: 0; + height: var(--separator-height); + background-color: var(--separator-color); + margin: 10px 250px; +} +#userCarousel .carousel-item img { + max-width: 300px; + height: 75px; + margin: 0 auto; +} +#userCarousel .carousel-item { + justify-content: center; + padding: 15px; + height: auto; + text-align: center; + width: auto; +} +#userCarousel .carousel-item a { + color: var(--link-color); + text-decoration: none; +} +#userCarousel .carousel-item a:hover { + text-decoration: underline; +} +#userCarousel .carousel-item p { + margin-bottom: 5px; +} +table { + border-collapse: collapse; + width: 100%; +} +table, th, td { + border: 1px solid var(--link-hover-color); +} +th, td { + padding: 8px; + text-align: left; } \ No newline at end of file diff --git a/Catalog/Behavioral-Responses.html b/Catalog/Behavioral-Responses.html new file mode 100644 index 00000000..b1f98a9b --- /dev/null +++ b/Catalog/Behavioral-Responses.html @@ -0,0 +1,137 @@ + + + + + + + + + + PSL + + + + + + + + + + + + + + +
+
+
+

Behavioral-Responses, which is part of the Policy Simulation Library (PSL) collection of USA tax models, estimates partial-equilibrium behavioral responses to changes in the US federal individual income and payroll tax system as simulated by Tax-Calculator. It provides two ways of doing this: (1) the response function, which contains higher-level logic that supports the Tax-Brain "Partial Equilibrium Simulation" capability and requires specification of only the elasticities, and (2) the quantity_response function, which contains lower-level logic that requires specification of the quantity whose response is to be estimated, requires specification of the marginal tax rates and elasticities to be used in the response calculation, and allows the response estimation to be conducted by subgroup with different elasticities for each subgroup.

+
+
+ + + + +
+ User documentationContributor documentationLink to webapp +
+ +
+

Maintainers:

+
+
+ +
+ +

Matt Jensen

+
+ +
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/Catalog/Cost-of-Capital-Calculator.html b/Catalog/Cost-of-Capital-Calculator.html new file mode 100644 index 00000000..b256f8e5 --- /dev/null +++ b/Catalog/Cost-of-Capital-Calculator.html @@ -0,0 +1,137 @@ + + + + + + + + + + PSL + + + + + + + + + + + + + + +
+
+
+

Cost-of-Capital-Calculator is a model that can be used to evaluate the effect of US federal taxes on the investment incentives of corporate and non-corporate businesses. Specifically, Cost-of-Capital-Calculator uses data on the business assets and financial policy, as well as microdata on individual tax filers, to compute marginal effective tax rates on new investments. In modeling the effects of changes to the individual income tax code, Cost-of-Capital-Calculator works with Tax-Calculator, another open-source model of US federal tax policy. Cost-of-Capital-Calculator is written in Python, an interpreted language that can execute on Windows, Mac, or Linux.

Installation

The ccc package can be installed with Anaconda via:

conda install -c conda-forge ccc

or with PyPI via:

pip install cost-of-capital-calculator

Web Application

Cost-of-Capital-Calculator is available through a web application, Cost of Capital Calculator. This app allows you to generate estimates of marginal effective tax rates and the cost of capital across production industries, type of asset, and separately for corporate and non-corporate entities and different forms of financing. The web application is limited in that you cannot consider policy reforms to the individual income tax code.

Contributing to Cost-of-Capital-Calculator

To contribute to Cost-of-Capital-Calculator, you'll want to clone the GitHub repository to your own machine, where you can work with and edit the source code. To do this, follow the following instructions:

The CSV output files can be compared to the ./example_output/*_expected.csv files that are checked into the repository to confirm that you are generating the expected output. The easiest way to do this is to use the ./example-diffs command (or example-diffs on Windows). If you run into errors running the example script, please open a new issue in the Cost-of-Capital-Calculator repo with a description of the issue and any relevant tracebacks you receive.

+
+
+ + + + +
+ User documentationLink to webapp +
+ +
+

Maintainers:

+
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/Catalog/DSGE.jl.html b/Catalog/DSGE.jl.html new file mode 100644 index 00000000..e7fce089 --- /dev/null +++ b/Catalog/DSGE.jl.html @@ -0,0 +1,177 @@ + + + + + + + + + + PSL + + + + + + + + + + + + + + +
+
+
+

Build Status codecov

The DSGE.jl package implements the New York Fed dynamic stochastic general equilibrium (DSGE) model and provides general code to estimate many user-specified DSGE models. The package is introduced in the Liberty Street Economics blog post The FRBNY DSGE Model Meets Julia. (We previously referred to our model as the "FRBNY DSGE Model.")

This Julia-language implementation mirrors the MATLAB code included in the Liberty Street Economics blog post The FRBNY DSGE Model Forecast.

Documentation for the code can be accessed by clicking on the docs button above (stable for the most recent release, dev for the most recent updates). For documentation about the most recent model version, read this pdf. We recommend new users take a look at our example scripts as they read the documentation because the examples will make it easier to comprehend the documentation. For details on the example scripts, see Running Existing Models.

The New York Fed DSGE team is currently extending the code to solve and estimate heterogeneous agent models. Filtering and smoothing algorithms are available in the registered package StateSpaceRoutines.jl. An implementation of Sequential Monte Carlo (SMC) sampling, used for the estimation of DSGE models, can be found in the registered package SMC.jl. The foundational AbstractModel type, from which the AbstractDSGEModel type derives, is defined in the registered package ModelConstructors.jl.

Further extensions of the DSGE model code may be released at the discretion of the New York Fed.

Installation

DSGE.jl is a registered Julia package in the General registry. To install it, open your Julia REPL, type ] to enter the package manager, and run

julia pkg> add DSGE

If you use any code that loads data (e.g. the example script run_default.jl and make_packet.jl), then you need make sure you have a FRED API key by following these instructions for the FredData.jl package.

If you are using Windows OS and you encounter the error AssertionError: length(dirs) == 1, please see this issue. Additionally, please do not run the plot.jl test if you are using Windows OS because the generated output will violate the default filename length restriction on Windows. If you want to run this test, then you need to enable long paths.

Note we do not test our code in Windows OS, so we cannot guarantee the code works properly in Windows.

Versioning

DSGE.jl is currently compatible with Julia v1.x (as of v1.1.6).

To use DSGE.jl with Julia v0.7, please check out tag 0.8.1. To do this, click on the drop-down menu that reads branch:main on the left-hand side of the page. Select tags, then v0.8.1. If you've already cloned the repo, you can simply run git checkout v0.8.1.

To use DSGE.jl with Julia v0.6, please check out tag 0.4.1.

Precompilation

The DSGE.jl package is not precompiled by default because when running code in parallel, we want to re-compile the copy of DSGE.jl on each processor to guarantee the right version of the code is being used. If users do not anticipate using parallelism, then users ought to change the first line of src/DSGE.jl from

isdefined(Base, :__precompile__) && __precompile__(false)

to

isdefined(Base, :__precompile__) && __precompile__(true)

Citing DSGE.jl

DSGE.jl (Version 1.2.1)[Source code], https://github.com/PSLmodels/DSGE.jl

+
+
+ + + + +
+ User documentationContributor documentation +
+ +
+

Maintainers:

+
+
+ +
+ +

Marco Del Negro

+
+ +
+ +

William Chen

+
+ +
+ +

Shlok Goyal

+
+ +
+ +

Alissa Johnson

+
+ +
+ +

Aidan Gleich

+
+ +
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/Catalog/OG-USA.html b/Catalog/OG-USA.html new file mode 100644 index 00000000..ede24738 --- /dev/null +++ b/Catalog/OG-USA.html @@ -0,0 +1,147 @@ + + + + + + + + + + PSL + + + + + + + + + + + + + + +
+
+
+

OG-USA is an overlapping-generations (OG) model that allows for dynamic general equilibrium analysis of fiscal policy for the United States. OG-USA is built on the OG-Core framework. The model output includes changes in macroeconomic aggregates (GDP, investment, consumption), wages, interest rates, and the stream of tax revenues over time. Regularly updated documentation of the model theory--its output, and solution method--and the Python API is available at https://pslmodels.github.io/OG-Core and documentation of the specific United States calibration of the model is available at https://pslmodels.github.io/OG-USA.

+
+
+ + + + +
+ User documentationContributor documentation +
+ +
+

Maintainers:

+
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/Catalog/PCI-China.html b/Catalog/PCI-China.html new file mode 100644 index 00000000..ac076530 --- /dev/null +++ b/Catalog/PCI-China.html @@ -0,0 +1,147 @@ + + + + + + + + + + PSL + + + + + + + + + + + + + + +
+
+
+

China's industrialization process has long been a product of government direction, be it coercive central planning or ambitious industrial policy. For the first time in the literature, we develop a quantitative indicator of China's policy priorities over a long period of time, which we call the Policy Change Index for China (PCI-China). The PCI-China is a leading indicator that runs from 1951 to the most recent quarter and can be updated in the future. In other words, the PCI-China not only helps us understand the past of China's industrialization but also allows us to make short-term predictions about its future directions.

The design of the PCI-China has two building blocks: (1) it takes as input data the full text of the People's Daily --- the official newspaper of the Communist Party of China --- since it was founded in 1946; (2) it employs a set of machine learning techniques to "read" the articles and detect changes in the way the newspaper prioritizes policy issues.

The source of the PCI-China's predictive power rests on the fact that the People's Daily is at the nerve center of China's propaganda system and that propaganda changes often precede policy changes. Before the great transformation from the central planning under Mao to the economic reform program after Mao, for example, considerable efforts were made by the Chinese government to promote the idea of reform, move public opinion, and mobilize resources toward the new agenda. Therefore, by detecting (real-time) changes in propaganda, the PCI-China is, effectively, predicting (future) changes in policy.

For details about the methodology and findings of this project, please see the following research paper:

+
+
+ + + + +
+ User documentationContributor documentation +
+ +
+

Maintainers:

+
+
+ +
+ +

Julian TszKin Chan

+
+ +
+ +

Weifeng Zhong

+
+ +
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/Catalog/ParamTools.html b/Catalog/ParamTools.html new file mode 100644 index 00000000..37a5cc31 --- /dev/null +++ b/Catalog/ParamTools.html @@ -0,0 +1,137 @@ + + + + + + + + + + PSL + + + + + + + + + + + + + + +
+
+
+

Define, update, and validate your model's parameters.

Install using pip:

pip install paramtools

Install using conda:

conda install -c conda-forge paramtools

Usage

Subclass paramtools.Parameters and define your model's parameters:

```python import paramtools

class Params(paramtools.Parameters): defaults = { "schema": { "labels": { "date": { "type": "date", "validators": { "range": { "min": "2020-01-01", "max": "2021-01-01", "step": {"months": 1} } } } }, }, "a": { "title": "A", "type": "int", "value": [ {"date": "2020-01-01", "value": 2}, {"date": "2020-10-01", "value": 8}, ], "validators": { "range" : { "min": 0, "max": "b" } } }, "b": { "title": "B", "type": "float", "value": [{"date": "2020-01-01", "value": 10.5}] } } ```

Access parameter values

Access values using .sel:

```python params = Params()

params.sel["a"] ```

Values([   {'date': datetime.date(2020, 1, 1), 'value': 2},   {'date': datetime.date(2020, 10, 1), 'value': 8}, ]) 

Look up parameter values using a pandas-like api:

```python from datetime import date

result = params.sel["a"]["date"] == date(2020, 1, 1) result ```

QueryResult([   {'date': datetime.date(2020, 1, 1), 'value': 2} ]) 

python result.isel[0]["value"]

2 

Adjust and validate parameter values

Add a new value:

```python params.adjust({"a": [{"date": "2020-11-01", "value": 22}]})

params.sel["a"] ```

Values([   {'date': datetime.date(2020, 1, 1), 'value': 2},   {'date': datetime.date(2020, 10, 1), 'value': 8},   {'date': datetime.date(2020, 11, 1), 'value': 22}, ]) 

Update an existing value:

```python params.adjust({"a": [{"date": "2020-01-01", "value": 3}]})

params.sel["a"] ```

Values([   {'date': datetime.date(2020, 1, 1), 'value': 3},   {'date': datetime.date(2020, 10, 1), 'value': 8},   {'date': datetime.date(2020, 11, 1), 'value': 22}, ]) 

Update all values:

```python params.adjust({"a": 7})

params.sel["a"] ```

Values([   {'date': datetime.date(2020, 1, 1), 'value': 7},   {'date': datetime.date(2020, 10, 1), 'value': 7},   {'date': datetime.date(2020, 11, 1), 'value': 7}, ]) 

Errors on values that are out of range:

python params.adjust({"a": -1})

    ---------------------------------------------------------------------------  ValidationError                           Traceback (most recent call last)  <ipython-input-8-f8f1b7f6cd9a> in <module>     ----> 1 params.adjust({"a": -1})   ~/Paramtools/paramtools/parameters.py in adjust(self, params_or_path, ignore_warnings, raise_errors, extend_adj, clobber)     253             least one existing value item's corresponding label values.     254         """     --> 255         return self._adjust(     256             params_or_path,     257             ignore_warnings=ignore_warnings,   ~/Paramtools/paramtools/parameters.py in _adjust(self, params_or_path, ignore_warnings, raise_errors, extend_adj, is_deserialized, clobber)     371             not ignore_warnings and has_warnings     372         ):     --> 373             raise self.validation_error     374     375         # Update attrs for params that were adjusted.   ValidationError: {     "errors": {         "a": [             "a -1 < min 0 "         ]     } } 

```python params = Params()

params.adjust({"a": [{"date": "2020-01-01", "value": 11}]}) ```

    ---------------------------------------------------------------------------  ValidationError                           Traceback (most recent call last)  <ipython-input-9-cc8a21f044d8> in <module>       1 params = Params()       2     ----> 3 params.adjust({"a": [{"date": "2020-01-01", "value": 11}]})   ~/Paramtools/paramtools/parameters.py in adjust(self, params_or_path, ignore_warnings, raise_errors, extend_adj, clobber)     253             least one existing value item's corresponding label values.     254         """     --> 255         return self._adjust(     256             params_or_path,     257             ignore_warnings=ignore_warnings,   ~/Paramtools/paramtools/parameters.py in _adjust(self, params_or_path, ignore_warnings, raise_errors, extend_adj, is_deserialized, clobber)     371             not ignore_warnings and has_warnings     372         ):     --> 373             raise self.validation_error     374     375         # Update attrs for params that were adjusted.   ValidationError: {     "errors": {         "a": [             "a[date=2020-01-01] 11 > max 10.5 b[date=2020-01-01]"         ]     } } 

Errors on invalid values:

```python params = Params()

params.adjust({"b": "abc"}) ```

    ---------------------------------------------------------------------------  ValidationError                           Traceback (most recent call last)  <ipython-input-10-8373a2715e38> in <module>       1 params = Params()       2     ----> 3 params.adjust({"b": "abc"})   ~/Paramtools/paramtools/parameters.py in adjust(self, params_or_path, ignore_warnings, raise_errors, extend_adj, clobber)     253             least one existing value item's corresponding label values.     254         """     --> 255         return self._adjust(     256             params_or_path,     257             ignore_warnings=ignore_warnings,   ~/Paramtools/paramtools/parameters.py in _adjust(self, params_or_path, ignore_warnings, raise_errors, extend_adj, is_deserialized, clobber)     371             not ignore_warnings and has_warnings     372         ):     --> 373             raise self.validation_error     374     375         # Update attrs for params that were adjusted.   ValidationError: {     "errors": {         "b": [             "Not a valid number: abc."         ]     } } 

Extend parameter values using label definitions

Extend values using label_to_extend:

python params = Params(label_to_extend="date")

python params.sel["a"]

Values([   {'date': datetime.date(2020, 1, 1), 'value': 2},   {'date': datetime.date(2020, 2, 1), 'value': 2, '_auto': True},   {'date': datetime.date(2020, 3, 1), 'value': 2, '_auto': True},   {'date': datetime.date(2020, 4, 1), 'value': 2, '_auto': True},   {'date': datetime.date(2020, 5, 1), 'value': 2, '_auto': True},   {'date': datetime.date(2020, 6, 1), 'value': 2, '_auto': True},   {'date': datetime.date(2020, 7, 1), 'value': 2, '_auto': True},   {'date': datetime.date(2020, 8, 1), 'value': 2, '_auto': True},   {'date': datetime.date(2020, 9, 1), 'value': 2, '_auto': True},   {'date': datetime.date(2020, 10, 1), 'value': 8},   {'date': datetime.date(2020, 11, 1), 'value': 8, '_auto': True},   {'date': datetime.date(2020, 12, 1), 'value': 8, '_auto': True},   {'date': datetime.date(2021, 1, 1), 'value': 8, '_auto': True}, ]) 

Updates to values are carried through to future dates:

```python params.adjust({"a": [{"date": "2020-4-01", "value": 9}]})

params.sel["a"] ```

Values([   {'date': datetime.date(2020, 1, 1), 'value': 2},   {'date': datetime.date(2020, 2, 1), 'value': 2, '_auto': True},   {'date': datetime.date(2020, 3, 1), 'value': 2, '_auto': True},   {'date': datetime.date(2020, 4, 1), 'value': 9},   {'date': datetime.date(2020, 5, 1), 'value': 9, '_auto': True},   {'date': datetime.date(2020, 6, 1), 'value': 9, '_auto': True},   {'date': datetime.date(2020, 7, 1), 'value': 9, '_auto': True},   {'date': datetime.date(2020, 8, 1), 'value': 9, '_auto': True},   {'date': datetime.date(2020, 9, 1), 'value': 9, '_auto': True},   {'date': datetime.date(2020, 10, 1), 'value': 9, '_auto': True},   {'date': datetime.date(2020, 11, 1), 'value': 9, '_auto': True},   {'date': datetime.date(2020, 12, 1), 'value': 9, '_auto': True},   {'date': datetime.date(2021, 1, 1), 'value': 9, '_auto': True}, ]) 

Use clobber to only update values that were set automatically:

```python params = Params(label_to_extend="date") params.adjust( {"a": [{"date": "2020-4-01", "value": 9}]}, clobber=False, )

Sort parameter values by date for nicer output

params.sort_values() params.sel["a"] ```

Values([   {'date': datetime.date(2020, 1, 1), 'value': 2},   {'date': datetime.date(2020, 2, 1), 'value': 2, '_auto': True},   {'date': datetime.date(2020, 3, 1), 'value': 2, '_auto': True},   {'date': datetime.date(2020, 4, 1), 'value': 9},   {'date': datetime.date(2020, 5, 1), 'value': 9, '_auto': True},   {'date': datetime.date(2020, 6, 1), 'value': 9, '_auto': True},   {'date': datetime.date(2020, 7, 1), 'value': 9, '_auto': True},   {'date': datetime.date(2020, 8, 1), 'value': 9, '_auto': True},   {'date': datetime.date(2020, 9, 1), 'value': 9, '_auto': True},   {'date': datetime.date(2020, 10, 1), 'value': 8},   {'date': datetime.date(2020, 11, 1), 'value': 8, '_auto': True},   {'date': datetime.date(2020, 12, 1), 'value': 8, '_auto': True},   {'date': datetime.date(2021, 1, 1), 'value': 8, '_auto': True}, ]) 

NumPy integration

Access values as NumPy arrays with array_first:

```python params = Params(label_to_extend="date", array_first=True)

params.a ```

array([2, 2, 2, 2, 2, 2, 2, 2, 2, 8, 8, 8, 8]) 

python params.a * params.b

array([21., 21., 21., 21., 21., 21., 21., 21., 21., 84., 84., 84., 84.]) 

Only get the values that you want:

python arr = params.to_array("a", date=["2020-01-01", "2020-11-01"]) arr

array([2, 8]) 

Go back to a list of dictionaries:

python params.from_array("a", arr, date=["2020-01-01", "2020-11-01"])

[{'date': datetime.date(2020, 1, 1), 'value': 2},  {'date': datetime.date(2020, 11, 1), 'value': 8}] 
Documentation

Full documentation available at paramtools.dev.

Contributing

Contributions are welcome! Checkout CONTRIBUTING.md to get started.

Credits

ParamTools is built on top of the excellent marshmallow JSON schema and validation framework. I encourage everyone to check out their repo and documentation. ParamTools was modeled off of Tax-Calculator's parameter processing and validation engine due to its maturity and sophisticated capabilities.

+
+
+ + + + +
+ User documentationContributor documentationRecent changes +
+ +
+

Maintainers:

+
+
+ +
+ +

Hank Doupe

+
+ +
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/Catalog/README.md b/Catalog/README.md index d10dbbe8..76c7eaad 100644 --- a/Catalog/README.md +++ b/Catalog/README.md @@ -1 +1 @@ -This directory will contain a database of library meta data, automatically pulled from library projects using the PSL Catalog-Builder. \ No newline at end of file +This directory will contain a database of library meta data, automatically pulled from library projects using the PSL Catalog-Builder. diff --git a/Catalog/Tax-Brain.html b/Catalog/Tax-Brain.html new file mode 100644 index 00000000..7fdfdd18 --- /dev/null +++ b/Catalog/Tax-Brain.html @@ -0,0 +1,137 @@ + + + + + + + + + + PSL + + + + + + + + + + + + + + +
+
+
+

Tax-Brain makes it easy for users to simulate the US tax system by providing a single interface for multiple tax models. Currently, Tax-Brain interfaces with Tax-Calculator and Behavioral-Responses. Additional models will be added in the near future to expand Tax-Brain's capabilities to include modeling business taxation and running dynamic general equilibrium simulations.

To learn more about how Tax-Brain works, see the Tax-Brain documentation.

+
+
+ + + + +
+ User documentationContributor documentationRecent changesLink to webapp +
+ +
+

Maintainers:

+
+
+ +
+ +

Anderson Frailey

+
+ +
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/Catalog/Tax-Calculator.html b/Catalog/Tax-Calculator.html new file mode 100644 index 00000000..30d427f2 --- /dev/null +++ b/Catalog/Tax-Calculator.html @@ -0,0 +1,167 @@ + + + + + + + + + + PSL + + + + + + + + + + + + + + +
+
+
+ What is Tax-Calculator? +
+
+ + + + +
+ User documentationContributor documentationRecent changes +
+ +
+

Maintainers:

+
+
+ +
+ +

Jason DeBacker

+
+ +
+ +

Henry Doupe

+
+ +
+ +

Anderson Frailey

+
+ +
+ +

Matt Jensen

+
+ +
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/Catalog/Tax-Cruncher.html b/Catalog/Tax-Cruncher.html new file mode 100644 index 00000000..4f6b710a --- /dev/null +++ b/Catalog/Tax-Cruncher.html @@ -0,0 +1,137 @@ + + + + + + + + + + PSL + + + + + + + + + + + + + + +
+
+
+

Tax-Cruncher calculates federal tax liabilities from individual data under different policy scenarios.

Tax-Cruncher accepts inputs similar to NBER's TAXSIM Version 27, converts those inputs to a format usable by Tax-Calculator, and uses Tax-Calculator capabilities to analyze the user-provided data under various tax policy proposals.

Tax-Cruncher's web application is hosted on Compute Studio. The code that powers the web application can be found in this repository in the cs-config directory.

+
+
+ + + + +
+ User documentationRecent changesLink to webapp +
+ +
+

Maintainers:

+
+
+ +
+ +

Peter Metz

+
+ +
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/Catalog/capital-cost-recovery.html b/Catalog/capital-cost-recovery.html new file mode 100644 index 00000000..f9413929 --- /dev/null +++ b/Catalog/capital-cost-recovery.html @@ -0,0 +1,137 @@ + + + + + + + + + + PSL + + + + + + + + + + + + + + +
+
+
+ What is capital-cost-recovery? +
+
+ + + + +
+ User documentation +
+ +
+

Maintainers:

+
+
+ +
+ +

Daniel Bunn

+
+ +
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/Catalog/catalog.json b/Catalog/catalog.json index c3d336f4..96fce7f3 100644 --- a/Catalog/catalog.json +++ b/Catalog/catalog.json @@ -296,7 +296,7 @@ }, "project_overview": { "source": "https://github.com/PSLmodels/OG-USA/blob/master/README.md", - "value": "

| | | | --- | --- | | Org | \"PSL \"OS \"Jupyter | | Package | \"Python \"Python \"Python \"PyPI \"PyPI \"Code | | Testing | \"example \"example \"example \"Codecov\" |

OG-USA is an overlapping-generations (OG) model that allows for dynamic general equilibrium analysis of fiscal policy for the United States. OG-USA is built on the OG-Core framework. The model output includes changes in macroeconomic aggregates (GDP, investment, consumption), wages, interest rates, and the stream of tax revenues over time. Regularly updated documentation of the model theory--its output, and solution method--and the Python API is available at https://pslmodels.github.io/OG-Core and documentation of the specific United States calibration of the model is available at https://pslmodels.github.io/OG-USA.

Disclaimer

The model is constantly under development, and model components could change significantly. The package will have released versions, which will be checked against existing code prior to release. Stay tuned for an upcoming release!

" + "value": "

OG-USA is an overlapping-generations (OG) model that allows for dynamic general equilibrium analysis of fiscal policy for the United States. OG-USA is built on the OG-Core framework. The model output includes changes in macroeconomic aggregates (GDP, investment, consumption), wages, interest rates, and the stream of tax revenues over time. Regularly updated documentation of the model theory--its output, and solution method--and the Python API is available at https://pslmodels.github.io/OG-Core and documentation of the specific United States calibration of the model is available at https://pslmodels.github.io/OG-USA.

" }, "citation": { "source": "https://github.com/PSLmodels/OG-USA#citing-og-usa", @@ -324,7 +324,7 @@ }, "disclaimer": { "source": "https://github.com/PSLmodels/OG-USA/blob/master/README.md", - "value": "

The model is constantly under development, and model components could change significantly. The package will have released versions, which will be checked against existing code prior to release. Stay tuned for an upcoming release!

Using/contributing to OG-USA

Note that, depending on your machine, a full model run (solving for the full time path equilibrium for the baseline and reform policies) can take more than two hours of compute time.

If you run into errors running the example script, please open a new issue in the OG-USA repo with a description of the issue and any relevant tracebacks you receive.

Once the package is installed, one can adjust parameters in the OG-Core Specifications object using the Calibration class as follows:

from ogcore.parameters import Specifications from ogusa.calibrate import Calibration p = Specifications() c = Calibration(p) updated_params = c.get_dict() p.update_specifications({'initial_debt_ratio': updated_params['initial_debt_ratio']})

Core Maintainers

The core maintainers of the OG-Core repository are:

" + "value": "

The organization of this repository will be changing rapidly, but the OG-USA/examples/run_og_usa.py script will be kept up to date to run with the master branch of this repo.

Core Maintainers

The core maintainers of the OG-Core repository are:

" }, "user_case_studies": { "source": null, @@ -376,37 +376,27 @@ } }, "openfisca-uk": { - "name": { - "value": "openfisca-uk", - "source": "" - }, - "project_one_line": { - "source": null, - "value": "

PolicyEngine UK is a static microsimulation model of the UK Tax-Benefit system.

" - }, - "project_overview": { - "source": null, - "value": "What is PolicyEngine-UK?" - }, - "core_maintainers": { - "source": null, - "value": "