JSON With p5.js
Programming, Interaction design, Accessibility
Tools Used : p5.js, API
Json is a kind of data file and we grab its values into our code easily to get the data visualized. here is the temperature from hong kong and new york but this is a placeholder where you can type whatever the country or city name you want.
The API data from: OpenWeatherMap
Here's a demo about the temparature.
Souce code
How you get API:
You first need to sign up/in on website to get API key that is assigned to identify you.
Process 1:
Access to
OpenWeatherMap and sign up to get API key. After finishing sign up, you can see your API key at your page and copy it!
Process 2:
Move on API in the menu bar, hit the box of "API doc" whatever you're interested in.
Process 3
Then you will find some sample page as URL, hit it and make sure the URL. "appid" appears in the end.
The part is just a placeholder for your API key so that paste your API key after the word of = plus enter key on keyboard. You will make sure that each value comimng from the weather as JSON data. We also switch the country easily by changing the country name from URL bar.
This extension for google chrome is really helpful to align JSON data.
← Back to Home