Predicting Airbnb Data from Demographics

Overview

Motivation

Data Sources

Methods and Evaluation

Data Engineering

Airbnb Data

url = urllib.request.urlopen(filename)with gzip.open(BytesIO(url.read()), ‘rb’) as l_file:
l_df = pd.read_csv(l_file)
g_df.append(l_df)
g_df = pd.concat(g_df)g_df = gpd.GeoDataFrame(
g_df,
geometry=gpd.points_from_xy(
g_df[‘longitude’],
g_df[‘latitude’]),
crs=’EPSG:4326'
)
Figure 1. Airbnb point data, red dots represent individual listings.

Census Geospatial Data

Figure 2. 2010 (Red) Census Tracts overlain with 2020 (Green) Census Tracts showing some of the changes in Austin, Texas.

Spatial Join and Census API Pull

census_df = gpd.read_file(census_file)
airbnb_df = gpd.read_file(airbnb_file)
census_df = census_df.to_crs(‘EPSG:4326’)
airbnb_df = airbnb_df.to_crs(‘EPSG:4326’)
used_tl = gpd.sjoin(census_df,airbnb_df)
data_step = “,”.join(DATA_2020[last_n:next_n])
census_url = f’https://api.census.gov/data/2020/dec/pl?get={data_step}&for=tract:{l_tracts}&in=state:{l_statefp}%20county:{l_county}&key={API_KEY}'
try:
response=requests.get(census_url)
data=response.json()
i_df=pd.DataFrame(data[1:], columns=data[0])
if len(iter_df)==0:
iter_df = i_df
else:data_step = “,”.join(DATA_2020[last_n:next_n])
Figure 3. Combined Data Engineering Workflow

Modeling

Discussion

Conclusions from Results

Figure 4. Model predictive power
Figure 5. Modeling Workflow

Further Work

Statement of Work

Source Code

--

--

--

Aspiring data nerd.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

What is Total Market Cap and Federal GDP (simply explained in 1 minute by a Data Scientist)?!

Debunked: Most Common Transcription Myths

How to define your Customer Health Score (CHS) — SmartKarrot

Customer-Health-Score-3

CountVectorizer|HashingTF

RUNNING TABLEAU ON VAGRANT

Is dbt the Future of Analytics?

Data Challenge: Webinar Recording & FAQ

Improving the efficiency of deploying volunteers to an emergency using GIS

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Greg Easley

Greg Easley

Aspiring data nerd.

More from Medium

Cloud Computing Solutions

Analyzing Airport Delays using Tableau

Database and Information Systems Development: Data Models — an introduction to 3 essential models

Airflow Monitoring and alerting with Prometheus.