kandi X-RAY | weather-station Summary
kandi X-RAY | weather-station Summary
An open source weather station using a Raspberry Pi and DHT-22 sensor as data source. The data is presented in an R Shiny dashboard. See demo at:
Top functions reviewed by kandi - BETA
weather-station Key Features
weather-station Examples and Code Snippets
Trending Discussions on weather-station
I am very new to python and trying to do my own data analysis.
I am trying to parse data from this website: https://www.tsn.ca/nhl/statistics
I wanted to get the table in a data frame format.
I tried this:
import pandas as pd
players_list_unclean = pd.read_html('https://www.sportsnet.ca/hockey/nhl/players/?season=2021&?seasonType=reg&tab=Skaters')
I get the following error:
raise ValueError("No tables found") ValueError: No tables found
I can see there is table, but for some reason it is not being read.
I found another stack overflow solution recommending using selenium:
However, when I tried to implement this code I could not find the table ID in the html page source. Does anyone know another way to do this? I have tried other websites, but I ultimately have the same issue....
ANSWERAnswered 2022-Feb-23 at 03:10
If you right click the table and choose inspect, you will see that the "table" on that page is not actually using the html table element.
From the Pandas documentation:
This function searches forelements and only for and rows and elements within each or element in the table.
I don't think this will work on this page. Probably need to find another data source.
I am currently working on a weather station that gets data from OpenWeatherMap's API every 10 minutes.
Every 10 seconds the temperature is published via MQTT in the topic 'local/temperature', so that other systems (for example a heater or air conditioner) can do further actions depending on the temperature.
Every 10 minutes, parallel to the new data retrieval, the weather operations are also published, also via MQTT.
Publishing the data every 10 seconds is a requirement of the project, but not important for this case.
The problem I'm stuck on is this: My request to the API of OWM is done in an extra file, which contains a function that should return the data as an object. At the same time the data is stored in a file, so that in case of a network failure the last local status is saved and can still be used.
I already write into the file, the 'reading when offline' functionality will be added later on. I have also noticed that the
assembleURL() function is actually unnecessary, but I haven't changed that yet.
Can someone please explain to me why the object I return in openWeatherMapCall.js is undefined? I'm thankful for every hint.
My file weather-station.js that calls the function
getData in openWeatherMapCall.js:
ANSWERAnswered 2021-Jan-02 at 18:14
fetch response from
getData and use
owm.getData as fetch returns a
I am trying to make a wind vector plot, and the closest I have come is using ggplot2 and the tutorials here: https://theoceancode.netlify.app/post/wind_vectors/ and here: http://jason-doug-climate.blogspot.com/2014/08/weather-station-at-worldfish-hq-goes.html
First I'm going to specify some example data that has the same structure as I'm working with...some code is redundant for the example here but I'm leaving it in for continuity with what I'm working with....
ANSWERAnswered 2020-Dec-22 at 15:44
I think you are looking for something like this:
No vulnerabilities reported
In this section we set up all the software we need on the pi to log data with the sensor. Now we are done with all the basics and the sensor should be set up and ready to go. At this point you can check if everything works by running python AdafruitDHT.py 22 4 from inside the examples folder in Adafruit_Python_DHT. If you get a error message Failed to get reading. Try again! don't worry. The DHT-22 seems to be pretty unreliable and a failed reading happens from time to time.
First update your package list by running: sudo apt-get update
Install all necessary build tools we need further on by running: sudo apt-get install build-essential python-dev python-openssl git
Download Adafruit Python DHT22 drivers on your pi by running: git clone https://github.com/adafruit/Adafruit_Python_DHT.git
Move into the downloaded directory and install the drivers by running: cd Adafruit_Python_DHT && sudo python setup.py install
Download this repository to your pi by running git clone https://gitlab.com/chillwalker/weather-station.git
Schedule a cronjob to save temperature and humidity by executing crontab -e and adding * * * * * /usr/bin/env python <ABSOLUTE-PATH-TO-REPOSITORY>/get-and-save.py
Schedule another cronjob to upload the data every 15 minutes to your webspace by executing crontab -e and adding */15 * * * * scp <ABSOLUTE-PATH-TO>/data.csv <WEBHOSTING-USER>@<WEBHOSTING-HOST>:<PATH-WHERE-YOU-WANT-TO-STORE-YOUR-DATA>
Now change inside app.R on Line 18 where it says to the url to the data.csv on the server (eg. https://myserver.com/weather-data/data.csv).
Connect RStudio to your account at rshiny.com and publish the app.
(Optional) set up your (sub-) domain via frame forwarding to access the shiny server url.
Reuse Trending Solutions
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page