Exploring the Costa Rica Bus Database

Nerd Alert 1- I found a spreadsheet with all the CR Bus Routes with their beginning and end point, company, distance and fares and I am going to brush off my programming skills and see what I can do with the data. Caution – I think there are 30k lines of data so don’t click below unless you want them.

Spreadsheet with all the CR bus routes

Nerd Alert 2 … I found a link to maps of each route … incredibly and painfully slow rendering and maps are not available for every route yet.

Example of route map

Exploring the edges of the data, here are the longest and shortest routes.


For Reference: “The average cost rose 1.17 cents to 60.8 cents per mile, or $9,122 per year, based upon 15,000 miles of annual driving. “Many factors go into the cost calculation of owning and operating a vehicle,” said John Nielsen, AAA Director of Automotive Engineering and Repair.” (includes depreciation) That is 38 cents per km.  Additionally, I think the median bus route is 14km or about 9 miles and costs c400 or near $1

Here is something I learned that I should have known. While studying the spreadsheet with all the buses in CR I noticed that the bus numbers followed a pattern. The pattern is the first digit in the route route is the province. Duh. I had not noticed the pattern before since I typically live and take only buses within a single province at a time. Costa Rica has seven provinces (like states) and each is assigned a unique number as seen in the table. Those province numbers are used in the first digit of the bus route and the first digit of the CR Postal codes. San Jose is #1.
Why that is important is the same city name appears all over Costa Rica which again I should have known. I thought everyone would know where San Ramon was thinking there was only one “San Ramon” in Costa Rica since I had only lived in one San Ramon. Come to find out, like the US, the same city name appears all over Costa Rica (e.g. Washington is a common city name in the States).

So, a double check that you have been given the right bus schedule is to make sure the first digit of the bus number at least corresponds to the province you want to travel in (all the bus up in Guanacaste where I am visiting are 5xx). For example, I listed a number of “San Ramon’s” in CR – one in each province with the corresponding bus number. Notice you can tell which “San Ramon” is in which Province by looking at the first digit in the bus route number (2xx where “2” is the province of Alajuela ).

Here is the decoder ring for province numbers.


Postal codes in Costa Rica are 5 digit numeric. Introduction began in March 2007. The first digit denotes one of the seven provinces, the 2nd and 3rd refer to the 81 cantons, the 4th and 5th the 473 districts. The numbers are the same as used by the Instituto Nacional de Estadística y Censos (INEC) Note: “1” is the province of San Jose.

Costa Rica Posta Codes


I took the approximate 4000 base routes and I tried to analyze them. I was most interested in trying to see where the major bus hubs were in CR. You can use that information to get from hub to hub. Here are the number of bus routes by province which is a little unfair since some provinces are geographically smaller than others. So Alajuela that goes from the capital all the way to Nicaragua and includes many central valley town has the most routes at 923.


I than sorted the cities to see which one had the most bus departures. Of course the top city is the capital San Jose which accounts for 7% of all the country’s bus routes. I would have guessed higher though. Note, there are a lot of barrio buses in SJ that increase the numbers.
I was surprised by the second entry, Cuidad Quesada which I have not been to but must to a hub for many smaller towns up that way. I was not familiar with the towns in Limon – Grapples and Cariari – since I have not traveled out that way yet. So 20 cites account for 50% of the bus routes in Costa Rica. I plotted their location on the map below to see how I could use that information to jump from hub to hub.



Plotting them out here is what it looks like on the map

Screenshot 2016-08-14 15.33.17.png

The map can be found online at map

3 thoughts on “Exploring the Costa Rica Bus Database

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s