https://github.com/cjabradshaw/anemometer
A handy function to create a simple anemometer plot for anywhere in the world
Science Score: 10.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
✓Academic publication links
Links to: scholar.google -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.7%) to scientific vocabulary
Keywords
Repository
A handy function to create a simple anemometer plot for anywhere in the world
Basic Info
Statistics
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
Anemometer function in R

A handy function to create a simple anemometer plot for anywhere in the world in R.
Installation & Set-up
- Install
ansiweatherin the command line (Terminal) via any one of following: OpenBSD, NetBSD, FreeBSD, Debian, Ubuntu, or Homebrew. I use Homebrew on my Mac via: $brew install ansiweather
ansiweather fetches weather data from OpenWeatherMap's free API
Access ansiweather's manual for more information
You can do this easily with the following command:
install.packages(c("jsonlite", "processx", "lutz", "lubridate", "caroline", "rlang", "rgbif"))
- Pre-load the city file, which is the location JSON (Javascript Object Notation) database
ansiweatheruses to identify place names. You could add this to the function itself, but it slows processing down considerably, so it's best to load before running the function.
cityfile <- jsonlite::fromJSON(gzcon(url("https://bulk.openweathermap.org/sample/city.list.json.gz")))
The 2-digit ISO country code can be found here, and you can access various versions and scales of the source JSON database here.
Should you wish the elevation (metres above sea level; 'm asl') of the location to be displayed on the plot, you will need to register for a free user name on the GeoNames geographical database. Once you approve your account, ensure that you enable free webservices on your 'manage account' page.
Run both the functions
plotCompassandAnemometerFunctionin R (the former is invoked by the latter; both scripts are included together inAnemometerFunction.R), then you're ready to plot a real-time anemometer (including windspeed, wind direction temperature, humidity, air pressure, latitude, longitude, date, time, and elevation (optional) as in the example plot above).
Note: if you registered at GeoNames, you need to include your user name using the option GEONAMESUSERNAME="myuser_name"; if you do not provide a user name, the elevation will return 'no elev data' in the plot.
Some examples:
AnemometerFunc(Place="Adelaide,AU", PlaceFile=cityfile, GEONAMESUSERNAME="myuser_name")AnemometerFunc(Place="Darlington,AU", PlaceFile=cityfile, GEONAMESUSERNAME="myuser_name")AnemometerFunc(Place="Hobart,AU", PlaceFile=cityfile, GEONAMESUSERNAME="myuser_name")AnemometerFunc(Place="Perth,AU", PlaceFile=cityfile, GEONAMESUSERNAME="myuser_name")AnemometerFunc(Place="Port Moresby,PG", PlaceFile=cityfile, GEONAMESUSERNAME="myuser_name")AnemometerFunc(Place="Dunedin,NZ", PlaceFile=cityfile, GEONAMESUSERNAME="myuser_name")AnemometerFunc(Place="Wellington,NZ", PlaceFile=cityfile, GEONAMESUSERNAME="myuser_name")AnemometerFunc(Place="Sapporo,JP", PlaceFile=cityfile, GEONAMESUSERNAME="myuser_name")AnemometerFunc(Place="Helsinki,FI", PlaceFile=cityfile, GEONAMESUSERNAME="myuser_name")AnemometerFunc(Place="Paris,FR", PlaceFile=cityfile, GEONAMESUSERNAME="myuser_name")AnemometerFunc(Place="Kyiv,UA", PlaceFile=cityfile, GEONAMESUSERNAME="myuser_name")AnemometerFunc(Place="Reykjavik,IS", PlaceFile=cityfile, GEONAMESUSERNAME="myuser_name")AnemometerFunc(Place="Vancouver,CA", PlaceFile=cityfile, GEONAMESUSERNAME="myuser_name")AnemometerFunc(Place="Whitehorse,CA", PlaceFile=cityfile, GEONAMESUSERNAME="myuser_name")AnemometerFunc(Place="Sachs Harbour,CA", PlaceFile=cityfile, GEONAMESUSERNAME="myuser_name")AnemometerFunc(Place="Rimouski,CA", PlaceFile=cityfile, GEONAMESUSERNAME="myuser_name")AnemometerFunc(Place="Ushuaia,AR", PlaceFile=cityfile, GEONAMESUSERNAME="myuser_name")AnemometerFunc(Place="Punta Arenas,CL", PlaceFile=cityfile, GEONAMESUSERNAME="myuser_name")AnemometerFunc(Place="Agadez,NE", PlaceFile=cityfile, GEONAMESUSERNAME="myuser_name")AnemometerFunc(Place="Dar es Salaam,TZ", PlaceFile=cityfile, GEONAMESUSERNAME="myuser_name")AnemometerFunc(Place="Phalaborwa,ZA", PlaceFile=cityfile, GEONAMESUSERNAME="myuser_name")AnemometerFunc(Place="Kolkata,IN", PlaceFile=cityfile, GEONAMESUSERNAME="myuser_name")AnemometerFunc(Place="Bengaluru,IN", PlaceFile=cityfile, GEONAMESUSERNAME="myuser_name")
![]()
Note that the arrow's line width varies as a function of windspeed (thicker with higher speeds), that the colour of the temperature text (T) on the plot varies from blue to red (cold to hot), that the humidity (H) display varies from yellow to dark blue (dry to wet), and that the pressure (P) ranges from dark red, red, pink, to orange (very low, low, moderate, high).
Prof Corey J. A. Bradshaw
Global Ecology, Flinders University, Adelaide, Australia
March 2022
e-mail
Owner
- Name: Corey Bradshaw
- Login: cjabradshaw
- Kind: user
- Location: Adelaide, South Australia
- Company: Flinders University
- Website: http://globalecologyflinders.com
- Twitter: conservbytes
- Repositories: 15
- Profile: https://github.com/cjabradshaw
Matthew Flinders Professor of Global Ecology @GlobalEcologyFlinders @CABAH
GitHub Events
Total
Last Year
Committers
Last synced: about 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Corey Bradshaw | c****w@g****m | 75 |
Issues and Pull Requests
Last synced: about 2 years ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0