by Jinook Jung
- Visit my repl.it.
- Click the Green Play Button.
- Execute
gem install --user-install httparty colorize geocoder
first. [This one could take some time] - Then, run
ruby bin/run
in Output.
- Visit my Github repository and clone the code to your local directory:
git clone https://github.com/jinook929/_flatiron_project1.git
- Enter into the _flatiron_project1 fold:
cd _flatiron_project1
. - Open
weather_api_scraper.rb
file inlib
folder and change line 8 as below:
api_key = ENV["API_KEY"] => api_key = "Your Google Geocoding API key"
(Don't forget the quotation marks!!!) - Execute
bundle install
. - Then, run
ruby bin/run
.
Welcome to Country Info CLI App!
|| 1. A-B || 2. C-D || 3. E-G || 4. H-K ||
|| 5. L-M || 6. N-R || 7. S-T || 8. U-Z ||
What is the first letter of the country that you are looking for?
- When the input is not valid
Please see the alphabet list and enter a number between 1 and 8 (or a single letter).
|| 1. A-B || 2. C-D || 3. E-G || 4. H-K ||
|| 5. L-M || 6. N-R || 7. S-T || 8. U-Z ||
What is the first letter of the country that you are looking for?
Which country do you want to know about?
| 1. Uganda | 2. Ukraine | 3. United Arab Emirates | 4. United Kingdom | 5. United States |
| 6. Uruguay | 7. Uzbekistan | 8. Vanuatu | 9. Venezuela | 10. Vietnam |
| 11. Virgin Islands | 12. Wallis and Futuna | 13. Western Sahara | 14. Yemen | 15. Zambia |
| 16. Zimbabwe
Enter the number (or country name) of your choice. =>
=== United States ===
^ Capital City: Washington, DC
^ Language: English
^ Population: 307,212,123
^ Currency: USD (US dollar)
^ Background:
Britain's American colonies broke with the mother country in 1776 and were recognized as the new nation of the United States of America following the Treaty of Paris in 1783. During the 19th and 20th centuries, 37 new states were added to the original 13 as the nation expanded across the North American continent and acquired a number of overseas possessions. The two most traumatic experiences in the nation's history were the Civil War (1861-65), in which a northern Union of states defeated a secessionist Confederacy of 11 southern slave states, and the Great Depression of the 1930s, an economic downturn during which about a quarter of the labor force lost its jobs. Buoyed by victories in World Wars I and II and the end of the Cold War in 1991, the US remains the world's most powerful nation state. The economy is marked by steady growth, low unemployment and inflation, and rapid advances in technology.
=> More Info: http://www.geognos.com/geo/en/cc/us.html
Do you want to know the currunt weather of this country? [Capital Area] (Y/N)
=> If you choose "Y" or "YES" (case-insensitive), you will see the weather info screen for the capital area of the country.
Do you want to know the currunt weather of this country? [Capital Area] (Y/N) yes
[ AREA : Washington, DC, USA (around the capital) ]
Temperature = 37˚F (Feels Like: 30˚F) / Wind = 11 mph
Daily Low & High = Low: 29˚F - High: 42˚F / Clear throughout the day
Do you want to know about another country? (Y/N)
=> If you choose "Y" or "YES" (case-insensitive), the app will lead you to the beginning (the alphabet range list).
++++++++++++++++++++++++++++
Thank you for using our app!
~ ~ ~ See you later. ~ ~ ~
++++++++++++++++++++++++++++
- World Countries API
- Google Geocoding API
- Scraping of Country Details Web Pages (e.g. Korea)
- Scraping of Weather Info Website (Dark Sky [with latitude & longitude info of the country])
- List of capital cities with latitude and longitude
- Ruby Geocoder Gem
- Country (basics) [Country API] :name, :capital, :url, :lat, :long
- Country (details) [Country SCRAPING] :location, :language, :population, :currency,:background(, and sometimes :capital)
- Weather (area) [Google Geocoding API] :area
- Weather (weather related) [Weather SCRAPING] :temperature, :feels, :wind, :summary
- getting-remote-data-working-with-apis
- oo-student-scraper
- scraping-flatiron-code-along
- scraping-kickstarter
- weather-app
- worlds-best-restaurants-cli-gem
Bug reports and pull requests are welcome on GitHub at https://github.com/jinook929/_flatiron_project1. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
- Jinook Jung [email protected]
© Jinook Jung
The app is available as open source under the terms of the MIT License.