https://github.com/rimolive/us-elections
https://github.com/rimolive/us-elections
data-visualization elections politics r
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/rimolive/us-elections
- Owner: rimolive
- Created: 2018-04-10T00:13:46.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-17T09:55:20.000Z (almost 8 years ago)
- Last Synced: 2025-02-09T09:12:48.502Z (over 1 year ago)
- Topics: data-visualization, elections, politics, r
- Language: R
- Size: 5.27 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# US Elections dashboard
This tutorial will show a geo dashboard containing results from the past US elections. This project aims to show in the map the number of voters in each county in the past 3 presidential elections (2008, 2012 and 2016).
You can also deploy this app in OpenShift by following the suggestion in [Deploying on OpenShift](#deploying-on-openshift) section.
**Note**: It is still a work in progress.
## Deploying on OpenShift
To deploy on OpenShift, follow the instructions below:
* Add the Imagestream for R in your OpenShift project.
```
oc create -f https://raw.githubusercontent.com/rimolive/r-s2i-openshift/master/template.yaml
```
* Create a new application using this repo and the newest R Imagestream.
```
oc new-app r~https://github.com/rimolive/us-elections.git
```
* Add a new Environment Variable for us-elections DeploymentConfig to point to the application main script.
```
oc env dc/us-elections MAIN_FILE=app.R
```
* Expose the application endpoint.
```
oc expose svc/us-elections
```
## Future improvements
* Add a filter in the map section to show other election years
* Create a better palette to show the range of voters (currently the variance is high)