Giter Site home page Giter Site logo

csp's Introduction

Introduction

Since the Correlates of State Policy project now provides their data in an easy-to-use CSV file, this package is deprecated. To read the data into R, just use:

uri <- "http://ippsr.msu.edu/sites/default/files/correlatesofstatepolicyprojectv2_1.csv"
csp <- read.csv(uri)
str(csp)

See their website for up-to-date information.

This package contains the Correlates of State Policy dataset version 1.11, which

โ€ฆ includes more than seven-hundred variables, with observations across the U.S. 50 > states and time (1900 โ€“ 2016). These variables represent policy outputs or > political, social, or economic factors that may influence policy differences > across the states. The codebook includes the variable name, a short description > of the variable, the variable time frame, a longer description of the variable, > and the variable source(s) and notes.

Suggested citation:

Jordan, Marty P. and Matt Grossmann. 2016. The Correlates of State Policy Project v.1.0. East Lansing, MI: Institute for Public Policy and Social Research (IPPSR).

The package allows the user to load and work with the dataset using the R programming language. Crucially, it incorporates the entire codebook into the dataset, which allows for easier filtering, finding units and sources, etc.

Example use

library(csp)
library(ggplot2)

data(csp, package = "csp")
dim(csp)
names(csp)
csp[1:2, ]
df <- subset(csp, variable == "real2_pc_inc_quar")
df$value <- as.numeric(df$value)

ggplot(df, aes(x = year, y = value, color = state)) +
  geom_line(show.legend = FALSE) +
  scale_color_grey() +
  theme_light() +
  labs(x = NULL, y = NULL,
       title = df$var_desc[1],
       subtitle = df$var_long_desc[1])

Disclaimer

This package is not affiliated with, nor endorsed by, the Correlates of State Policy Project. All credit go to the original authors, and questions should be directed to them. Please check the official website for further details on citations, etc.

csp's People

Contributors

expersso avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

csp's Issues

Allocation error

When I try to dim() or names() on the data, I get an allocation error. I'm running R 3.5.0 on Windows 10 64 bit.

> names(csp)
Error: cannot allocate vector of size 1.9 Gb
> dim(csp)
Error: cannot allocate vector of size 1.9 Gb
In addition: Warning message:
restarting interrupted promise evaluation 

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.