Skip to content

fasiha/hareonna

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hareonna

Web app

There's a React web app to visualzie this data: https://fasiha.github.io/hareonna/

It produces pretty graphs like this, comparing San Francisco, New York City, Macau, Singapore, and Flores in the Azores:

Plot of temperature percentiles for San Francisco, New York City, Macau, Singapore, and Flores in the Azores

and maps like this:

Map of stations most similar to Flores in the Azores

Here's my introductory blog post.

Data generation steps

Install Node and Git. Run

git clone https://github.com/fasiha/hareonna.git
cd hareonna
npm i

Download into this hareonna directory the following files:

Run:

node jsonify_stations.js
node filter_stations.js
node closest_station.js

This outputs a small <10 MB file, good-stations-summary.json, with a number of percentiles for temperature highs/lows for all "good" weather stations that have had temperature data for the last three years (though some stations may have (considerable) missing temperature data within the three year period).

Python visualization

Finally, you need a bunch of Python to render some maps (coming soon to JavaScript/browser):

# requires numpy, matplotlib, basemap, basemap-data-hires (conda-forge package)
python plots.py

This generates a list of most similar weather stations: closest.md and some plots.

Web app build

I use GitHub Pages to serve the contents of the gh-pages branch as a static site on https://fasiha.github.io/hareonna/.

To set it up, I use Kris Jenkins' tip to check out the gh-pages branch as a Git worktree. Starting in a checkout of this repo:

git worktree add ../hareonna-dist gh-pages

Then every time I want to rebuild the site, I run the following script:

rmtrash ../hareonna-dist/*
git rev-parse HEAD > ../hareonna-dist/source-sha.txt
npm run build-static && cp -pr out/* ../hareonna-dist && cd ../hareonna-dist && git add . && git commit -am dist --amend && git push -f && cd -

(rmtrash is my alias for a safe rm, feel free to replace this with rm -fr.)

Notes

All: https://www.ncei.noaa.gov/data/global-historical-climatology-network-daily/access/

  • Tehachapi: USC00048829
  • SFO: USW00023234

https://www.ncei.noaa.gov/data/global-historical-climatology-network-daily/access/USC00048829.csv

https://nominatim.org/release-docs/develop/api/Search/

About

Global weather similarities analysis from the Global Historical Climatology Network Daily dataset: 13'000 global weather stations, ten years of daily highs and lows, where should I live?

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors