yang-policies
)
Andrew Yang's 2020 Policies (
A consumable JSON list of Andrew Yang's 2020 policies found on yang2020.com
Despite the tremendous amount of policies from Andrew Yang's campaign, I couldn't manage to find any API's providing this information. So I built this JSON list from a simple script that crawls and scrapes yang2020.com to create an JSON formatted list of Andrew Yang's policies to be used for any potential software projects.
Install
$ npm install yang-policies
Usage
The JSON file is located in /policies.json
, which can be downloaded and used externally.
const yangPolicies = ; yangPolicies0 // First Policy is The Freedom Dividend
API
yangPolicies
Returns JSON
list of all policies
yangPolicies.count
Returns number of Andrew Yang's policies
yangPolicies.featured()
Returns Andrew Yang's 3 big policies
Policy Object
Key | Type | Description | Example |
---|---|---|---|
title | string | Title of the policy | The Freedom Dividend |
url | string | Url to the policy page | https://www.yang2020.com/policies/the-freedom-dividend/ |
description | string | Description of policy | Andrew would implement the Freedom Dividend, a universal basic income of $1,000/month,... |
problems_to_be_solved | array | A list of problems to be solved by policy | [ "Approx. 40 million Americans live below the poverty line.", " "It is necessary to support and preserve a robust consumer economy."] |
goals | array | Goals to accomplish by policy | ["End poverty in the most direct manner possible: giving people money", "Allow people the freedom to switch jobs, move, innovate, and contribute to society"] |
as_president | string | Andrew Yang's as president message regarding policy | "As President, I will…\n\n Implement the Freedom Dividend, providing Universal Basic Income of $1,000/month to all American adults over the age of 18 so that we may all share in the prosperity we have contributed to and participate in the new economy."" |
citations | array | A list of additional citations | [{}] |
citations[0].author | string | Author of Citation | Thomas Paine, 1796 |
citations[0].quote | string | Quote of citation | "Out of a collected fund from landowners, “there shall be paid to every person…"..." |
excerpt | string | Excerpt regarding policy | "Universal Basic Income, or UBI, is a version of Social Security where all citizens..." |
Note, some fields are null or empty if not available.
Policy Example:
Contribute
Open to PR's to improve the JSON formatting, code quality, different file formats, tests, etc.
Build the JSON file with, npm run build-json
.
License
The use of this module falls under MIT, use it to build and progress the Yang Gang.
If it isn't apparent, actual policy content belongs to yang2020.com.