WSJT-X Setup on macOS

I may add to these notes, but a key one was to make sure to give WSJT-X access to the microphone, even when using a USB cable to control the rig. Thanks to K3DCW for the tip.

I presume that you have a checkmark in the box labeled “PortAudio” next to the USB Audio CODEC device selectors. If so, then the only other thing that I can think of is that you haven’t given macOS permission to access your “microphone.” Many of these programs see/treat that USB Audio CODEC as a microphone input and failing to give it access to your “microphone” will cause it to not hear a thing. Go to the Security & Privacy pane and make sure that Fldigi has access to the microphone.

I also have iShowU Audio Capture installed (for OBS screen recording), which I thought might have been the problem. Here are my current working audio settings (Audio Midi Setup).

The rest of the settings described here work out well for connecting the IC-7300 and my MacBook Pro.

To get the gain right in the software, I used the RF Gain knob on the IC-7300. There is a way to adjust this in the settings but I can’t find it at the moment. It’s the ACC/USB AF Output Level setting under MENU>SET>Connectors (make sure you scroll up and down the menu items as needed). All suggestions are to get the bar in WSJT or JTDX to about 30 dB.

Labeling minimum and maximum values on a fill color guide in #rstats #ggplot2

This took me a while to understand, and even though I think this should be built in somewhere, I ended up with the following function:

# Function to show min and max values on fill color bars.
# Inspiration from https://stackoverflow.com/a/60732101/2152245
# original_func should be something like "scales::breaks_pretty(3)"
breaks_min_max <- function(original_func) {
    function(x) {
        original_result <- original_func(x)
        breaks <- c(min(x), 
                  original_result, 
                  max(x))
breaks_sort <- sort(breaks)
# If values are too close, drop one of them
close <- diff(breaks_sort) < 1
breaks_sort <- breaks_sort[!close]
breaks_sort
    }
}

Note the very rough method of determining when labels will be too close together. This would need to be modified if working with negative numbers or values that are all decimals.

In use:

ggplot(mtcars,
aes(x = mpg,
y = disp,
color = qsec)) +
geom_point(size = 5) +
scale_color_continuous(breaks = breaks_min_max(scales::breaks_pretty(4)))

Result:


Update 2021-09-28:

If you have a log scale, this will also work if you use breaks_log(). Example below. This seems to be sensitive to the number of breaks you set; for the example below, 4 doesn’t work (the top and bottom values aren’t labeled), but 6 does.

ggplot(mtcars, aes(x = mpg, y = disp, color = qsec)) + 
geom_point(size = 5) + 
scale_color_continuous(trans = "log10",
breaks = breaks_min_max(scales::breaks_log(6)))

List of #APRS Projects (and interesting alternatives)

I’ve expanded my search beyond what I introduced in APRS tracker/viewer build concept. Here I will attempt to organize projects some other folks have put together.

This has been sitting in draft mode for several weeks, but I’m pushing it out now and hoping to add more as I learn.

Exploring genealogy with R: readgedcom and tidygraph

My code is an absolute mess right now, but here’s a fun plot showing everyone in my family GEDCOM. With so many people, it’s hard to visualize all of them at once, and most software provides one or the other of a descendant tree or an ancestor tree.

Colors on this plot show whether a person is a terminal ancestor (no parents) or terminal descendant (no children). You can also tell that I don’t have the graph (connections between people) set up properly, because I don’t have that many unrelated individuals in this GEDCOM (at least, I shouldn’t). Overall I think this is a good start and eventually I can end up with a poster.

network plot with lots of circles and arrows
Red = terminal ancestor, green = terminal descendant, blue = neither.

Counterpoint API (quick notes)

Looks like first you would grab the counterpoint ID from here: https://counterpointapp.herokuapp.com/api/v1/counterpoints
EERC is counterpoint_id 606. Could select by bounding box (lat/long) too. This includes a list of counts (just labeled “id”) but no actual counts, so you could do time/date collection stat comparisons from there as well.
Then you can pull up actual counts from https://counterpointapp.herokuapp.com/api/v1/counterpoints/606 where the counterpoint_id is named at the end. This gives you a list of counts, including data.
It looks like minutes start/end on the second that the count was started, so aggregation by minute (not second) should be used.
It looks like minutes without data are excluded, e.g. no 12:51:52 minute is included here (EERC 606):
{"id":281510,"count_session_id":18223,"timestamp":"2016-06-21T12:51:56.000Z","bike_generic":0,"bike_adult":0,"bike_child":0,"bike_baby":0,"bike_cargo":0,"bike_child_trailer":0,"walk_generic":0,"walk_adult":0,"walk_child":0,"walk_stroller":0,"walk_disability":0,"walk_skateboard":0,"walk_visually_impaired":0,"walk_physically_impaired":0,"vehicle_personal":2,"vehicle_car":0,"vehicle_semi":0,"vehicle_moto":0,"vehicle_transit":0,"vehicle_oversized":0,"objectId":null,"gender_m":0,"gender_f":0,"gender_o":0,"onePerson":0,"twoPerson":0,"threePerson":0,"fourPlusPerson":0},{"id":281511,"count_session_id":18223,"timestamp":"2016-06-21T12:53:56.000Z","bike_generic":0,"bike_adult":0,"bike_child":0,"bike_baby":0,"bike_cargo":0,"bike_child_trailer":0,"walk_generic":0,"walk_adult":0,"walk_child":0,"walk_stroller":0,"walk_disability":0,"walk_skateboard":0,"walk_visually_impaired":0,"walk_physically_impaired":0,"vehicle_personal":5,"vehicle_car":0,"vehicle_semi":0,"vehicle_moto":0,"vehicle_transit":0,"vehicle_oversized":0,"objectId":null,"gender_m":0,"gender_f":0,"gender_o":0,"onePerson":0,"twoPerson":0,"threePerson":0,"fourPlusPerson":0}

Resetting read_only in Elasticsearch

Rather than messing with curl, I went the long way and installed Kibana. It takes a little while to unzip. Run it in a very similar way to Elastisearch (bin\kibana.bat). Go to http://localhost:5601/app/kibana#/dev_tools.

Paste in the solution from here:

PUT /<yourindex>/_settings
{
  "index.blocks.read_only_allow_delete": null
}

You may have run into this because you are close to the disk space limits. Rather than modifying those through Kibana, you can add them directly into elasticsearch\config\elasticsearch.yml.

Rainmeter Snow Skin for JohnDee.com

Snow map from JohnDee.com.

JohnDee.com has some pretty neat maps, but the URL structure is dynamic, so this one is a little more complicated than my previous skins. Enjoy!

Update: I’m not sure why this isn’t refreshing automatically, but manually refreshing the skin must reload the variables.

;Shows the 4-day snowfall prediction from JohnDee.com.
;Much help from https://www.reddit.com/r/Rainmeter/comments/2qjbpw/help_build_url_by_concatenating_text_date_time/cn99at7/

[Rainmeter]
Update=3600
;To make this to immediately show up, change value to 0 and refresh.

[MeasureDateY]
Measure=Time
Format=%Y

[MeasureDateM]
Measure=Time
Format=%m

[MeasureDateD]
Measure=Time
Format=%d

[MeasureURL]
Measure=String
String=http://johndee.com/wp-content/uploads/[MeasureDateY]/[MeasureDateM]/MIDSNOW[MeasureDateM][MeasureDateD].jpg
DynamicVariables=1

[MeasureImage]
Measure=Plugin
Plugin=WebParser
MeasureName=MeasureURL
URL=[&MeasureURL]
Download=1

[MeterImage]
Meter=Image
MeasureName=MeasureImage
H=375
W=500

sum() with raster::aggregate() in R

If you try to use sum() directly in raster::aggregate() and have NA values, you’ll get NA as a result. You need to build a tiny function and pass the rm.na=T command to sum(). More succintly:

# Dissolve duplicate geometries and sum OOIP
 fm <- raster::aggregate(fm.raw,
                         by="OilFieldID", 
                         sums=list(list(function(x) sum(x,na.rm=T),
                                        "OOIP_pooltable")))

 

pip3 with Conda (if you still have Python 2.7 in your Windows PATH)

If you want to use pip3 with your Anaconda Python 3 installation, you can copy pip.exe and pip-script.py in [Python 3]/Scripts/ to pip3.exe and pip3-script.py in the same folder. These will then show up in your PATH, so running pip3 install [x] will now work, and running pip install [x] will still work for your Python 2 installation.

It seems like you can do a similar thing with conda, if you are forced to install it for Spyder. Rename conda.exe, conda-env.exe, etc. and add [Python 2 Miniconda]/Scripts to your path.

(Thanks to Neil D. for the tip!)

 

git branching development workflow in Rstudio

  1. open git terminal/cli
  2. git branch new-branch-name (make new branch)
  3. git checkout new-branch-name (switch to new branch)
  4. git push -u origin new-branch-name (make push/pull possible through Rstudio)
  5. make changes and save files
  6. add changes with Rstudio or git add
  7. commit changes with Rstudio or git commit -m “Commit message.”
  8. push changes with Rstudio  or git push origin new-branch-name