Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated jurisdictional boundary determination #2

Open
meilinger opened this issue Jan 11, 2019 · 4 comments
Open

Automated jurisdictional boundary determination #2

meilinger opened this issue Jan 11, 2019 · 4 comments
Assignees

Comments

@meilinger
Copy link
Member

Using a buffered distance from a department's headquarters intersected with administrative/government units, we should be able to find a best-fit government unit geometry for a department's jurisdictional boundary.

@meilinger
Copy link
Member Author

meilinger commented Jan 11, 2019

  • Export sample of 100 random departments to apply jurisdiction-finding model to
  • Run model against sample department and assign jurisdictional boundaries to https://firecares.org
  • Build a set of instructions for manual jurisdiction validation
  • Manual validation using spreadsheet

@meilinger
Copy link
Member Author

@tbuffington7

select setseed(0.123123123);
select id, fdid, state, name from firestation_firedepartment
where boundary_verified = false
and geom is null
order by random()
limit 100;

yields department_sample.csv.zip

@meilinger
Copy link
Member Author

@tbuffington7 pulled the whole list and pruned down to only departments w/ 30 or more residential structure fires (over the time span that we have NFIRS data for)...8568 departments match that criteria

select fd.id, fd.fdid, fd.state, fd.name, sum(stat.count) as res_structure_fire_count from firestation_firedepartment fd
inner join firestation_nfirsstatistic stat on fd.id = stat.fire_department_id and stat.level = 0 and stat.metric = 'residential_structure_fires'
where fd.geom is null
and fd.archived = false
and fd.boundary_verified = false
and fd.headquarters_address_id is not null
group by fd.id, fd.fdid, fd.state, fd.name
having sum(stat.count) >= 30
order by sum(stat.count) desc;

departments_to_add_boundary.csv.zip

Let me know if you have any questions!

@meilinger
Copy link
Member Author

Updated to only include statistic from 2008 onward:

department_to_make_boundary.csv.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants