Coder Social home page Coder Social logo

weatherflowtweet's Introduction

weatherflowTweet

Scope

Simple compact weather tweet

https://twitter.com/weatherStorey

T: 18.5c
P: 1011.6mb steady
Humid: 88%
Rain: 5.56mm
Gust: 0.5mph
Bright: 19400lux
UV: 1.73
Strikes: 0 (25km Sun Jun 27 15:48:57 BST 2021)

Uses the https://github.com/jim-easterbrook/pywws library to send tweets Uses jq to parse the retrieve json

install jq 
wget https://github.com/stedolan/jq/releases/download/jq-1.5/jq-1.5.tar.gz
tar xfvz jq-1.5.tar.gz

example json

{"station_id":"YOURSTATIONID,"station_name":"YOURSTATIONNAME","public_name":"The Wood","latitude":52,"longitude":-3,"timezone":"Europe/London","elevation":24.7111644744873,"is_public":true,"status":{"status_code":0,"status_message":"SUCCESS"},"station_units":{"units_temp":"c","units_wind":"mph","units_precip":"mm","units_pressure":"mb","units_distance":"mi","units_direction":"cardinal","units_other":"imperial"},"outdoor_keys":["timestamp","air_temperature","barometric_pressure","station_pressure","pressure_trend","sea_level_pressure","relative_humidity","precip","precip_accum_last_1hr","precip_accum_local_day","precip_accum_local_yesterday","precip_minutes_local_day","precip_minutes_local_yesterday","wind_avg","wind_direction","wind_gust","wind_lull","solar_radiation","uv","brightness","lightning_strike_last_epoch","lightning_strike_last_distance","lightning_strike_count","lightning_strike_count_last_1hr","lightning_strike_count_last_3hr","feels_like","heat_index","wind_chill","dew_point","wet_bulb_temperature","delta_t","air_density"],
"obs":[{"timestamp":1617975655,"air_temperature":14.2,"barometric_pressure":1013.3,"station_pressure":1013.3,"sea_level_pressure":1016.5,"relative_humidity":46,"precip":0.0,"precip_accum_last_1hr":0.0,"precip_accum_local_day":0.0,"precip_accum_local_yesterday":0.0,"precip_minutes_local_day":0,"precip_minutes_local_yesterday":0,"wind_avg":1.0,"wind_direction":359,"wind_gust":1.7,"wind_lull":0.0,"solar_radiation":714,"uv":3.01,"brightness":85720,"lightning_strike_last_epoch":1615598133,"lightning_strike_last_distance":41,"lightning_strike_count":0,"lightning_strike_count_last_1hr":0,"lightning_strike_count_last_3hr":0,"feels_like":14.2,"heat_index":14.2,"wind_chill":14.2,"dew_point":2.7,"wet_bulb_temperature":8.6,"delta_t":5.6,"air_density":1.22845,"pressure_trend":"falling"}]}

crontab -e

# m h  dom mon dow   command
  */10 * * * * sudo python /home/user/weather/pywws/scripts/pywws-hourly.py -v /home/user/weather/data

Usage

This repository contains some example best practices for open source repositories:

These are optional

These may be copied into a new or existing project to make it easier for developers not on a project team to collaborate.

If you have any questions or issues you can create a new issue here.

Pull requests are very welcome! Make sure your patches are well tested. Ideally create a topic branch for every separate change you make. For example:

  1. Fork the repo
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

All source files must include a Copyright and License header. The SPDX license header is preferred because it can be easily scanned.

If you would like to see the detailed LICENSE click here.

#
# Copyright 2020- IBM Inc. All rights reserved
# SPDX-License-Identifier: Apache2.0
#

Authors

Optionally, you may include a list of authors, though this is redundant with the built-in GitHub list of contributors.

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.