Search Results for: home php

When I build my homestead trash incinerator! πŸ”₯

When I build my homestead trash incinerator! πŸ”₯

They estimate roughly 1 in 4 rural residents burn at least a portion of their household trash. With most things packaged in lightweight plastics and paperboard, a significant portion of waste can be burned. Rural households that burn can often only run to the transfer station or the landfill once or twice a year as most can go up in smoke.

Most of it is inevitably burned in smelly trash burning barrels which are typically 55 gallon drum with holes shot or poked in it. But it can be done better. Burn barrels are fine for disposing of trash in outlying areas but they have several shortfalls that very from a nuisance to a downright public safety threat.

  • They can smell bad when certain plastics and other trash is burned – as they tend to smolder due to the trash being wet and not enough oxygen
  • Some of the chemicals released can be toxic, especially when trash solders due to moisture and lack of air
  • They pose a fire risk – as many are used without screens and are placed near grass or trees

Hot fires eliminate the volatile organic compounds, along with many of the toxins like arsenic, dioxin and furans from incomplete combustion.

I think when I build my incinerator, I would include a fairly high stack maybe 5-6 feet high to create a good draft. A good draft would mean a hot fire, with less emission and odors. Forced air into the incinerator using a blower motor of some sort would increase the incineration process. While a fan would take energy which is always precious on an off grid cabin, the benefits of more complete combustion with less odor and ash might be worth it.

Adding scrap wood and cleaner burning plastics to the fire could further help increase combustion temperatures, reducing ash, unburnt waste, smoke, toxins and odors. Rip roaring fires can make ordinary kitchen and farm trash quickly disappear.

I would sort the waste that went into it. Food waste is good for composting or feeding to pigs and goats. A lot of and metal can be recycled – although maybe it would be better to burn the cans out then waste perfectly good water which may be precious on an off grid homestead. Plus who really wants to wash your trash?

I would also take steps to make sure that the incinerator is away from grass and trees, and that the smoke stack is covered so no paper or sparks could fly out. This would allow disposal of waste even during open burn bans and dry conditions outside. Trash accumulates regardless of the weather in our consumer society. Every time you go to the mail box there is more paper trash and kitchen waste baskets are quickly filled with plastic wrappers, bottles and paperboard boxes. Homesteads also produce feed sacks, pesticide containers and twine needing disposal.

It would be nice to use some of the heat from the incinerator to heat water for washing and other chores around the farm. A lot of city people pay to get rid of their trash, it would be nice for waste to be an actual asset – heating water and providing a useful service on the homestead.

There are a lot of good plans on the internet for improved burn barrels and incinerators widely used on farms and rural homestead. A hot fire can eliminate most waste, saving money and time, turning waste into an asset rather than more fill at the massive garbage dumps.

As I have 20 GB of data per 30 day period or an average of 682 MB/day of data to use with my hotspot device I use at home for Internet during the winter months for work and play, I have to be careful on how much data I use

As I have 20 GB of data per 30 day period or an average of 682 MB/day of data to use with my hotspot device I use at home for Internet during the winter months for work and play, I have to be careful on how much data I use. While I only used about 11 GB during the December 24 – January 23 period, it’s important that I be measured with my data use.

I wrote a short script to output my connection strength, 5-minute / 1 hour / 1 day data use and current topΒ  application using data that I display in the XFCE panel using gen-monitor. For example, this is the display:

LDL314DL_7014: 70/-22
4.29 KB / 72.50 KB / 118.28 MB
/usr/lib/firefox/firefox/

Here is the PHP script I use to generate it — it’s a mix of PHP and BASH. I could have done it all in BASHΒ  but truth be known I’m lazy and I’m better at PHP coding.

$net = exec("iwlist scan 2>/dev/null | egrep -i 'Signal level='|cut -b 29-31,49-51|sed -n '1p'");

$ssid = exec("iwgetid wlo1 -r");

$dataTtl = str_replace('i','',preg_replace('/^( *)/', '',exec("vnstat | sed -n '19p'|cut -d\| -f 3")));

$dataHr = preg_replace('/^( *)/', '', exec("vnstat -h | tac | sed -n '2p' | cut -d\: -f 1"));
$dataHrAmt = str_replace('i','',preg_replace('/^( *)/', '', exec("vnstat -h | tac | sed -n '2p' | cut -d\| -f 3")));

$dataMinAmt = str_replace('i','',preg_replace('/^( *)/', '', exec("vnstat -5 | tac | sed -n '2p' | cut -d\| -f 3")));

$nethogs = preg_replace('/(\d.*)$/', '', exec("nethogs -t -c2 2>/dev/null|tac|sed -n '2p'"));

if ($ssid != '') echo "$ssid: $net\n";
else echo "Offline\n";
echo "$dataMinAmt / $dataHrAmt / $dataTtl\n";
echo "$nethogs";

I actually enjoy watching the meter and being careful with my usage. It forces me to be deliberate, and make sure I’m careful with the data I’m consuming, using my smartphone for video meetings and watching video. I am actually surprised how little data ordinary web surfing uses – it’s really the video and downloads that eats a lot of data – especially the big GIS files. But I can go to the library for such purposes.

While I don’t have a good count based on SSID, it looks like I used about 11.2 GB on the hotspot and 19.2 GB on wired networks, mostly at the library and some at my parents house, downloading videos for later watching, updating or installing Linux apps, and downloading large GIS files. Downloading Youtube videos for later consumption really is a big bandwidth suck.

I like the challenging of being aware of my internet consumption and being responsible about the amount of data I use each day.

The Energy Costs of Cooling and Heating a Home

It actually takes less energy and produces less carbon dioxide to cool a home in Florida then it does to heat a home in Minnesota in the winter -- especially if the home is heated by oil or electricity.

Bulk Download NYS Election District Enrollments

For some of my projects, I need access to the full set of enrollments from the State Board of Elections. While you can download them one at a time, it sure is nice to have all of them for statewide coverage to easy processing. You can get them using Beautiful Soup.

import os
import requests
from urllib.parse import urljoin
from bs4 import BeautifulSoup

yr = '12'
mon = 'nov'
ext = '.pdf' #.xlsx

url = "https://www.elections.ny.gov/20"+yr+"EnrollmentED.html"

#If there is no such folder, the script will create one automatically
folder_location = r''+mon+yr+'-Enrollment'
if not os.path.exists(folder_location):os.mkdir(folder_location)

response = requests.get(url, { 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103197 Safari/537.36' })
soup= BeautifulSoup(response.text, "html.parser")     
for link in soup.select("a[href$='"+mon+yr+ext+"']"):
    #Name the pdf files using the last portion of each link which are unique in this case
    filename = os.path.join(folder_location,link['href'].split('/')[-1])
    with open(filename, 'wb') as f:
        f.write(requests.get(urljoin(url,link['href'])).content)

What can you do with them? If you are looking at the numbers from 2018 and later, you can load them directly in PANDAS.

import glob as g
import pandas as pd

df = pd.concat((pd.read_excel(f, header=4) for f in g.glob('/home/andy/2021-Enrollment/*xlsx')))

df = df[(df['STATUS']=='Active')]

df.insert(1,'Municipality',df['ELECTION DIST'].str[:-7].str.title())
df.insert(2,'Ward',df['ELECTION DIST'].str[-6:-3])
df.insert(3,'ED', df['ELECTION DIST'].str[-3:])

df=df.dropna()
df=df.sort_values(by=['COUNTY','ELECTION DIST'])

df

COUNTYMunicipalityWardEDELECTION DISTSTATUSDEMREPCONWOROTHBLANKTOTAL
1AlbanyAlbany001001ALBANY 001001Active74.09.00.00.00.016.099.0
5AlbanyAlbany001002ALBANY 001002Active311.016.02.01.010.047.0387.0
9AlbanyAlbany001003ALBANY 001003Active472.026.05.01.027.0121.0652.0
13AlbanyAlbany001004ALBANY 001004Active437.030.02.03.012.092.0576.0
17AlbanyAlbany001005ALBANY 001005Active13.00.00.00.00.00.013.0
53YatesMilo000006Milo 000006Active204.0409.013.03.050.0182.0861.0
57YatesPotter000001Potter 000001Active144.0460.025.01.051.0226.0907.0
61YatesStarkey000001Starkey 000001Active187.0370.015.05.057.0209.0843.0
65YatesStarkey000002Starkey 000002Active189.0433.018.04.046.0201.0891.0
69YatesTorrey000001Torrey 000001Active185.0313.09.03.039.0159.0708.0

And then do all kinds of typical PANDAS processing. For example to categorize the counties into three pots — based on a comparison of the number of Democrats to Republicans, you could run this command:

tdf=df.groupby(by=['COUNTY']).sum()
pd.cut((tdf.div(tdf.iloc[:,:-1].sum(axis=1),axis=0)*100).sort_values(by='BLANK',ascending=False)['DEM'],3,labels=['Rep','Mix','Dem']).sort_values()
COUNTY
Rensselaer      Rep
Genesee         Rep
Oswego          Rep
Livingston      Rep
Schuyler        Rep
Orleans         Rep
Seneca          Rep
Otsego          Rep
Warren          Rep
St.Lawrence     Rep
Cattaraugus     Rep
Chemung         Rep
Cayuga          Rep
Tioga           Rep
Yates           Rep
Broome          Rep
Franklin        Rep
Oneida          Rep
Fulton          Rep
Allegany        Rep
Essex           Rep
Niagara         Rep
Steuben         Rep
Herkimer        Rep
Lewis           Rep
Delaware        Rep
Wyoming         Rep
Chenango        Rep
Hamilton        Rep
Greene          Rep
Sullivan        Rep
Wayne           Rep
Jefferson       Rep
Ontario         Rep
Chautauqua      Rep
Putnam          Rep
Madison         Rep
Washington      Rep
Schoharie       Rep
Dutchess        Rep
Montgomery      Rep
Clinton         Rep
Orange          Rep
Cortland        Rep
Suffolk         Rep
Onondaga        Rep
Saratoga        Rep
Erie            Mix
Schenectady     Mix
Ulster          Mix
Rockland        Mix
Columbia        Mix
Monroe          Mix
Westchester     Mix
Richmond        Mix
Albany          Mix
Tompkins        Mix
Nassau          Mix
Queens          Dem
Bronx           Dem
New York        Dem
Kings           Dem
Name: DEM, dtype: category
Categories (3, object): ['Rep' < 'Mix' < 'Dem']

If you are using the pre-2018 data, I suggest converting the PDF to text documents using the pdftotext -layout which is available on most Linux distributions as part of the poppler-utils package. This converts the PDF tables to text files, which you can process like this:

import pandas as pd
df = pd.read_csv('/home/andy/Desktop/AlbanyED_nov16.txt',
   skiprows=3,
   sep='\s{2,}',
   engine='python',
   error_bad_lines=False)
df=df[df['STATUS']=='Active']
df=df.dropna()