Giter Site home page Giter Site logo

js-weather-api-ajax-v-000's Introduction

Visualizing Temperature w/AJAX

Objectives

  • Build a page that uses data from the Weather Underground to render a line chart using Chart.js. It should look something like the picture below.

example pic

  • Learn how to use AJAX to keep data current.
  • Use a JavaScript visualization library.

Instructions

  • Sign up for an account to generate a Weather Underground API key here. You'll use this key for API calls.
  • Require jQuery at the top of index.html. Double check that it was correctly required by typing jQuery in the browser console or just $. This should return a function, not "undefined".
  • You'll be using Chart.js to visualize the JSON from Weather Underground so check it out. Require the Chart.js library in the head of your HTML file. Double check that you required the library correctly by typing Chart into the browser's console. A function should be returned, not "undefined".
  • Require weather-chart.js below the lines where you required jQuery and Chart.js.
  • In init.js, make a variable, API_KEY, and define it as the string of your Weather Underground key.
  • Also in init.js, make a variable URL that will be the URL that your code will fetch hourly JSON data on New York city's weather. Read the docs to figure out what it'll be.
  • Use jQuery to fetch the JSON using an AJAX request.
  • Associatoe each hour, in military time, with a temperature, in fahrenheit.
  • Use the data you found in the line above to make a line chart with Chart.js. Refer to its line chart docs for help. Render the chart in the canvas with the id NYCWeatherChart.

Resources

View Visualizing Temperature w/AJAX on Learn.co and start learning to code for free.

js-weather-api-ajax-v-000's People

Contributors

kthffmn avatar ahimmelstoss avatar octosteve avatar victhevenot avatar fs-lms-test-bot avatar cbdileo avatar pletcher avatar deniznida avatar irmiller22 avatar joshuabamboo avatar sarogers avatar fislabstest avatar pacosta613 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.