gssdata
Python client for General Social Survey (GSS) data.
Installation
pip install gssdata
Quick Start
import gssdata
# Get time series for a variable
df = gssdata.trend("NATEDUC")
print(df.head())
# year pct
# 0 1973 49
# 1 1974 52
# 2 1975 51
# ...
# List all available variables
variables = gssdata.variables()
print(len(variables)) # 17 core variables
# Get variable metadata
info = gssdata.info("NATEDUC")
print(info["question"])
# "Are we spending too much, too little, or about the right amount on education?"
print(info["responses"])
# {1: "Too little", 2: "About right", 3: "Too much"}
Features
- Simple API:
trend(),variables(),info()- that's it - Pre-computed trends: Fast access to time series for key variables
- Full metadata: Question text, response options, first year asked
Available Variables
The package includes 17 frequently-studied GSS variables spanning social attitudes, political views, and trust:
| Variable | Description |
|---|---|
| HOMOSEX | Attitudes toward same-sex relations |
| GRASS | Marijuana legalization support |
| PREMARSX | Premarital sex attitudes |
| ABANY | Abortion for any reason |
| FEPOL | Women suited for politics |
| CAPPUN | Death penalty opposition |
| GUNLAW | Gun permit support |
| NATRACE | Spending on race issues |
| NATEDUC | Spending on education |
| NATENVIR | Spending on environment |
| NATHEAL | Spending on health |
| EQWLTH | Government reduce inequality |
| HELPPOOR | Government help poor |
| TRUST | Social trust |
| FAIR | People try to be fair |
| POLVIEWS | Political ideology |
| PRAYER | School prayer ban approval |
Documentation
Full documentation: maxghenis.github.io/gss
License
MIT
Metadata
Release files for gssdata 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gssdata-0.1.1.tar.gz | 10.9 kB | Without provenance | Details for gssdata-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gssdata-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for gssdata-0.1.1-py3-none-any.whl |
Total release size: 19.2 kB
Release files / gssdata-0.1.1.tar.gz
| Download URL | gssdata-0.1.1.tar.gz |
|---|---|
| Size | 10.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9c13c12426840cf2189dc865568538fa78e12284013274db93b6b977ca960ef2
|
|
BLAKE2b-256 checksum How to use checksums |
f0d95e15454a806051ee029a8bbbf14123e745a49389d27ce693b93af759b664
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / gssdata-0.1.1-py3-none-any.whl
| Download URL | gssdata-0.1.1-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
601a35eeb8ef3bc9c6836afebc6a36a8ce743f5662719458c4f64f5e2be3d5c9
|
|
BLAKE2b-256 checksum How to use checksums |
10024b768eaaff85e03288524d04946181d7f6b3e94af747c58337c65aa82231
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for gssdata 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.