Coder Social home page Coder Social logo

realtalk's Introduction

realtalk

realtalk makes it easy to use common US price indexes in R.

Loading the data

realtalk is mostly a data package and includes several datasets of common US price indexes, like the CPI-U-RS:

library(realtalk)
cpi_u_rs_annual
#> # A tibble: 46 × 2
#>     year cpi_u_rs
#>    <dbl>    <dbl>
#>  1  1978     104.
#>  2  1979     114.
#>  3  1980     127.
#>  4  1981     139.
#>  5  1982     148.
#>  6  1983     154.
#>  7  1984     160.
#>  8  1985     166.
#>  9  1986     168.
#> 10  1987     174.
#> # ℹ 36 more rows

You can see what datasets are available by loading available_price_indexes:

available_price_indexes
#> # A tibble: 20 × 6
#>    index_name        frequency seasonal min_date max_date package_data_name     
#>    <chr>             <chr>     <chr>    <chr>    <chr>    <chr>                 
#>  1 C-CPI-U           annual    <NA>     2000     2023     c_cpi_u_annual        
#>  2 C-CPI-U           monthly   NSA      Dec 1999 May 2024 c_cpi_u_monthly_nsa   
#>  3 C-CPI-U           quarterly NSA      2000q1   2024q1   c_cpi_u_quarterly_nsa 
#>  4 C-CPI-U, extended annual    <NA>     1937     2023     c_cpi_u_extended_annu…
#>  5 C-CPI-U, extended monthly   NSA      Jan 1937 May 2024 c_cpi_u_extended_mont…
#>  6 C-CPI-U, extended monthly   SA       Jan 1947 May 2024 c_cpi_u_extended_mont…
#>  7 C-CPI-U, extended quarterly NSA      1937q1   2024q1   c_cpi_u_extended_quar…
#>  8 C-CPI-U, extended quarterly SA       1947q1   2024q1   c_cpi_u_extended_quar…
#>  9 CPI-U             annual    <NA>     1937     2023     cpi_u_annual          
#> 10 CPI-U             monthly   NSA      Jan 1937 May 2024 cpi_u_monthly_nsa     
#> 11 CPI-U             monthly   SA       Jan 1947 May 2024 cpi_u_monthly_sa      
#> 12 CPI-U             quarterly NSA      1937q1   2024q1   cpi_u_quarterly_nsa   
#> 13 CPI-U             quarterly SA       1947q1   2024q1   cpi_u_quarterly_sa    
#> 14 CPI-U-RS          annual    <NA>     1978     2023     cpi_u_rs_annual       
#> 15 CPI-U-RS          monthly   NSA      Dec 1977 Dec 2023 cpi_u_rs_monthly_nsa  
#> 16 CPI-U-X1          annual    <NA>     1967     1982     cpi_u_x1_annual       
#> 17 CPI-U-X1          monthly   NSA      Jan 1967 Dec 1982 cpi_u_x1_monthly_nsa  
#> 18 PCE               annual    <NA>     1929     2023     pce_annual            
#> 19 PCE               monthly   SA       Jan 1959 Apr 2024 pce_monthly_sa        
#> 20 PCE               quarterly SA       1947q1   2024q1   pce_quarterly_sa

The package_data_name column contains the internal name of each dataset:

pce_monthly_sa
#> # A tibble: 784 × 3
#>     year month   pce
#>    <dbl> <dbl> <dbl>
#>  1  1959     1  15.2
#>  2  1959     2  15.2
#>  3  1959     3  15.2
#>  4  1959     4  15.2
#>  5  1959     5  15.2
#>  6  1959     6  15.3
#>  7  1959     7  15.3
#>  8  1959     8  15.3
#>  9  1959     9  15.4
#> 10  1959    10  15.4
#> # ℹ 774 more rows

You can also use get_price_index():

get_price_index("PCE", "monthly", "SA")
#> # A tibble: 784 × 3
#>     year month   pce
#>    <dbl> <dbl> <dbl>
#>  1  1959     1  15.2
#>  2  1959     2  15.2
#>  3  1959     3  15.2
#>  4  1959     4  15.2
#>  5  1959     5  15.2
#>  6  1959     6  15.3
#>  7  1959     7  15.3
#>  8  1959     8  15.3
#>  9  1959     9  15.4
#> 10  1959    10  15.4
#> # ℹ 774 more rows

Installation

# install.packages("devtools")
devtools::install_github("Economic/realtalk")

realtalk's People

Contributors

benzipperer avatar

Stargazers

 avatar  avatar  avatar

realtalk's Issues

create interactive table of available data

create interactive table of available data.

  • use ojs and quarto and reactable
    • filters for monthly, annual, and seasonally adjusted (greyed out for annual?)
  • switch documentation to altdoc (to allow quarto rendering)

Add seasonally adjusted versions

Of extended Chained CPI and CPIURS

Maybe also add seasonally adjusted versions of those series... (Or maybe not for simplicity)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.