This dataset contains all the inputs used and output produced from Matlab for the environmental analysis of an improved hybrid geothermal district heating and cooling (GDHC) system with a heat pump, without a heat pump, and for a hot water GDHC. Detailed descriptions of the contents of this repository are provided below. Scripts used to calculate the decrease in the amount of CO2 emissions between hot water geothermal system using peak energy demand with a 40 kg/s and 80 kg/s injection rates and a horizontal well configuration and a natural gas system.