Skip to content

Commit

Permalink
add fake cellsites cp
Browse files Browse the repository at this point in the history
  • Loading branch information
jpacilo committed Jul 12, 2023
1 parent 6990402 commit 97301c4
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 8 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# sds4gdsp
intro to spatial data science for the globe data science program

1. Setup
11 changes: 3 additions & 8 deletions notebooks/lecture.ipynb

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions scripts/make_fake_cellsites.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Download Instructions
# 1. Goto https://gadm.org/download_country.html#google_vignette
# 2. Select Philippines then download GeoJSON and select level2
# 3. Put it in your root folder `data/shapefiles/<file>`

# REMOVE CODE BELOW TEMP ONLY
# import os
# os.chdir("../")

import geopandas as gpd

filepath = "data/shapefile/gadm41_PHL_2.json.zip"
gadm = gpd.read_file(filepath)

# filter the town of interest
# let's use Taguig City for now
# change when you want to explore
town_keyword = "Taguig"
town_filter = gadm.NAME_2==town_keyword
gadm = gadm.loc[town_filter]

# save file to local disk
filepath = f"data/shapefile/gadm_{town_keyword.lower()}.gpkg"
gadm.reset_index(drop=True).to_file(filepath, driver="GPKG")

0 comments on commit 97301c4

Please sign in to comment.