An Analysis of Property Prices in Ireland

An Analysis of Property Prices in IrelandChirag ChadhaBlockedUnblockFollowFollowingJan 14Dublin is in the middle of a housing crisis.

Rent control has been introduced in parts of the city but has yet to make an impact on prices.

Many young workers are unable to rent, let alone get together the money to purchase, residential property.

As an exercise in data exploration, I thought I’d take a look at the purchase prices of houses in Ireland and the factors that influence the cost of a property.

In 2011, the Property Services Regulatory Authority (PRSA) put together a Residential Property Price Register in an effort to make property prices more transparent for buyers.

From their site:It includes Date of Sale, Price and Address of all residential properties purchased in Ireland since the 1st January 2010, as declared to the Revenue Commissioners for stamp duty purposes.

Processing the dataAll records can be downloaded from the Property Price Register (PPR) site in CSV format.

In this article, we’ll take a look at the last two years of data.

It should be noted that the PPR page contains a disclaimer stating:The PSRA does not in any way edit the data.

It simply publishes, in a fully transparent manner, the data from the declarations which are filed with the Revenue Commissioners.

If the data filed contained typographical errors then those errors will appear on the Register.

Let’s take a look at some steps that were taken to clean up the raw information using Pandas:Remove properties with prices that were not full market price and remove rows that contained a small amount of Irish language descriptions of properties.

df = df[df['Not Full Market Price'] == 'No']df = df.

drop('Not Full Market Price', axis=1)df = df[(df['Description of Property'] == 'Second-Hand Dwelling house /Apartment') | (df['Description of Property'] == 'New Dwelling house /Apartment')]2.

Look at a subset of the data from 2017 onwards.

df['Date of Sale (dd/mm/yyyy)'] = pd.

to_datetime(df['Date of Sale (dd/mm/yyyy)'], dayfirst=True, format='%d/%m/%Y')df = df.

rename(columns={'Date of Sale (dd/mm/yyyy)': 'Date of Sale', 'Price (€)': 'Price'})df = df[(df['Date of Sale'] > '2017-01-01')].

reset_index(drop=True)3.

Parse the price column from strings into floats.

df['Price'] = df['Price'].

apply(lambda x: x.

lstrip('x80'))df['Price'] = df['Price'].

apply(lambda x: float(x.

split()[0].

replace(',', ''))).

astype(float)4.

Attempted geocoding using Google’s API to obtain latitude and longitude of properties.

In the interest of clarity, I should note that the coordinates I obtained for the last two years of PPR data turned out to be inaccurate enough that I’m not including the results in this piece.

It is likely that the fault lies in the recorded addresses contained in the data (which are self-reported and unedited by the PRSA) and not in Google’s actual API.

The accuracy could probably be improved if the county of each property was attached to the end of the address (some addresses contain the county but some do not).

Regardless of the inaccuracies, I felt it was important to include the code written to request the coordinates.

The GET request url creator function:def url_creator(address, url='https://maps.

googleapis.

com/maps/api/geocode/json?address=', api_key=''): logger.

debug('Creating API request URL') add_list = address.

split() add_list = [line + '+' for line in add_list[:-1]] add_list.

append(address.

split()[-1]) add_url = "".

join(add_list) return url + add_url + '&key=' + api_keyThe latitude and longitude request function:def lat_lng(address, api_key=''): logger.

debug('Requesting geospatial info from Google API') url = url_creator(address, api_key=api_key) try: response = requests.

get(url) response.

raise_for_status() except requests.

exceptions.

HTTPError as e: logger.

error(e) results = response.

json()['results'] if len(results) != 0: logger.

debug('Found geospatial coordinates') return results[0]['geometry']['location']['lat'], results[0]['geometry']['location']['lng'] else: logger.

debug('Could not find geospatial coordinates') return np.

nan, np.

nanThe reason I wrote my own code to do this stuff (and more) with the Geocoding API instead of using the popular geocoder library is because of the outdated quota behaviours for the API imposed in the library.

Google has recently made it possible to make an unlimited number of requests to its Geocoding API but geocoder’s Google geocoding method seems to have a limit set at 2500 API calls.

If you’re interested, I’ve included all of the code I used for processing the data and geocoding in the GitHub repo linked at the end of this article.

An analysis of the Property Price RegisterLooking at the head of the data, we can see that every column includes categorical data — excluding the actual price of the property.

Figure 1: Head of PPR data.

Most of the columns also only contain 2–3 unique values.

Lack of numerical data (such as number of bedrooms, available facilities, exact area of property in sq.

m, etc.

) and important categorical variables (e.

g.

the direction that the property is facing) make this data suboptimal for machine learning.

However, we can still gain some valuable insights on factors that affect property price in Ireland.

Let’s see how well represented each county is in the data:Figure 2: Value counts for counties in PPR data.

We can see that Dublin, Cork, Kildare, Galway, and Meath had the greatest number of property purchases in the past two years.

Plotting the distributions of the property prices in these 5 counties:Figure 3: Distributions of 5 most represented counties.

Some clear outliers, particularly in Dublin, are throwing off the scale of the violin plot.

Let’s only look at prices up to €2m.

Figure 4: Distributions of 5 most represented counties with property price limit at €2m.

Unsurprisingly, Dublin has the most expensive residential properties (even after removing its extreme outliers) with mean house prices between approximately €170k-€150k greater than the 4 other counties presented above.

Interestingly, Kildare and Meath have higher house prices on average despite Cork and Galway offering a thriving student culture, nightlife, tourism, and opportunites for skilled and unskilled work.

This could come down to their proximity to Dublin’s urban sprawl.

Let’s dig down on this and include the one other county bordering Dublin — Wicklow, in our analysis and see if the house prices there are on par with those seen here for Kildare and Meath.

Figure 5: Distributions of counties bordering Dublin with property price limit at €2m.

From figure 5, Wicklow has even more expensive houses on average than Kildare and Meath.

It seems as though most people would rather live on the outskirts of Dublin over moving to further flung counties such as Galway or Cork.

The combined median house price in Dublin and it’s surrounding counties is €310k while the median in the rest of Ireland is exactly half that at €155k.

It’s not entirely shocking that people would want to live in or around the economic centre of Ireland but the exact extent to which the residential property prices differ between these counties and Dublin seems stark when plainly laid out.

Let’s go back to figure 3 and take a closer look at the extreme outliers.

We can see that the max house purchase price in Dublin between 2017–2018 was €75m.

Let’s look at the max house prices in all the other counties since we can also see that a home was sold for €67.

7m in Cork within the last two years.

Figure 6: Most expensive residential property in each county.

Dublin, Cork, Galway, and interestingly, Clare had the most expensive residential properties in the last couple of years.

But are these just entire apartment buildings where the price of numerous apartments was summed up and listed under the one address?.This could very well be the case as is stated on the PPR site:Where a number of apartments are sold for a single price (e.

g.

Apartments Nos 1 to 15 Oak Drive are sold for €2m), the information on the Register depends on what was filed with the Revenue Commissioners.

For example, the filer may have input the address of — only one of the apartments (e.

g.

№1 Oak Drive) for a price of €2m;- each apartment separately and divided the price between each apartment (e.

g.

Apartment №1 for €133,333, Apartment №2 for €133,333 and so on to Apartment №15 for €133,333.

– all the apartments (e.

g.

Nos 1 to 15 Oak Drive) for a price of €2m.

The Date of Sale is the date input by the filer of the Stamp Duty Return as the date of the Deed transferring ownership of the property.

Digging into the individual addresses that make up the top 4 most expensive properties reveals that they are all indeed apartment buildings (with one being student accomodation).

However, the slight spike in Kildare was a single house sold for €8m.

I’m sure if we were to dig into the outliers in Dublin, we’d uncover expensive properties that are the homes of some obscenely rich individuals.

What about the cheapest properties sold in each county?Figure 7: Cheapest residential property in each county.

There’s a lot more similarity between counties here.

I’d attribute this to the large number of apartments in Dublin, Cork, and Galway, which were throwing off the scale in figure 6.

The cheapest residential properties in each county were likely a small flat (in urban areas) or cottage (in rural regions).

The most intriguing aspect of this plot is that Dublin actually had the cheapest residential property sold in the last two years.

You might be thinking that the reason prices are so high around Dublin is due to overpopulation and spillage from the city.

A quick look at the number of homes sold around the country show that this isn’t necessarily the case.

There were 33,074 properties purchased in Dublin, 45,742 in Dublin and its surrounding counties combined, and 54,557 in the rest of the country excluding Dublin, Kildare, Meath, and Wicklow.

Again, the fact that entire apartment buildings are listed as one address in the register is probably throwing these numbers off a good bit but it’s interesting to see that despite most of the country’s population living in or around Dublin, there are still a significant number of residential properties being purchased outside of the capital.

In total, 100,299 homes were bought in Ireland in the last two years.

81,886 of these were second-hand dwellings with the remaining 18,413 being new houses/apartments.

The median price of a new home was €281k while an older property was €207k — the differences in the averages being nearly €80k.

Looks like purchasing a second-hand home might be the way to go (permitting it doesn’t require an abundance of repairs after you’ve settled in).

At this point, you’re probably saying “OK, I get it.

Houses are expensive in Dublin” and you wouldn’t be wrong.

But where in Dublin are houses most expensive on average, you ask?.Judging from figure 8, the answer lies firmly in the southside.

Figure 8: Median property prices per Dublin postcode.

Not all of the postcodes in Dublin are represented in the last two years of PPR data.

There were a lot of missing values where the person filing the property purchase didn’t include postcode or simply included it in the address and didn’t bother filling out the actual postcode field.

Looking at the data that we do have, we see that Dublin 6 and 6w have the most expensive houses on average.

These are particularly affluent areas in Dublin’s well-off southside.

Dublin 14 is also situated next to this area so it makes sense that it has the next most expensive properties.

Dublin 4 and 16 round off the southside domination of this chart.

It should surprise nobody in any way familiar with the area that the postcodes to the west and north of the county make up the cheapest properties here.

That’s not a slight against anyone from these areas of course — Dublin 15 (where I live) also has one of the lowest median property values.

So what have we learned from this analysis?.Well, we know that if we want to save money, we should buy a property outside of Dublin and its 3 surrounding counties (maybe someone could do a cost-benefit analysis on money saved by moving to Offaly and commuting to Dublin?).

PPR data is nowhere near perfect though and any analysis of property prices from it should be taken with a pinch of salt.

Property values are thrown off by things like entire apartment buildings being listed as one address — particularly in Dublin, Cork, and Galway which have built up town centres and house the biggest universities in Ireland.

Finally, the self reported, untouched nature of this data brings with it errors that make efforts like geocoding a little bit more difficult than if it was edited before being published.

Chirag Chadha is a data scientist at UnitedHealth Group/Optum in Dublin, Ireland.

You can reach him at his email (chadhac@tcd.

ie) or through his LinkedIn.

cchadha2/ppr-housingUses Property Price Register data to predict house prices in Ireland – cchadha2/ppr-housinggithub.

com.

. More details

Leave a Reply