diff --git a/.gitignore b/.gitignore
index 11794c00a..72f953440 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,6 +29,7 @@ datausa
*.pyc
google_auth.json
+googleAnalyticsKey.json
# pm2 config
*.config.js
diff --git a/api/customAttributes.js b/api/customAttributes.js
index 8cae8d78e..c1c765169 100644
--- a/api/customAttributes.js
+++ b/api/customAttributes.js
@@ -33,22 +33,36 @@ module.exports = function(app) {
const retObj = {
breadcrumbs,
- freightYear: 2018,
+ freightYear: 2020,
neverShow: false,
+ tesseract: process.env.CANON_CONST_TESSERACT,
url: urls[id]
};
- if (dimension === "CIP") {
- retObj.stem = id.length === 6 ? stems.includes(id) ? "Stem Major" : false : "Contains Stem Majors"
- }
-
if (dimension === "Geography") {
+
+ const parentsElection = await axios.get(`${origin}/api/civic/senator/${id}`)
+ .then(resp => resp.data)
+ .catch(() => []);
+
+ retObj.parentsElection = parentsElection;
+
const state = breadcrumbs.find(d => d.hierarchy === "State");
+ const stateElection = parentsElection.map(d => d["ID State"]).reduce((acc,item)=>{
+ if(!acc.includes(item)){
+ acc.push(item);
+ }
+ return acc;
+ },[]);
+
retObj.stateId = state && ["Congressional District"].includes(hierarchy) ? state.id : id;
retObj.stateDataID = state && !["Nation", "State"].includes(hierarchy) ? state.id : id;
+ retObj.hierarchyElectionSub = ["Nation", "County"].includes(hierarchy) ? hierarchy : "State";
+ retObj.stateElectionId = ["Nation", "State", "County"].includes(hierarchy) ? id : stateElection.join(",");
+ retObj.electionCut = hierarchy === "Nation" ? `State` : hierarchy === "County" ? `County&State+County=${retObj.stateDataID}` : `County&State+County=${retObj.stateElectionId}`;
+ retObj.hierarchySub = hierarchy === "Nation" ? "State" : "County";
}
-
- if (dimension === "PUMS Industry") {
+ else if (dimension === "PUMS Industry") {
if (blsMonthlyIndustries[id]) {
retObj.blsMonthlyID = blsMonthlyIndustries[id];
retObj.blsMonthlyDimension = "Industry";
@@ -61,8 +75,9 @@ module.exports = function(app) {
retObj.blsMonthlyDimension = "Supersector";
}
}
-
- retObj.tesseract = process.env.CANON_CONST_TESSERACT;
+ else if (dimension === "CIP") {
+ retObj.stem = id.length === 6 ? stems.includes(id) ? "Stem Major" : false : "Contains Stem Majors"
+ }
return res.json(retObj);
diff --git a/api/homeRoute.js b/api/homeRoute.js
index 725b9950d..4c66f3cdb 100644
--- a/api/homeRoute.js
+++ b/api/homeRoute.js
@@ -1,4 +1,12 @@
const axios = require("axios");
+const {google} = require("googleapis");
+const analytics = google.analytics("v3");
+
+// configure an auth client
+const jwtClient = new google.auth.GoogleAuth({
+ keyFilename: process.env.GA_KEYFILE,
+ scopes: "https://www.googleapis.com/auth/analytics.readonly"
+});
const {CANON_API} = process.env;
@@ -8,6 +16,27 @@ module.exports = function(app) {
app.get("/api/home", async(req, res) => {
+ const mostVisited = await analytics.data.ga
+ .get({
+ "auth": jwtClient,
+ "dimensions": "ga:pagePath",
+ "ids": "ga:111999474",
+ "start-date": "30daysAgo",
+ "end-date": "yesterday",
+ "metrics": "ga:pageviews",
+ "sort": "-ga:pageviews"
+ })
+ .then(resp => resp.data.rows.filter(r => r[0].includes("/profile/")))
+ .then(rows => rows.reduce((obj, row) => {
+ const profile = row[0].split("/")[2];
+ if (profile !== "degree") {
+ if (!obj[profile]) obj[profile] = [];
+ if (obj[profile].length < 5) obj[profile].push(row[0].split("/")[3]);
+ }
+ return obj;
+ }, {}))
+ .catch(() => ({}));
+
const carousels = [];
const newProfiles = [
// "congressional-district-5-ga",
@@ -60,7 +89,7 @@ module.exports = function(app) {
]
});
- const geoSlugs = [
+ const geoSlugs = mostVisited.geo && mostVisited.geo.length === 5 ? mostVisited.geo : [
"california",
"welch-wv",
"new-york-ny",
@@ -90,7 +119,7 @@ module.exports = function(app) {
tiles: geos
});
- const indSlugs = [
+ const indSlugs = mostVisited.naics && mostVisited.naics.length === 5 ? mostVisited.naics : [
"oil-gas-extraction",
"finance-insurance",
"restaurants-food-services",
@@ -123,7 +152,7 @@ module.exports = function(app) {
tiles: industries
});
- const occSlugs = [
+ const occSlugs = mostVisited.soc && mostVisited.soc.length === 5 ? mostVisited.soc : [
"customer-service-representatives",
"police-officers",
"service-occupations",
@@ -153,7 +182,7 @@ module.exports = function(app) {
tiles: occupations
});
- const universitySlugs = [
+ const universitySlugs = mostVisited.university && mostVisited.university.length === 5 ? mostVisited.university : [
"harvard-university",
"university-of-washington-seattle-campus",
"university-of-california-los-angeles",
@@ -182,7 +211,7 @@ module.exports = function(app) {
tiles: universities
});
- const cipSlugs = [
+ const cipSlugs = mostVisited.cip && mostVisited.cip.length === 5 ? mostVisited.cip : [
"computer-science-110701",
"engineering",
"natural-resources-conservation",
diff --git a/app/d3plus.js b/app/d3plus.js
index 8059a4957..c9b63fd7b 100644
--- a/app/d3plus.js
+++ b/app/d3plus.js
@@ -150,6 +150,9 @@ export default {
}
},
color: colors.colorScaleGood,
+ colorMin: colors.colorScaleGood[0],
+ colorMid: colors.colorScaleGood[2],
+ colorMax: colors.colorScaleGood[4],
legendConfig: {
shapeConfig: {
labelConfig: {
diff --git a/app/pages/Home/index.jsx b/app/pages/Home/index.jsx
index 4327fa49e..fccd558d4 100644
--- a/app/pages/Home/index.jsx
+++ b/app/pages/Home/index.jsx
@@ -16,7 +16,7 @@ class Home extends Component {
super(props);
this.state = {
banner: new Date() < launch,
- image: "autumn"
+ image: "snow"
};
}
diff --git a/app/toCanon/topics/Column.jsx b/app/toCanon/topics/Column.jsx
index e74fa65f6..3829b63f7 100644
--- a/app/toCanon/topics/Column.jsx
+++ b/app/toCanon/topics/Column.jsx
@@ -41,7 +41,7 @@ class Column extends Component {
{ subtitles.map((content, i) =>
diff --git a/package-lock.json b/package-lock.json
index a57af8174..57b5e4991 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "datausa-site",
- "version": "3.1.6",
+ "version": "3.1.9",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -4771,19 +4771,19 @@
}
},
"d3plus-axis": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/d3plus-axis/-/d3plus-axis-1.0.1.tgz",
- "integrity": "sha512-hQtvOfaKKkcd+H2LN2tjCLJhPH10ldioYPlEp7QUPZQ4c2m721aMIh0aqqvGt+7ZkqRUATd/1EN/WyFU+hlidg==",
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/d3plus-axis/-/d3plus-axis-1.1.1.tgz",
+ "integrity": "sha512-h1Gw4wWkeYwc4mqpjv7FdWrYSwFMgCIBsvz978m/1neP310TQVen4PsqS0OFxlH3czH74yfbQguyYFFqXGgZHQ==",
"requires": {
"d3-array": "^2.12.1",
"d3-scale": "^3.3.0",
"d3-selection": "^2.0.0",
"d3-transition": "^2.0.0",
"d3plus-color": "^1.0.0",
- "d3plus-common": "^1.0.4",
- "d3plus-format": "^1.0.0",
- "d3plus-shape": "^1.0.3",
- "d3plus-text": "^1.0.1"
+ "d3plus-common": "^1.0.6",
+ "d3plus-format": "^1.1.1",
+ "d3plus-shape": "^1.0.4",
+ "d3plus-text": "^1.0.2"
}
},
"d3plus-color": {
@@ -4796,9 +4796,9 @@
}
},
"d3plus-common": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/d3plus-common/-/d3plus-common-1.0.4.tgz",
- "integrity": "sha512-DTR1cvpimd5FIUOVQEklX8zBtd6Mk0g5U8o5Z0maRQ2QzvSM+5Rpomts4xat9V4OiBRotq8J0hC0j6nSY9P8ug==",
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/d3plus-common/-/d3plus-common-1.1.0.tgz",
+ "integrity": "sha512-/hDCqL67VL1niVdALtzQFST+qmCj9dAmhAWcXqhLHrb/c4tetVcOTQCKoi76FJ5mHgP477OIBq+oupTSv6ZRtg==",
"requires": {
"d3-array": "^2.11.0",
"d3-collection": "^1.0.7",
@@ -4809,9 +4809,9 @@
}
},
"d3plus-export": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/d3plus-export/-/d3plus-export-1.0.0.tgz",
- "integrity": "sha512-xr5G1jJwYQInFam9Gq474r0hOHP0NJJ+QXWgEhCzl6wWBvnKpYCwcpJHGZO2MRlPQtvNWJbr80v4FBkma/jlkA==",
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/d3plus-export/-/d3plus-export-1.0.1.tgz",
+ "integrity": "sha512-UVVddXXtRSCtg/SYSQOc8Ya0BQbg5xH82KmkxL/3VIow4hrH70O3YLPtNhj2JFKr1dJLtkKpnqL3yfwR3fOETg==",
"requires": {
"canvas-toBlob": "^1.0.0",
"canvg-browser": "^1.0.0",
@@ -4828,11 +4828,13 @@
}
},
"d3plus-format": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/d3plus-format/-/d3plus-format-1.0.0.tgz",
- "integrity": "sha512-c/zXP/m0ETRHygjGlDUC52qHdd8lo1QyWeRHm6E6WaaOci6TbXqhoGKWM+iWPFLwM9QUlk9i9JKApzoYi09q1Q==",
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/d3plus-format/-/d3plus-format-1.1.1.tgz",
+ "integrity": "sha512-QJqHPQAseSbl+kiFBLXIgdZZFHOBrJck77pMdGJRpVuNBnZTuBFneOxVmhyyXU6qvJ/FtflSTObfqwJwPN0Emw==",
"requires": {
- "d3-format": "^2.0.0"
+ "d3-format": "^2.0.0",
+ "d3-time": "^2.1.1",
+ "d3-time-format": "^3.0.0"
}
},
"d3plus-geomap": {
@@ -4870,32 +4872,32 @@
}
},
"d3plus-legend": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/d3plus-legend/-/d3plus-legend-1.0.3.tgz",
- "integrity": "sha512-jt2vM8Dvasn/VWOfQUaV6tuwarA8dJbaznm9/wDXliGLgpJhMttNn5cz5APiavOlpJKeItiDWhFtDS3/jgxUNQ==",
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/d3plus-legend/-/d3plus-legend-1.1.1.tgz",
+ "integrity": "sha512-kZfR65kiThJeUdzw2NR9sQXEdJRR53EdCC2p1QcvGXSJyRpsQr9tv9e1mvwZXfAml6+xzIIYGiNCkPe4yCh2zA==",
"requires": {
"d3-array": "^2.11.0",
"d3-scale": "^3.2.3",
"d3-selection": "^2.0.0",
- "d3plus-axis": "^1.0.0",
+ "d3plus-axis": "^1.1.1",
"d3plus-color": "^1.0.0",
- "d3plus-common": "^1.0.2",
- "d3plus-shape": "^1.0.3",
- "d3plus-text": "^1.0.1"
+ "d3plus-common": "^1.1.0",
+ "d3plus-shape": "^1.0.6",
+ "d3plus-text": "^1.0.2"
}
},
"d3plus-matrix": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/d3plus-matrix/-/d3plus-matrix-1.0.3.tgz",
- "integrity": "sha512-vI+/CAAynN57L6Tku7s9PwmPHIas2z+FI3TG0rfdPiCaW5eapaX4my6Jmrt299DqM4CLeREm+Koj+tXxcHePxA==",
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/d3plus-matrix/-/d3plus-matrix-1.1.0.tgz",
+ "integrity": "sha512-y8aGjEcb+GBheUfHhaDTjo2m+0GWXZNAnrtsLeNaPv3jK4aHcNNCjSuNZ3TZm8VlXcy8G2SpYwskky75GF0TiA==",
"requires": {
"d3-array": "^2.11.0",
"d3-shape": "^2.0.0",
- "d3plus-axis": "^1.0.0",
- "d3plus-common": "^1.0.2",
- "d3plus-shape": "^1.0.1",
- "d3plus-text": "^1.0.1",
- "d3plus-viz": "^1.0.3"
+ "d3plus-axis": "^1.1.1",
+ "d3plus-common": "^1.1.0",
+ "d3plus-shape": "^1.0.6",
+ "d3plus-text": "^1.0.2",
+ "d3plus-viz": "^1.2.0"
}
},
"d3plus-network": {
@@ -4913,20 +4915,21 @@
}
},
"d3plus-plot": {
- "version": "1.0.11",
- "resolved": "https://registry.npmjs.org/d3plus-plot/-/d3plus-plot-1.0.11.tgz",
- "integrity": "sha512-RqMLxJHCB4LO8x9OmBbwR6A4dzr4zp8lq93mwaZkRt8TIYZoKhMb2Ea4Lp/zPO+yxZl9d0TTb6Rb1rrhaGwU5g==",
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/d3plus-plot/-/d3plus-plot-1.1.0.tgz",
+ "integrity": "sha512-ASpiryBVf/AVouXRVmcgibz/WYEm5vAiK7gNM7zqLXkCoHVh/OIIz3aIgXMRmp/AtqDdsnYMDosMDT2AOqPpJQ==",
"requires": {
"d3-array": "^2.12.1",
"d3-collection": "^1.0.7",
"d3-scale": "^3.3.0",
"d3-selection": "^2.0.0",
"d3-shape": "^2.1.0",
- "d3plus-axis": "^1.0.1",
+ "d3plus-axis": "^1.1.1",
"d3plus-color": "^1.0.0",
- "d3plus-common": "^1.0.4",
- "d3plus-shape": "^1.0.3",
- "d3plus-viz": "^1.0.8"
+ "d3plus-common": "^1.0.6",
+ "d3plus-format": "^1.1.1",
+ "d3plus-shape": "^1.0.4",
+ "d3plus-viz": "^1.0.11"
}
},
"d3plus-priestley": {
@@ -4944,24 +4947,24 @@
}
},
"d3plus-react": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/d3plus-react/-/d3plus-react-1.0.0.tgz",
- "integrity": "sha512-00FY7jhYy8Kg3xQyp2Lr0N5GDIBajm802yCE0RyIE5iTGRlI2huLEBfuZYkFItUWIeS27DWs9ol/df+M91pRvg==",
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/d3plus-react/-/d3plus-react-1.1.1.tgz",
+ "integrity": "sha512-PvHdy3LCEn/ekJCiycATHvLfS7E5DqghVbqWO5Fmrz+/GIq4R1+7+ITSDuzjM845jM+OHMZuk3rOyHJ54IUSqQ==",
"requires": {
- "d3plus-common": "^1.0.2",
+ "d3plus-common": "^1.0.6",
"d3plus-geomap": "^1.0.0",
- "d3plus-hierarchy": "^1.0.0",
- "d3plus-matrix": "^1.0.0",
- "d3plus-network": "^1.0.0",
- "d3plus-plot": "^1.0.0",
+ "d3plus-hierarchy": "^1.0.1",
+ "d3plus-matrix": "^1.0.3",
+ "d3plus-network": "^1.0.2",
+ "d3plus-plot": "^1.1.0",
"d3plus-priestley": "^1.0.0",
- "d3plus-viz": "^1.0.3"
+ "d3plus-viz": "^1.1.0"
}
},
"d3plus-shape": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/d3plus-shape/-/d3plus-shape-1.0.3.tgz",
- "integrity": "sha512-ArhgU+FtZPJ9pWBS553UKvP57b2jPjQkp85vnnMe6LJyamEf/3rBc1YxYRHw7oLEMRT9l58WxMuceA1je3uKsw==",
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/d3plus-shape/-/d3plus-shape-1.0.6.tgz",
+ "integrity": "sha512-HMpht2+sL184du2iVA4NDUFqGOH9P4HSrDp1hhYmbqn+hoecRCV5HV+OOGKfFKK+Bv8GQRDlLkYvRbiMdhYIEA==",
"requires": {
"d3-array": "^2.11.0",
"d3-collection": "^1.0.7",
@@ -4972,14 +4975,14 @@
"d3-shape": "^2.0.0",
"d3-transition": "^2.0.0",
"d3plus-color": "^1.0.0",
- "d3plus-common": "^1.0.0",
- "d3plus-text": "^1.0.1"
+ "d3plus-common": "^1.0.6",
+ "d3plus-text": "^1.0.2"
}
},
"d3plus-text": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/d3plus-text/-/d3plus-text-1.0.1.tgz",
- "integrity": "sha512-kDQ0rNaWNiD4i5Xcbzx3Df5/XNuVmzOmnaWBW4mZESlgqCQdRoNymm0cGj4/ZmVLlHhkQIDYy/JvvIRi1AJjog==",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/d3plus-text/-/d3plus-text-1.0.2.tgz",
+ "integrity": "sha512-bcg71Ggii/NJAKvM4O+UfT/OCDsD2lcdczZXg6vh6v7t/5mhfWdT3bgjjSxMiruIKYNAaDil664Li9WcxRQeyw==",
"requires": {
"d3-array": "^2.11.0",
"d3-selection": "^2.0.0",
@@ -5000,9 +5003,9 @@
}
},
"d3plus-tooltip": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/d3plus-tooltip/-/d3plus-tooltip-1.0.0.tgz",
- "integrity": "sha512-1SYZyV4P5pZ4HeggEAbivNkul2GSqPZEaIOBv39xzcQsp5ZiB65jPZX46p29XXUu7aVhGKp3XG6UGmHjKyKnYg==",
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/d3plus-tooltip/-/d3plus-tooltip-1.0.1.tgz",
+ "integrity": "sha512-dAheGgBa5tDzwiq4sOVae5+veRVDZoLMX+4umtD2y//BZzURl1rDO4C1BpcuVH6EwCej8KqTO1tfwP2Bm1vh5w==",
"requires": {
"@popperjs/core": "^2.6.0",
"d3-selection": "^2.0.0",
@@ -5011,9 +5014,9 @@
}
},
"d3plus-viz": {
- "version": "1.0.9",
- "resolved": "https://registry.npmjs.org/d3plus-viz/-/d3plus-viz-1.0.9.tgz",
- "integrity": "sha512-qsOTz3GIvRF9Jtb8dTN4e6Lf+58SDajghB+Wfy81ngB5Z0sj+dm+55uVDlXhd/yUlQCzSm2IwFeArPUqhN2Zvw==",
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/d3plus-viz/-/d3plus-viz-1.2.0.tgz",
+ "integrity": "sha512-8Qw6Hz3pk2jDwH+H5tJgwptApu3LTmvp50/a1+HzVyw0XEDZ0UEBLz2UGxSMkmFAU6zU/H1axMV+s/aoupNlOw==",
"requires": {
"d3-array": "^2.11.0",
"d3-brush": "^2.1.0",
@@ -5022,15 +5025,15 @@
"d3-request": "^1.0.6",
"d3-selection": "^2.0.0",
"d3-zoom": "^2.0.0",
- "d3plus-axis": "^1.0.0",
+ "d3plus-axis": "^1.1.1",
"d3plus-color": "^1.0.0",
- "d3plus-common": "^1.0.2",
- "d3plus-export": "^1.0.0",
- "d3plus-format": "^1.0.0",
- "d3plus-legend": "^1.0.2",
- "d3plus-text": "^1.0.1",
+ "d3plus-common": "^1.1.0",
+ "d3plus-export": "^1.0.1",
+ "d3plus-format": "^1.1.1",
+ "d3plus-legend": "^1.0.3",
+ "d3plus-text": "^1.0.2",
"d3plus-timeline": "^1.0.0",
- "d3plus-tooltip": "^1.0.0",
+ "d3plus-tooltip": "^1.0.1",
"lrucache": "^1.0.3"
}
},
@@ -7618,6 +7621,42 @@
}
}
},
+ "googleapis": {
+ "version": "92.0.0",
+ "resolved": "https://registry.npmjs.org/googleapis/-/googleapis-92.0.0.tgz",
+ "integrity": "sha512-5HgJg7XvqEEJ+GO+2gvnzd5cAcDuSS/VB6nW7thoyj2GMq9nH4VvJwncSevinjLCnv06a+VSxrXNiL5vePHojA==",
+ "requires": {
+ "google-auth-library": "^7.0.2",
+ "googleapis-common": "^5.0.2"
+ }
+ },
+ "googleapis-common": {
+ "version": "5.0.5",
+ "resolved": "https://registry.npmjs.org/googleapis-common/-/googleapis-common-5.0.5.tgz",
+ "integrity": "sha512-o2dgoW4x4fLIAN+IVAOccz3mEH8Lj1LP9c9BSSvkNJEn+U7UZh0WSr4fdH08x5VH7+sstIpd1lOYFZD0g7j4pw==",
+ "requires": {
+ "extend": "^3.0.2",
+ "gaxios": "^4.0.0",
+ "google-auth-library": "^7.0.2",
+ "qs": "^6.7.0",
+ "url-template": "^2.0.8",
+ "uuid": "^8.0.0"
+ },
+ "dependencies": {
+ "gaxios": {
+ "version": "4.3.2",
+ "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-4.3.2.tgz",
+ "integrity": "sha512-T+ap6GM6UZ0c4E6yb1y/hy2UB6hTrqhglp3XfmU9qbLCGRYhLVV5aRPpC4EmoG8N8zOnkYCgoBz+ScvGAARY6Q==",
+ "requires": {
+ "abort-controller": "^3.0.0",
+ "extend": "^3.0.2",
+ "https-proxy-agent": "^5.0.0",
+ "is-stream": "^2.0.0",
+ "node-fetch": "^2.6.1"
+ }
+ }
+ }
+ },
"graceful-fs": {
"version": "4.2.6",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz",
@@ -15656,6 +15695,11 @@
"schema-utils": "^2.5.0"
}
},
+ "url-template": {
+ "version": "2.0.8",
+ "resolved": "https://registry.npmjs.org/url-template/-/url-template-2.0.8.tgz",
+ "integrity": "sha1-/FZaPMy/93MMd19WQflVV5FDnyE="
+ },
"urllite": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/urllite/-/urllite-0.5.0.tgz",
diff --git a/package.json b/package.json
index dc6b5fcbb..4f921c324 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "datausa-site",
- "version": "3.1.9",
+ "version": "3.1.10",
"description": "The most comprehensive visualization of U.S. public data",
"main": "src/index.js",
"scripts": {
@@ -44,6 +44,7 @@
"eslint": "^7.28.0",
"flickr-sdk": "^3.7.0",
"google-spreadsheet": "^3.1.15",
+ "googleapis": "^92.0.0",
"jsdoc-to-markdown": "^4.0.1",
"jszip": "^3.1.5",
"katex": "^0.9.0",
diff --git a/scripts/candidateImage.js b/scripts/candidateImage.js
index 487ae4f27..bfa3cc064 100644
--- a/scripts/candidateImage.js
+++ b/scripts/candidateImage.js
@@ -20,7 +20,8 @@ if (!cube || !accepted.includes(cube)) {
const predefined = {
"George Bush": "George H. W. Bush",
"George Walker Bush": "George W. Bush",
- "Rafael Edward Ted Cruz": "Ted Cruz"
+ "Rafael Edward Ted Cruz": "Ted Cruz",
+ "Joseph R Biden Jr.": "Joe Biden"
};
const matchWords = [
@@ -47,8 +48,8 @@ function matches(str) {
return match;
}
-const {CANON_LOGICLAYER_CUBE} = process.env;
-const prefix = `${CANON_LOGICLAYER_CUBE}${CANON_LOGICLAYER_CUBE.slice(-1) === "/" ? "" : "/"}`;
+const {CANON_CONST_TESSERACT} = process.env;
+const prefix = CANON_CONST_TESSERACT;
const throttle = new PromiseThrottle({
requestsPerSecond: 5,
@@ -156,20 +157,31 @@ async function fetchImage(member) {
}
}
+const dictUrl = {
+ "president": ["President", "Candidate+Votes"],
+ "senate": ["Senate", "Candidate+Votes"],
+ "house": ["House_Compact", "Winner+Votes"]
+};
-const url = `${prefix}cubes/election_${cube}/dimensions/Candidate/hierarchies/Candidate/levels/Candidate/members`;
+const url = `${prefix}tesseract/data?cube=Data_USA_${dictUrl[cube][0]}_election&drilldowns=Candidate&measures=${dictUrl[cube][1]}`
/** */
async function run() {
const members = await axios.get(url)
- .then(resp => resp.data.members)
+ .then(resp => resp.data.data)
.catch(err => {
console.error(`Error fetching members: ${err}`);
return [];
});
+ members.forEach(d => {
+ d.name = d.Candidate || d["Winning Canidate"]
+ d.key = d["Canidate ID"] || d["Winning Canidate ID"]
+ });
+
total = members.length;
+
if (!total) shell.exit(1);
console.log(`${total} total candidates in database`);
@@ -177,9 +189,10 @@ async function run() {
members
// .slice(0, 1)
- .filter(member => member.name === "Rafael Edward Ted Cruz")
+ //.filter(member => member.name === "Joseph R Biden Jr.")
.filter(member => {
const filePath = getFileName(member);
+
if (shell.test("-e", filePath)) {
checked++;
return false;
diff --git a/static/data/colors.json b/static/data/colors.json
index c5db37862..e1e8761ae 100644
--- a/static/data/colors.json
+++ b/static/data/colors.json
@@ -25,6 +25,12 @@
"Female": "#CA3434",
"Women": "#CA3434"
},
+ "Sex": {
+ "Male": "#1A3E61",
+ "Men": "#1A3E61",
+ "Female": "#CA3434",
+ "Women": "#CA3434"
+ },
"ACS Race": {
"0": "#004374",
"1": "#ff8166",
@@ -181,15 +187,16 @@
"5": "#2f1fc1"
},
"Sector": {
- "1": "#ffd3a6",
- "2": "#72f5c4",
- "3": "#17c0c0",
- "4": "#ff8166",
- "5": "#1fc1ad",
- "6": "#2e6695",
- "7": "#d1685e",
- "8": "#2b5652",
- "9": "#33425b"
+ "0": "#AC4BAE",
+ "1": "#FAA34A",
+ "2": "#8BC84D",
+ "3": "#398059",
+ "4": "#FF8166",
+ "5": "#4CA3B6",
+ "6": "#2C689B",
+ "7": "#FFCD33",
+ "8": "#308984",
+ "9": "#453A8B"
},
"Skill Element Group": {
"2.A.1": "#336a81",
diff --git a/static/data/representatives.json b/static/data/representatives.json
index 73d7e786e..453b09741 100644
--- a/static/data/representatives.json
+++ b/static/data/representatives.json
@@ -338,10 +338,7 @@
{
"District": "22",
"State": "California",
- "Member": "Devin Nunes",
- "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/8/8c/Devin_Nunes_%28cropped%29.jpg/75px-Devin_Nunes_%28cropped%29.jpg",
- "Party": "Republican",
- "Assumed office": "2003"
+ "Member": "VACANT"
},
{
"District": "23",
@@ -523,7 +520,7 @@
"District": "45",
"State": "California",
"Member": "Katie Porter",
- "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/4/40/Katie_Porter%2C_official_portrait%2C_116th_Congress_%28cropped%29.jpg/75px-Katie_Porter%2C_official_portrait%2C_116th_Congress_%28cropped%29.jpg",
+ "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/1/1c/Katie_Porter_Official_Portrait_%28cropped%29.jpg/75px-Katie_Porter_Official_Portrait_%28cropped%29.jpg",
"Party": "Democratic",
"Assumed office": "2019"
},
@@ -1144,7 +1141,7 @@
"District": "12",
"State": "Illinois",
"Member": "Mike Bost",
- "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/5/59/Mike_Bost_official_photo_%28cropped%29.jpg/75px-Mike_Bost_official_photo_%28cropped%29.jpg",
+ "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/4/46/Rep._Mike_Bost_official_photo%2C_117th_Congress.jpg/75px-Rep._Mike_Bost_official_photo%2C_117th_Congress.jpg",
"Party": "Republican",
"Assumed office": "2015"
},
@@ -1336,7 +1333,7 @@
"District": "1",
"State": "Kentucky",
"Member": "James Comer",
- "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/9/98/James_Comer_official_congressional_photo_%28cropped%29.jpg/75px-James_Comer_official_congressional_photo_%28cropped%29.jpg",
+ "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/0/03/Rep._James_Comer.jpg/75px-Rep._James_Comer.jpg",
"Party": "Republican",
"Assumed office": "2016"
},
@@ -1704,7 +1701,7 @@
"District": "2",
"State": "Minnesota",
"Member": "Angie Craig",
- "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/8/80/Angie_Craig%2C_official_portrait%2C_116th_Congress_%28cropped%29.jpg/75px-Angie_Craig%2C_official_portrait%2C_116th_Congress_%28cropped%29.jpg",
+ "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Angie_Craig_117th_Congress_%28cropped%29.jpg/75px-Angie_Craig_117th_Congress_%28cropped%29.jpg",
"Party": "Democratic",
"Assumed office": "2019"
},
@@ -1776,7 +1773,7 @@
"District": "3",
"State": "Mississippi",
"Member": "Michael Guest",
- "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/b/b7/Michael_Guest%2C_official_portrait%2C_116th_Congress_%28cropped_2%29.jpg/75px-Michael_Guest%2C_official_portrait%2C_116th_Congress_%28cropped_2%29.jpg",
+ "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/b/b5/Rep._Michael_Guest_official_photo2.jpg/75px-Rep._Michael_Guest_official_photo2.jpg",
"Party": "Republican",
"Assumed office": "2019"
},
@@ -1800,7 +1797,7 @@
"District": "2",
"State": "Missouri",
"Member": "Ann Wagner",
- "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/8/88/Ann_Wagner_113th_Congress_official_photo_%28cropped%29.jpg/75px-Ann_Wagner_113th_Congress_official_photo_%28cropped%29.jpg",
+ "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/Ann_Wagner_Headshot_%28002%29_%28cropped%29.jpg/75px-Ann_Wagner_Headshot_%28002%29_%28cropped%29.jpg",
"Party": "Republican",
"Assumed office": "2013"
},
@@ -1872,7 +1869,7 @@
"District": "2",
"State": "Nebraska",
"Member": "Don Bacon",
- "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/e/ea/Donald_Bacon_Official_House_Photo_%28cropped%29.jpg/75px-Donald_Bacon_Official_House_Photo_%28cropped%29.jpg",
+ "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/8/88/Don_Bacon_117th_Congress.jpg/75px-Don_Bacon_117th_Congress.jpg",
"Party": "Republican",
"Assumed office": "2017"
},
@@ -1904,7 +1901,7 @@
"District": "3",
"State": "Nevada",
"Member": "Susie Lee",
- "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/a/ad/Susie_Lee%2C_official_portrait%2C_116th_Congress_%28cropped%29.jpg/75px-Susie_Lee%2C_official_portrait%2C_116th_Congress_%28cropped%29.jpg",
+ "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/4/47/U.S._Representative_Susie_Lee%2C_117th_Congress.jpg/75px-U.S._Representative_Susie_Lee%2C_117th_Congress.jpg",
"Party": "Democratic",
"Assumed office": "2019"
},
@@ -2104,7 +2101,7 @@
"District": "7",
"State": "New York",
"Member": "Nydia Velázquez",
- "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/9/92/Nydia_Vel%C3%A1zquez_oficial_portrait_%28cropped%29.jpg/75px-Nydia_Vel%C3%A1zquez_oficial_portrait_%28cropped%29.jpg",
+ "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/2/2c/Nydia_Vel%C3%A1zquez_official_portrait_%28cropped%29.jpg/75px-Nydia_Vel%C3%A1zquez_official_portrait_%28cropped%29.jpg",
"Party": "Democratic",
"Assumed office": "1993"
},
@@ -2192,7 +2189,7 @@
"District": "18",
"State": "New York",
"Member": "Sean Patrick Maloney",
- "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/de/Congressman_Maloney_official_%28cropped%29.jpg/75px-Congressman_Maloney_official_%28cropped%29.jpg",
+ "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/4/44/Congressman_Sean_Patrick_Maloney_official_portrait_%28cropped%29.jpg/75px-Congressman_Sean_Patrick_Maloney_official_portrait_%28cropped%29.jpg",
"Party": "Democratic",
"Assumed office": "2013"
},
@@ -2463,7 +2460,10 @@
{
"District": "11",
"State": "Ohio",
- "Member": "VACANT"
+ "Member": "Shontel Brown",
+ "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/0/03/Shontel_Brown%2C_Official_Portrait_-_117th_Congress.jpg/75px-Shontel_Brown%2C_Official_Portrait_-_117th_Congress.jpg",
+ "Party": "Democratic",
+ "Assumed office": "2021"
},
{
"District": "12",
@@ -2492,13 +2492,16 @@
{
"District": "15",
"State": "Ohio",
- "Member": "VACANT"
+ "Member": "Mike Carey",
+ "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/9/96/Mike_Carey_117th_Congress.jpg/75px-Mike_Carey_117th_Congress.jpg",
+ "Party": "Republican",
+ "Assumed office": "2021"
},
{
"District": "16",
"State": "Ohio",
"Member": "Anthony Gonzalez",
- "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/8/82/Anthony_Gonzalez%2C_official_portrait%2C_116th_Congress_%28cropped_2%29.jpg/75px-Anthony_Gonzalez%2C_official_portrait%2C_116th_Congress_%28cropped_2%29.jpg",
+ "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/7/75/Anthony_Gonzalez%2C_official_portrait%2C_116th_Congress_2.jpg/75px-Anthony_Gonzalez%2C_official_portrait%2C_116th_Congress_2.jpg",
"Party": "Republican",
"Assumed office": "2019"
},
@@ -2522,7 +2525,7 @@
"District": "3",
"State": "Oklahoma",
"Member": "Frank Lucas",
- "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/f/f0/Frank_Lucas_%28cropped%29.jpg/75px-Frank_Lucas_%28cropped%29.jpg",
+ "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Rep._Frank_Lucas_Official_Photo.png/75px-Rep._Frank_Lucas_Official_Photo.png",
"Party": "Republican",
"Assumed office": "1994"
},
@@ -2530,7 +2533,7 @@
"District": "4",
"State": "Oklahoma",
"Member": "Tom Cole",
- "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/8/82/Tom_Cole_official_congressional_photo_%28cropped%29.jpg/75px-Tom_Cole_official_congressional_photo_%28cropped%29.jpg",
+ "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/8/8e/Rep-Tom-Cole-117thCong.jpeg/75px-Rep-Tom-Cole-117thCong.jpeg",
"Party": "Republican",
"Assumed office": "2003"
},
@@ -2538,7 +2541,7 @@
"District": "5",
"State": "Oklahoma",
"Member": "Stephanie Bice",
- "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/4/44/Stephanie_Bice_117th_U.S_Congress_%28cropped%29.jpg/75px-Stephanie_Bice_117th_U.S_Congress_%28cropped%29.jpg",
+ "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/df/Rep._Stephanie_Bice%2C_117th_Congress.jpg/75px-Rep._Stephanie_Bice%2C_117th_Congress.jpg",
"Party": "Republican",
"Assumed office": "2021"
},
@@ -2666,7 +2669,7 @@
"District": "11",
"State": "Pennsylvania",
"Member": "Lloyd Smucker",
- "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/2/2f/Lloyd_Smucker_official_congressional_photo_%28cropped%29.jpg/75px-Lloyd_Smucker_official_congressional_photo_%28cropped%29.jpg",
+ "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/4/48/Lloyd_Smucker_Official_Congressional_Photo.jpg/75px-Lloyd_Smucker_Official_Congressional_Photo.jpg",
"Party": "Republican",
"Assumed office": "2017"
},
@@ -2922,7 +2925,7 @@
"District": "6",
"State": "Texas",
"Member": "Jake Ellzey",
- "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/e/ef/U.S._Representative%2C_Jake_Ellzey_%28cropped%29.jpg/75px-U.S._Representative%2C_Jake_Ellzey_%28cropped%29.jpg",
+ "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/c/cd/Jake_Ellzey_Official_Portrait_-_117th_Congress.jpg/75px-Jake_Ellzey_Official_Portrait_-_117th_Congress.jpg",
"Party": "Republican",
"Assumed office": "2021"
},
@@ -3010,7 +3013,7 @@
"District": "17",
"State": "Texas",
"Member": "Pete Sessions",
- "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/f/f7/Pete_Sessions_Congressional_ID_photo_117.jpg/75px-Pete_Sessions_Congressional_ID_photo_117.jpg",
+ "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/2/29/Pete_Sessions.jpg/75px-Pete_Sessions.jpg",
"Party": "Republican",
"Assumed office": "2021"
},
@@ -3210,7 +3213,7 @@
"District": "1",
"State": "Virginia",
"Member": "Rob Wittman",
- "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/6/6f/Rob_Wittman_116th_Congress_%28cropped%29.jpg/75px-Rob_Wittman_116th_Congress_%28cropped%29.jpg",
+ "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/5/5b/Rob_Wittman_117th_Congress.jpeg/75px-Rob_Wittman_117th_Congress.jpeg",
"Party": "Republican",
"Assumed office": "2007"
},
@@ -3354,7 +3357,7 @@
"District": "8",
"State": "Washington",
"Member": "Kim Schrier",
- "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/5/51/Kim_Schrier%2C_official_portrait%2C_116th_Congress_%28cropped%29.jpg/75px-Kim_Schrier%2C_official_portrait%2C_116th_Congress_%28cropped%29.jpg",
+ "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/1/18/Kim_Schrier_Official_Portrait_116th_Congress.jpg/75px-Kim_Schrier_Official_Portrait_116th_Congress.jpg",
"Party": "Democratic",
"Assumed office": "2019"
},
@@ -3434,7 +3437,7 @@
"District": "5",
"State": "Wisconsin",
"Member": "Scott Fitzgerald",
- "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/5/52/Scott_Fitzgerald_117th_Congress_portrait_%28cropped%29.jpg/75px-Scott_Fitzgerald_117th_Congress_portrait_%28cropped%29.jpg",
+ "Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/b/bb/Scott_Fitzgerald_Official_Portrait_%28cropped%29.jpg/75px-Scott_Fitzgerald_Official_Portrait_%28cropped%29.jpg",
"Party": "Republican",
"Assumed office": "2021"
},
diff --git a/static/data/senators.json b/static/data/senators.json
index 6cae8214f..2961c7d82 100644
--- a/static/data/senators.json
+++ b/static/data/senators.json
@@ -4,6 +4,7 @@
"Image": "https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Richard_Shelby%2C_official_portrait%2C_112th_Congress_%28cropped%29.jpg/95px-Richard_Shelby%2C_official_portrait%2C_112th_Congress_%28cropped%29.jpg",
"Senator": "Richard Shelby",
"Party": "Republican",
+ "note": "Until 1994, Richard Shelby won election to the Senate as a member of the Democratic Party.",
"Assumed office": "January 3, 1987",
"Term up": "2022"
},
@@ -21,7 +22,7 @@
"Senator": "Lisa Murkowski",
"Party": "Republican",
"Assumed office": "December 20, 2002",
- "note": "Appointed to the seat following the resignation of her father Frank Murkowski, who had become List of Governors of Alaska|Governor of Alaska.",
+ "note": "Appointed to the seat following the resignation of her father Frank Murkowski, who was elected List of Governors of Alaska|Governor of Alaska.",
"Term up": "2022"
},
{
@@ -71,7 +72,7 @@
"Senator": "Dianne Feinstein",
"Party": "Democratic",
"Assumed office": "November 10, 1992",
- "note": "Elected to the seat to succeed John Seymour (California politician)|John Seymour, who had been appointed to the seat after Pete Wilson elected Governor of California.",
+ "note": "Elected to the seat to succeed John Seymour (California politician)|John Seymour, who had been appointed to the seat after Pete Wilson was elected Governor of California.",
"Term up": "2024"
},
{
@@ -163,7 +164,7 @@
"Senator": "Raphael Warnock",
"Party": "Democratic",
"Assumed office": "January 20, 2021",
- "note": "Elected to the seat to succeed Kelly Loeffler, who had been appointed to the seat following Johnny Isakson's resignation.",
+ "note": "Elected to the seat to succeed Kelly Loeffler, who had been appointed to the seat following the resignation of Johnny Isakson.",
"Term up": "2022",
"State": "Georgia"
},
@@ -341,7 +342,7 @@
"Senator": "Ed Markey",
"Party": "Democratic",
"Assumed office": "July 16, 2013",
- "note": "Elected to the seat to succeed Mo Cowan, who had been appointed to replace John Kerry, who had become Secretary of State.",
+ "note": "Elected to the seat to succeed Mo Cowan, who had been appointed to the seat following the resignation of John Kerry, who had become Secretary of State.",
"Term up": "2026",
"State": "Massachusetts"
},
@@ -374,7 +375,7 @@
"Senator": "Tina Smith",
"Party": "Democratic",
"Assumed office": "January 3, 2018",
- "note": "Appointed to the seat after Al Franken's resignation.",
+ "note": "Appointed to the seat following the resignation of Al Franken.",
"Term up": "2026",
"State": "Minnesota"
},
@@ -392,7 +393,7 @@
"Senator": "Cindy Hyde-Smith",
"Party": "Republican",
"Assumed office": "April 9, 2018",
- "note": "Appointed to the seat after Thad Cochran's resignation.",
+ "note": "Appointed to the seat following the resignation of Thad Cochran.",
"Term up": "2026",
"State": "Mississippi"
},
@@ -482,7 +483,7 @@
"Senator": "Bob Menendez",
"Party": "Democratic",
"Assumed office": "January 17, 2006",
- "note": "Appointed to the seat following the resignation of Jon Corzine, who had become Governor of New Jersey.",
+ "note": "Appointed to the seat following the resignation of Jon Corzine, who was elected Governor of New Jersey.",
"Term up": "2024"
},
{
@@ -589,7 +590,7 @@
"Senator": "James Lankford",
"Party": "Republican",
"Assumed office": "January 3, 2015",
- "note": "Elected to the seat to succeed Tom Coburn, who had to resign at the eve of 113th United States Congress|113th Congress.",
+ "note": "Elected to the seat following the resignation of Tom Coburn.",
"Term up": "2022",
"State": "Oklahoma"
},
@@ -697,6 +698,7 @@
"Senator": "John Cornyn",
"Party": "Republican",
"Assumed office": "December 2, 2002",
+ "note": "Phil Gramm resigned (effective November 30, 2002) a few weeks before the expiration of his term in hopes that his successor, fellow Republican John Cornyn, could gain seniority over other newly elected senators. However, Cornyn did not gain additional seniority due to a 1980 Rules Committee policy.",
"Term up": "2026"
},
{
diff --git a/static/icons/visualizations/administrative.svg b/static/icons/visualizations/administrative.svg
new file mode 100644
index 000000000..966756545
--- /dev/null
+++ b/static/icons/visualizations/administrative.svg
@@ -0,0 +1,3 @@
+
diff --git a/static/icons/visualizations/private.svg b/static/icons/visualizations/private.svg
new file mode 100644
index 000000000..04ba49846
--- /dev/null
+++ b/static/icons/visualizations/private.svg
@@ -0,0 +1,3 @@
+
diff --git a/static/icons/visualizations/public.svg b/static/icons/visualizations/public.svg
new file mode 100644
index 000000000..68233d5f6
--- /dev/null
+++ b/static/icons/visualizations/public.svg
@@ -0,0 +1,3 @@
+
diff --git a/static/images/candidates/president/P00010124.jpg b/static/images/candidates/president/P00010124.jpg
new file mode 100644
index 000000000..ddae36e7e
Binary files /dev/null and b/static/images/candidates/president/P00010124.jpg differ
diff --git a/static/images/candidates/president/P00012039.jpg b/static/images/candidates/president/P00012039.jpg
new file mode 100644
index 000000000..0d73fb20d
Binary files /dev/null and b/static/images/candidates/president/P00012039.jpg differ
diff --git a/static/images/candidates/president/P00012211.jpg b/static/images/candidates/president/P00012211.jpg
new file mode 100644
index 000000000..d152105ab
Binary files /dev/null and b/static/images/candidates/president/P00012211.jpg differ
diff --git a/static/images/candidates/president/P00013524.jpg b/static/images/candidates/president/P00013524.jpg
new file mode 100644
index 000000000..9cf096734
Binary files /dev/null and b/static/images/candidates/president/P00013524.jpg differ
diff --git a/static/images/candidates/president/P00013771.jpg b/static/images/candidates/president/P00013771.jpg
new file mode 100644
index 000000000..d1c0fc0a7
Binary files /dev/null and b/static/images/candidates/president/P00013771.jpg differ
diff --git a/static/images/candidates/president/P00014209.jpg b/static/images/candidates/president/P00014209.jpg
new file mode 100644
index 000000000..5922809b7
Binary files /dev/null and b/static/images/candidates/president/P00014209.jpg differ
diff --git a/static/images/candidates/president/P00014522.jpg b/static/images/candidates/president/P00014522.jpg
new file mode 100644
index 000000000..0c1ccc236
Binary files /dev/null and b/static/images/candidates/president/P00014522.jpg differ
diff --git a/static/images/candidates/president/P00015537.jpg b/static/images/candidates/president/P00015537.jpg
new file mode 100644
index 000000000..78f53d096
Binary files /dev/null and b/static/images/candidates/president/P00015537.jpg differ
diff --git a/static/images/candidates/president/P00016550.jpg b/static/images/candidates/president/P00016550.jpg
new file mode 100644
index 000000000..713a50cf1
Binary files /dev/null and b/static/images/candidates/president/P00016550.jpg differ
diff --git a/static/images/candidates/president/P00016741.jpg b/static/images/candidates/president/P00016741.jpg
new file mode 100644
index 000000000..ab18a257c
Binary files /dev/null and b/static/images/candidates/president/P00016741.jpg differ
diff --git a/static/images/candidates/president/P20001897.jpg b/static/images/candidates/president/P20001897.jpg
new file mode 100644
index 000000000..f033d154e
Binary files /dev/null and b/static/images/candidates/president/P20001897.jpg differ
diff --git a/static/images/candidates/president/P40000879.jpg b/static/images/candidates/president/P40000879.jpg
new file mode 100644
index 000000000..8a4d6487f
Binary files /dev/null and b/static/images/candidates/president/P40000879.jpg differ
diff --git a/static/images/candidates/president/P40001034.jpg b/static/images/candidates/president/P40001034.jpg
new file mode 100644
index 000000000..854a5ce40
Binary files /dev/null and b/static/images/candidates/president/P40001034.jpg differ
diff --git a/static/images/candidates/president/P60016342.jpg b/static/images/candidates/president/P60016342.jpg
new file mode 100644
index 000000000..005ee0900
Binary files /dev/null and b/static/images/candidates/president/P60016342.jpg differ
diff --git a/static/images/candidates/president/P60018249.jpg b/static/images/candidates/president/P60018249.jpg
new file mode 100644
index 000000000..34a7f84f6
Binary files /dev/null and b/static/images/candidates/president/P60018249.jpg differ
diff --git a/static/images/candidates/president/P80000722.jpg b/static/images/candidates/president/P80000722.jpg
new file mode 100644
index 000000000..76db22373
Binary files /dev/null and b/static/images/candidates/president/P80000722.jpg differ
diff --git a/static/images/candidates/president/P80001118.jpg b/static/images/candidates/president/P80001118.jpg
new file mode 100644
index 000000000..51ea24216
Binary files /dev/null and b/static/images/candidates/president/P80001118.jpg differ
diff --git a/static/images/candidates/president/P80005523.jpg b/static/images/candidates/president/P80005523.jpg
new file mode 100644
index 000000000..14af93bcd
Binary files /dev/null and b/static/images/candidates/president/P80005523.jpg differ