Welcome! We are going to explore some basic functionalities of QGIS and Python. Given the high speed of QGIS development we will use the long-term release (version 2.18/Python 2.7).
https://docs.qgis.org/2.18/en/docs/pyqgis_developer_cookbook/index.html (long-term release documentation)
To keep things simple we are going to run the script from the internal QGIS Python Console. You will need to download the example data from the links below.
Please select a long-term release version from https://qgis.org/en/site/forusers/download.html
- http://qgis.org/downloads/QGIS-OSGeo4W-2.18.24-1-Setup-x86_64.exe (Version 2.18 Windows 64-bit)
- http://qgis.org/downloads/macOS/QGIS-OSX-2.18.24-1.dmg (Version 2.18 Windows 64-bit)
- https://tnris.org/data-catalog/entry/political-boundaries/ (I included these files in GitHub)
- https://tnris.org/data-catalog/entry/national-land-cover-database-2011/ (Large file ~228MB, derived from Satellite data)
- Data source files should be uncompressed in the Data folder (Data/political-bnd_tx/ & Data/nlcd11_tx/)
- I uploaded a PDF copy of the 2.18 documentation by the QGIS Development Team. Its GNU Free Documentation License allows free distribution