Skip to content

charliebaer/API101-graphing-with-Chart.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

API101-graphing-with-Chart.js

The following code is a continuation to https://github.com/charliebaer/api101-csv

The code uses the dataset from the nasa and displays "Zonal annual means, 1880-present, updated through most recent complete year" which is in CSV format.

  1. line chart displays the characteristics from difference of global mean (1880-2018).

  2. The global mean is around 14°C (57°F)

  3. note that the type of 'temp' is string and not a number, so I have used parseFloat() which is a global JS function that takes strings and turns them into a number

  4. I tried my best to finish both the functions without depending on each other and act independently, its the main reason I did'nt declare any variables on global scope(instead returned the objects in the getdata() to the Chartit())

  5. To sum it all up

  • we loaded the tabular data in the form of CSV file
  • parsed it manually
  • repackaged that data with Chart.js
  • displayed that data using HTML canvas

The chart ultimately displays the rising global temperatures over the years

Alt Text

Btw the chart renderings from Chart.Js are smoooooooooooooooooooth AF..like Jiggly smooth

Alt Text

PS. I just learned that you can add gifs in your repos' decription

Nasa dataset : https://data.giss.nasa.gov/gistemp/

Chart.js : https://www.jsdelivr.com/package/npm/chart.js

documantation to Chart.js : https://www.chartjs.org/docs/latest/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages