• Welcome to the new COTI server. We've moved the Citizens to a new server. Please let us know in the COTI Website issue forum if you find any problems.

How can I extract data from the Traveller Map for a spreadsheet

Tiikeri

SOC-12
How can I extract data from the Traveller Map (www.travellermap.com) for use in a spreadsheet?

I want to make a spreadsheet that I can sort to determine the type and number of starports in a subsector and things like that.

Thanks.
 
One way is to write a program that converts the imported map data into a CSV file. That's how I did it. Heck, the travellermap site might already do that for you these days.
 
If you use the API, you can get it to dump the data out in a tab separated file (TSV), which you can very easily parsed by the spreadsheet.

The challenge with a comma separated file (CSV) is this is a poorly defined format and is easy to break in unexpected way. Especially given the names used for the Traveller worlds.

I know at least one person downloaded all the Traveller Map data and loaded it into a SQL database. I keep thinking I want to do the same thing, but not gotten around to it.
 
The challenge with a comma separated file (CSV) is this is a poorly defined format and is easy to break in unexpected way. Especially given the names used for the Traveller worlds.
Commas in string names have never been an issue for me. I have the sector map files loaded up into MongoDB in JSON format these days.
 
If you use the API, you can get it to dump the data out in a tab separated file (TSV), which you can very easily parsed by the spreadsheet.

The challenge with a comma separated file (CSV) is this is a poorly defined format and is easy to break in unexpected way. Especially given the names used for the Traveller worlds.

I know at least one person downloaded all the Traveller Map data and loaded it into a SQL database. I keep thinking I want to do the same thing, but not gotten around to it.

Tabs are a bit safer than commas (parsing CSV files with text with commas is...interesting. At least HL7 uses the pipe / vertical bar for field separators, and those are a lot less likely to show up in text strings!). And at least one of my many incomplete Traveller trade programs accessed the TravellerMap and did suck the data for the current subsector into a SQLite DB. Theory was I cached it for existing sectors to minimize API calls. One of these days I'll probably finish the current version, or start all over again....the software world changes far too much in the last few years. Seems like every 2-5 years I am learning yet another framework to just do the same thing (this is my professional life: I know I can stick with whatever framework I want for my personal projects. )
 
Tabs are a bit safer than commas (parsing CSV files with text with commas is...interesting. At least HL7 uses the pipe / vertical bar for field separators, and those are a lot less likely to show up in text strings!).

CSV has quoting rules just for this problem. Commas are not the only issue with CSV.

HL7 separators are configurable per message, and also has an escape character (also configurable per message).
 
. . .
One of these days I'll probably finish the current version, or start all over again....the software world changes far too much in the last few years. Seems like every 2-5 years I am learning yet another framework to just do the same thing (this is my professional life: I know I can stick with whatever framework I want for my personal projects. )

Yeah, I hear you. I know a periodical editor who (natch) has to keep up with the latest version of Word, because contributors will send articles in a variety of formats, and he's got to work with them as sent. He tends to complain that, back 30 years ago, a program lasted lots longer and was simpler: he could not only figure out all the functions, but use them enough to learn them pretty much automatically. Nowadays, the programs do lots more, but he barely has time to find all the functions, much less learn them (and forget about doing it automatically) before it gets replaced--and he's got to start all over.
 
If you use the API, you can get it to dump the data out in a tab separated file (TSV), which you can very easily parsed by the spreadsheet.

The challenge with a comma separated file (CSV) is this is a poorly defined format and is easy to break in unexpected way. Especially given the names used for the Traveller worlds.

I know at least one person downloaded all the Traveller Map data and loaded it into a SQL database. I keep thinking I want to do the same thing, but not gotten around to it.

That may have been me. It took a little while to work it out, but works well now.
 
I wrote a Perl script that proxies Travellermap data into the format I want.

It's nerdy, but fun.
 
Back
Top