Do you need to code for a career in data?
“Do you need to code for a career in data?” is a question that produces (at the time of writing) 1.69 BILLION search results on Google. Unfortunately, the answer is “it depends.”
It depends on your career, goals, personal preferences, industry and organization. It also depends on what you mean by “coding.” There isn’t just one coding language that is used by data professionals; there are many. There are also “languages within languages.” These languages interact, and overlap and… it’s complicated.
So we want to uncomplicate it.
In this post, we’ll be mostly focusing on the utility of coding languages for those working with geospatial data, but much of these insights can be transferred across the data analytics and science space. We'll share the key benefits of learning to code and discuss how the geospatial industry is evolving to accommodate low-code analytics. We’ll then share how you can approach the world of coding in a way that is relevant and appropriate to you. Finally, we’ll run through the “big 5” GIS coding languages, explaining what they’re for, who they’re for - and how to learn them!
First, let’s take a look at the main arguments for coding being a core skill in the geospatial world.
- Customization and Tool Development: Coding empowers geospatial professionals to develop custom tools, applications, and workflows tailored to the specific needs of their organization and clients - going beyond the “out of the box” tools offered by many software providers which may not meet their requirements.
- Automation and Efficiency: Coding enables automation of repetitive tasks, saving time and effort for geospatial professionals. By writing scripts, coders can automate data processing, map production, and analysis.
- Integration and Interoperability: Geospatial data and systems frequently need to interact with other technologies, databases, and platforms; coding has frequently been one of the best ways of doing this.
- Web and Mobile Mapping: Coding skills have been seen as essential for developing interactive and user-friendly web maps and dynamic data visualizations.
- Geospatial Programming Interfaces (APIs): Many geospatial software and platforms provide APIs that allow users to extend functionality and integrate additional features, and coding is often the best way of leveraging these.
- Geospatial Software Development: Coding skills have been seen as crucial for designing, implementing, and maintaining geospatial software, frameworks, and libraries.
- Future-Proofing Careers: The geospatial field is continuously evolving, with emerging technologies like artificial intelligence, machine learning, and big data playing significant roles. Coding is a skill which often enables you to be an early adopter of the next big thing in geospatial.
For all of the above points - except perhaps 6 & 7 - these arguments are beginning to be disputed, thanks to the rise of no & low code technologies.
No & low code technologies refer to platforms where the user can achieve their end goal almost entirely without code. Instead, they can leverage a visual and graphic user interface to achieve their goals. These tools are becoming increasingly popular across the entire analytics industry - from data engineering to analytics to web mapping.
An example of this is CARTO Workflows (see below). Using Workflows, users can design, run & share analysis using an intuitive drag-and-drop interface, without the need for specialist SQL or GIS knowledge. The outputs of this process can easily be imported into a web app without the need for any specialist Javascript skills. Learn more about Workflows here.
All of this is part of a movement in the geospatial industry which is being called “Third-wave democratization,” in which tools are being increasingly opened up to users who don’t have a “traditional” GIS background.
AI is set to play an increasingly significant role in the geospatial world. AI has the potential to streamline and automate certain tasks, making coding less essential for certain GIS applications and automated tasks.
However, if you’re hoping the rise of tools such as ChatGPT will eliminate the need to learn coding - don’t get your hopes up too soon! While these types of tools are great at producing or fixing code, you will still need to know exactly what to ask it to fulfill these tasks - and that means knowing at least the language it should be working with! Furthermore, being able to troubleshoot and integrate code into your tech stack - that’s still on you!
If you'd like to learn more about the role of AI in geospatial, check out this keynote at the Spatial Data Science Conference in London, 2023 which covers just that.
So, with the arguments for and against needing to learn to code - where does that leave you? Here’s our advice.
- Learn the Fundamentals: Learn what the different languages do. Learn to spot them. Familiarize yourself with the core concepts and principles shared across coding languages, such as loops, functions, and data formats. WIth this knowledge, you can easily develop skills in different languages as needed.
- Master what is relevant to you: Focus on learning the language(s) that is most relevant to your interests and career goals, rather than trying to become an expert in everything. More on this later!
- Stay Agile: Embrace the dynamic nature of the technology landscape and keep updating your skills to adapt to changing industry trends.
Access the ultimate guide to navigating the new geospatial landscape. Download the free report: Modernizing the Geospatial Analysis Stack today.
As we mentioned, knowing the function of the main languages is key in geospatial - even if you don’t plan on ever actually writing any code. That’s what this section of this post will cover - so consider this your GIS coding battlecard!
We’ll be running through what we have dubbed The Big 5 coding languages, because it makes them sound very exciting (which they are, of course!).
Structured Programming Language (pronounced either as sequel or “ess-queue-ell,” depending on who you talk to) is used for managing and querying relational database management systems (RDBMS), as well as running analysis. The language will differ slightly depending on the database provider (for instance, there are some small differences between Google BigQuery SQL and Snowflake SQL).
Most useful for: data engineers, data scientists, data analysts.
How to spot: heavy reliance on “the big 6” commands: SELECT, FROM, WHERE, GROUP BY, HAVING, and ORDER BY. SQL commands are also always written IN CAPITAL LETTERS. For spatial analysis, you will also often see functions that start with ST… (which stands for Spatial & Temporal) - this includes functions like ST_BUFFER, ST_CENTERMEDIAN and ST_POLYGONIZE.
Get started here:
- Our blog features many great tutorials for running Spatial SQL, including 5 maps you didn't know you could create with SQL & CARTO’s Ultimate Guide to Spatial Joins & Predicates with SQL. You can also check out our Spatial SQL Cheat Sheet!
- Our Geospatial Advocate Helen McKenzie has written this article as a guide for people with a more traditional GIS background aiming to get started with SQL.
- This guide from the University of Washington includes some fantastic tutorials and exercises for sharpening up your Spatial SQL!
- Check out the video below from our VP of Product Marketing Matt Forrest on how to get started with SQL!
Python is a popular programming language which can be used for spatial analysis by leveraging various libraries like GeoPandas, Shapely, and PySAL, which provide functionalities to manipulate, visualize, and analyze spatial data. Python's versatility, rich library ecosystem, community support, and compatibility make it an excellent choice for spatial analysis and data science.
Most useful for: data scientists, data analysts, data visualization experts.
How to spot: Python code often starts with import… to import necessary libraries. Python also has its own set of syntax rules and keywords; look for Python-specific keywords such as def, class, import, for, while, if, else, and elif.
Get started here:
- The documentation pages for Python’s spatial libraries include some great tutorials. We recommend starting with GeoPandas, Shapely & PySAL.
- You could also consider a more structured course, such as an Introduction to Geospatial Data Analysis in Python or Spatial Analysis & Geospatial Data Science in Python from Udemy.
- The mapping section of the Python Graph Gallery offers some great resources for spatial data visualization.
R is a powerful programming language specifically designed for statistical computing and data analysis. R offers a rich ecosystem of spatially-focused packages like sf, sp, and raster. Its benefits include advanced spatial modeling capabilities, integration with statistical methods and easy access to geospatial data sources. However, outside academia and research, R remains less widely-used than Python in the geospatial industry (source: The State of Spatial Data Science, 2023).
Most useful for: data scientists, data analysts, data visualization experts.
How to spot: R code blocks often begin with library() or require() to import required packages. You may also commonly see <- used, where other languages like Python typically use “=”. Finally, R commonly utilizes data frames as a primary data structure; look for code that involves operations on data frames, such as filter(), mutate(), and summarize() from the dplyr package.
Get started here:
- The RSpatial website includes a series of tutorials, manuals & use case guides.
- Not sure which packages you need? The CRAN Spatial Task View is an authoritative source for this.
- The mapping section of the R Graph Gallery offers some great resources for spatial data visualization.
JavaScript is a widely used programming language that is used to create interactive and dynamic web content, rather than for data analysis and processing. For spatial use cases, JavaScript is often employed for creating interactive and visually appealing web maps. It allows developers to manipulate and visualize spatial data using libraries such as React and deck.gl.
Most useful for: geospatial developers, data visualization experts.
How to spot: Javascript is typically executed within web browsers, so if you encounter code that is embedded or included within HTML files or interacts with web elements like DOM (Document Object Model), it is likely JavaScript. Also, look for JavaScript-specific keywords such as var, function, for, while, switch and return.
Get started here:
- You can find a series of tutorials and reference guides for getting started with React and deck.gl in our CARTO for Developers documentation. CARTO Academy also includes tutorials for getting started with developing map applications, such as an application to analyze cellular signal data.
- The Google Maps JavaScript API provides extensive documentation, tutorials, and examples for integrating Google Maps into web applications.
Due to its web-based nature, Javascript often interacts with or is embedded in HTML code, which brings us to our final section of the big 5!
An example of a “storymap” created with the Javascript library deck.gl, as well as CARTO & Google Maps Platform.
HTML is used for creating the structure and content of web pages. While HTML itself is not specifically designed for geospatial applications, it plays a crucial role in being used to embed interactive maps, geospatial visualizations, and geospatial data in web applications. You may also come across HTML in geospatial software, being frequently used as a means of creating custom pop-ups (learn more about how to do this here).
HTML is typically used in conjunction with CSS, the latter of which defines the presentation and styling of the HTML “building blocks.”
Most useful for: web/geospatial developers, data visualization experts.
How to spot: HTML is characterized by its use of tags enclosed in angle brackets: < >. These tags define the structure and elements of a web page, such as headings (<h1>, <h2>), paragraphs (<p>), lists (<ul>, <ol>), and links (<a>).
Get started here:
- W3Schools is one of the best resources for interactive and hands-on HTML tutorials, including examples, exercises, and an editor where you can practice writing HTML code.
- For creating custom pop-ups, check out this guide to embedding Google Street View images into your maps automatically!
While the Big 5 are the most commonly used languages in the geospatial world - and cover the vast majority of use cases - you may come across other coding languages throughout your career.
Here are some to look out for:
We hope this post has helped you decide whether to become a coding or no-code expert, or somewhere in between! If you’d like to continue learning, why not sign up to one of our Spatial Data Science Bootcamps?
Want to see how spatial analytics - with or without code - can help your organization? Get started with our free 14-day trial to learn how!