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

Fix analysis geo schema #2832

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,25 @@ import HeatMap from '#components/HeatMap';
import styles from './styles.css';

const NLP_MAP = gql`
query NlpMap($projectId: ID!, $nlpMapId: ID!) {
project(id: $projectId) {
id
analysisGeoTask(id: $nlpMapId) {
query NlpMap($projectId: ID!, $nlpMapId: ID!) {
project(id: $projectId) {
id
status
entryGeo {
data {
geoids {
countrycode
featurecode
geonameid
latitude
longitude
match
analysisGeoTask(id: $nlpMapId) {
id
status
entryGeo {
data {
meta {
latitude
longitude
offsetEnd
offsetStart
}
}
}
}
}
}
}
`;

interface Props {
Expand Down Expand Up @@ -91,7 +89,7 @@ function NlpMap(props: Props) {
const points = useMemo(() => {
const latLongs = data?.project?.analysisGeoTask?.entryGeo
?.flatMap((geoData) => geoData?.data)
.flatMap((mapData) => mapData?.geoids)
.flatMap((mapData) => mapData?.meta)
.filter(isDefined)
.map((latLong) => ((latLong.latitude && latLong.longitude) ? {
count: 1,
Expand Down
8 changes: 3 additions & 5 deletions app/views/PillarAnalysis/AnalyticalStatementInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,11 @@ const AUTOMATIC_STORY_ANALYSIS = gql`
status
entryGeo {
data {
geoids {
countrycode
featurecode
geonameid
meta {
latitude
longitude
match
offsetEnd
offsetStart
}
}
}
Expand Down
Loading