Uh oh!
There was an error while loading. Please reload this page.
Add function to import hotspot dataset - #1386
Conversation
willschlitzer
commented
Jul 17, 2021
@GenericMappingTools/pygmt-maintainers Any ideas on how to make this csv import look less hacked together? |
weiji14
commented
Jul 17, 2021
Have you tried using |
I have. The problem is that I want to include the entire hotspot name in one field/string, but they're inconsistent in spacing/number of words. For example, the Bermuda line reads |
There was a problem hiding this comment.
Sorry for the delay. I see what you mean by inconsistent spacing, the hotspots.txt file is space-separated for the first three columns and tab-separated for the last column. I've figured out one alternative way by reading in the first 3 and last 1 column separately, and then concatenating together (see below).
P.S. There are some commits in this PR on sphdistance. You might want to cherry-pick the 'hotspot' only commits to a clean 'add-hospot-dataset' branch (and do a force-push). Or we could merge in the sphdistance PR at #1383 before this #1386 PR to save you some hassle 🙂
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
willschlitzer
commented
Aug 12, 2021
Sounds good; I'll wait until the remote file is updated and then push an update to this PR. I'll convert to draft for the time being. |
seisman
commented
Aug 12, 2021
@willschlitzer The hotspots.txt file is now updated. |
willschlitzer
commented
Aug 13, 2021
Sounds good, I'll update this branch and make sure everything checks out. |
willschlitzer
commented
Aug 22, 2021
@GenericMappingTools/pygmt-maintainers I have updated |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Meghan Jones <meghanj@alum.mit.edu>
…pygmt into add-hotspot-dataset
maxrjones
left a comment
There was a problem hiding this comment.
Nice work! Just one final recommendation to add the reference for the original data.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Meghan Jones <meghanj@alum.mit.edu>
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com> Co-authored-by: Meghan Jones <meghanj@alum.mit.edu>
This pull request adds a function to import the
hotspots.txtdataset used in some of the GMT code examples. Unfortunately, due to inconsistent spacing between the columns in the data, I was not able to usepd.read_csv()to read the data into a DataFrame. It would be great to get any feedback to shorten this code, as it currently appears messy.Reminders
make formatandmake checkto make sure the code follows the style guide.doc/api/index.rst.Slash Commands
You can write slash commands (
/command) in the first line of a comment to performspecific operations. Supported slash commands are:
/format: automatically format and lint the code/test-gmt-dev: run full tests on the latest GMT development version