State Populations consumes state population measures by year from a datausa.io
API and stores it in a CSV file. This program then performs calculations on the resulting CSV data to discover which US states meet the following statistic criteria between the first and last recorded years:
- Greatest population increase
- Greatest population decrease
- Lowest population increase
- Lowest population decrease Users interact with State Populations via a simple CLI.
- Fork this repository and clone it to your local machine in the directory it belongs.
cd
into the directory and runbundle install
from the command line.- In order to query the
datausa.io
API and create a CSV file with that info run the following command in your terminal:
rake csv:create
- If for any reason you would like to update the state populations data available to you:
rake csv:delete
rake csv:create
- To start the CLI and interact with the program:
ruby runner.rb