Open jibs23labs opened 7 years ago
Install development Environment (IDE) Action: Download and Install Link: https://atom.io/
Install the P5.js package Action: Download P5.js Complete and unzip it. Link: https://p5js.org/download/
Create a dedicated folder in your drive for your experiments. eg: Folder name: P5Experiments/ Action: Copy the unzipped P5.js files to the above folder
Access and signup to API, retrieve your API Key Link: https://openweathermap.org/current Action: Sign Up and look out for your API key in your profile.
Reference source file: Weather Here RealTime Dashboard Action: Download the source files https://github.com/jibs23labs/P5-Visualization
Add JSON Formatter from google extension Action: Add google extension to browser Link:https://chrome.google.com/webstore/detail/json-formatter/bcjindcccaagfpapjjmafapmmgkkhgoa?hl=en-GB
Concept Ideation Accessing API Evaluating API Parsing the JSON response Evaluating result via P5 Defining the logic Visual Design
Dashboard for retrieving the city and temperature and dynamically changing the background colour based on values from API.
Link: https://openweathermap.org/current
sample code snippet:
data.weather[0].main;
data.main.temp;
sample code snippet:
createElement('p',"Main: "+data.weather[0].main);
createElement('p',"City: "+ data.name);
sample code snippet:
if(n_desc_short=="Clouds"){
c1 = color(127,191,255);
c2 = color(140,146,172);
}
Adding custom fonts.
Defining Position, Font, Size, Colour, Alignment sample code snippet:
textFont(fontLight);
fill(255);
noStroke();
textAlign(LEFT);
textSize(130);
text(n_city+'\n',windowWidth/10,windowHeight/5,windowWidth/1.5,windowHeight/3);
We are almost there. . . .
Your first real time dashboard is here. Cheers.
-Jibs..
WEATHER HERE
Real time Weather Dashboard
Hello World,
This project captures real time weather data, process the weather details. Captures the parameters and creates dashboard based on the weather conditions of particular city.
Screens: