The two formats documented for EntityClass are
EntityClass["type",name]
EntityClass["type",{property1->value1, property2->value2}]
It appears as if my intended use would require input of the form below, which is not allowed.
EntityClass["type",name,{property1->value1, property2->value2}]
I am attempting to find the 100 public high schools closest to my college.
(* Let's say my college is in Brockport, NY *)
bport = Entity["City",{"Brockport", "NewYork", "UnitedStates"}]["Position"];
(* Get public high school data *)
ps = EntityClass["PublicSchool", {"USState", "NewYork"}];
Right now, I'm using two steps to cull the desired information from the EntityClass. First, I create a list of schools with their distances to Brockport and their grade spans, then filter the (sorted) list to exclude schools that serve students below 7th grade.
distanceToBPort =
MapThread[{#3, #1, GeoDistance[bport, #2]} &,
Transpose@ps[{"Name", "Coordinates", "GradeSpan"}]];
subset = SortBy[
Select[distanceToBPort, (#[[1]] =!= Missing["NotAvailable"]) && (
Head[#[[3]]] =!= GeoDistance) &&
Not@MemberQ[#[[1]], "pre-kindergarten" | "kindergarten", 2] &&
#[[1, 1]] > 6
&
], Last];
The selection/filtering is not optimal and probably removes valid entries, but the point here is that I should be able to create an implicit entity class rather than converting into a List. My approach, as presented, eliminates the location information, which I need to create a map, although I can work around that by redesigning the MapThread statement.
The question: What is the appropriate, effective way to filter an EntityClass defined by EntityClass["type",name] while maintaining an Entity-type head?
A similar question has been asked; however, I don't think it relates to the current problem (unless I'm completely misinterpreting the relationship between the 2nd argument types in EntityClass).

EntityClass[..., name]is pretty much just a short-hand forEntityClass[..., filteringRules], even if the filter is"Name"->MemberQ[nameAlternatives]. What you'll want isEntityClass["PublicSchool", {"State"->..., "Location"->TakeSmallestBy[distanceToBrockPort, 10]]or something. – b3m2a1 Nov 14 '18 at 20:15schools = GeoNearest[ps, bport, 100]. You can check the distances withGeoDistance[bport, schools]. – jose Nov 15 '18 at 06:03