# Questions

**URL:** https://forum.crosscompute.com/c/questions/5.md

[Latest](https://forum.crosscompute.com/latest.md) · [Categories](https://forum.crosscompute.com/categories.md)

---

## [Enforce SELinux for a reverse proxy](https://forum.crosscompute.com/t/enforce-selinux-for-a-reverse-proxy/229)

<div class="topic-metadata">

**Author:** [@invisibleroads](https://forum.crosscompute.com/u/invisibleroads)\
**Replies:** 0\
**Last updated:** [February 19, 2024, 6:26pm UTC](https://forum.crosscompute.com/t/enforce-selinux-for-a-reverse-proxy/229 "2024-02-19T18:26:48Z")

</div>

SELinux is set to Enforcing by default in Fedora. If you are deploying a production server, don’t disable SELinux. $ getenforce Enforcing Run semanage port -l to see the default ports that apache or nginx can access. I…

---

## [Get Firefox to play videos on Fedora 39](https://forum.crosscompute.com/t/get-firefox-to-play-videos-on-fedora-39/227)

<div class="topic-metadata">

**Author:** [@invisibleroads](https://forum.crosscompute.com/u/invisibleroads)\
**Replies:** 0\
**Last updated:** [February 4, 2024, 11:24pm UTC](https://forum.crosscompute.com/t/get-firefox-to-play-videos-on-fedora-39/227 "2024-02-04T23:24:39Z")

</div>

Firefox on Fedora 39 refuses to play videos on YouTube and other sites and error displayed is often something that amounts to “unexpected error.” You can solve this issue by installing ffmpeg from rpmfusion. You will ne…

---

## [How to bin numbers](https://forum.crosscompute.com/t/how-to-bin-numbers/209)

<div class="topic-metadata">

**Author:** [@invisibleroads](https://forum.crosscompute.com/u/invisibleroads)\
**Replies:** 0\
**Last updated:** [September 5, 2023, 5:08pm UTC](https://forum.crosscompute.com/t/how-to-bin-numbers/209 "2023-09-05T17:08:40Z")

</div>

Suppose you want to assign numbers to bins based on quantile. import numpy as np numbers = \[5, 1, 1, 2, 1, 3, 2\] bins = np.quantile(\[5, 1, 1, 2, 1, 3, 2\], \[0, 0.5, 1\]) # \[1, 2, 5\] left\_categories = np.searchsorted(bi…

---

## [How to show a table](https://forum.crosscompute.com/t/how-to-show-a-table/171)

<div class="topic-metadata">

**Author:** [@invisibleroads](https://forum.crosscompute.com/u/invisibleroads)\
**Replies:** 0\
**Last updated:** [March 7, 2022, 10:30pm UTC](https://forum.crosscompute.com/t/how-to-show-a-table/171 "2022-03-07T22:30:46Z")

</div>

In crosscompute 0.9, tables are expected to be in JSON format. table.to\_json(output\_folder / 'table.json', orient='split') You can then style your tables using CSS. table, th, td { border: 1px solid #808080; borde…

---

## [How to add page breaks](https://forum.crosscompute.com/t/how-to-add-page-breaks/174)

<div class="topic-metadata">

**Author:** [@invisibleroads](https://forum.crosscompute.com/u/invisibleroads)\
**Replies:** 0\
**Last updated:** [March 15, 2022, 4:29pm UTC](https://forum.crosscompute.com/t/how-to-add-page-breaks/174 "2022-03-15T16:29:20Z")

</div>

If your report uses markdown headings, you can add page breaks using CSS. h1, h2 { page-break-before: always; }

---

## [How to have consistency between different matplotlib backends?](https://forum.crosscompute.com/t/how-to-have-consistency-between-different-matplotlib-backends/170)

<div class="topic-metadata">

**Author:** [@invisibleroads](https://forum.crosscompute.com/u/invisibleroads)\
**Replies:** 0\
**Last updated:** [March 7, 2022, 10:24pm UTC](https://forum.crosscompute.com/t/how-to-have-consistency-between-different-matplotlib-backends/170 "2022-03-07T22:24:45Z")

</div>

Different matplotlib backends behave slightly differently, resulting in different behavior when plots are rendered from Jupyter Notebook vs a command-line script. If you are missing x-ticks or y-ticks, try creating a ne…

---

## [How do I get the nearest locations?](https://forum.crosscompute.com/t/how-do-i-get-the-nearest-locations/30)

<div class="topic-metadata">

**Author:** [@invisibleroads](https://forum.crosscompute.com/u/invisibleroads)\
**Replies:** 2\
**Last updated:** [February 12, 2020, 1:59am UTC](https://forum.crosscompute.com/t/how-do-i-get-the-nearest-locations/30 "2020-02-12T01:59:02Z")

</div>

Given a table of target locations, how do we identify the target locations nearest to a source location? import pandas as pd source\_longitude = -73.9884995 source\_latitude = 40.7703931 target\_table = pd.DataFrame(\[ …

---

## [How to change opacity of map geometries?](https://forum.crosscompute.com/t/how-to-change-opacity-of-map-geometries/94)

<div class="topic-metadata">

**Author:** [@Michelle\_Chung](https://forum.crosscompute.com/u/Michelle_Chung)\
**Replies:** 1\
**Last updated:** [March 2, 2019, 9:42pm UTC](https://forum.crosscompute.com/t/how-to-change-opacity-of-map-geometries/94 "2019-03-02T21:42:10Z")

</div>

Kind of a trivial issue but the default fill color for map geometries is translucent–for some geometries I would like 100% opacity.

---

## [How to change frame size of geotable map?](https://forum.crosscompute.com/t/how-to-change-frame-size-of-geotable-map/93)

<div class="topic-metadata">

**Author:** [@Michelle\_Chung](https://forum.crosscompute.com/u/Michelle_Chung)\
**Replies:** 1\
**Last updated:** [March 2, 2019, 9:39pm UTC](https://forum.crosscompute.com/t/how-to-change-frame-size-of-geotable-map/93 "2019-03-02T21:39:13Z")

</div>

The output geotable map is kind of narrow and doesn’t portray my map data well. Is it possible to change the size of the map frame?

---

## [Function not finding correct store count values](https://forum.crosscompute.com/t/function-not-finding-correct-store-count-values/90)

<div class="topic-metadata">

**Author:** [@Jendri\_Morocho](https://forum.crosscompute.com/u/Jendri_Morocho)\
**Replies:** 1\
**Last updated:** [February 24, 2019, 1:59pm UTC](https://forum.crosscompute.com/t/function-not-finding-correct-store-count-values/90 "2019-02-24T13:59:37Z")

</div>

A kdtree is being used in a get\_store\_count function. The function is supposed to get us the number of stores around a point, within a given radius (.3 miles in this case) The nearby\_store\_count column should have …

---

## [503 error when displaying user location and reference data points on map](https://forum.crosscompute.com/t/503-error-when-displaying-user-location-and-reference-data-points-on-map/88)

<div class="topic-metadata">

**Author:** [@palc37](https://forum.crosscompute.com/u/palc37)\
**Replies:** 1\
**Last updated:** [February 23, 2019, 12:34pm UTC](https://forum.crosscompute.com/t/503-error-when-displaying-user-location-and-reference-data-points-on-map/88 "2019-02-23T12:34:21Z")

</div>

As described in Title, please see screenshot below: Much appreciated…

---

## [New column with coordinates using geopy Nominatim](https://forum.crosscompute.com/t/new-column-with-coordinates-using-geopy-nominatim/83)

<div class="topic-metadata">

**Author:** [@palc37](https://forum.crosscompute.com/u/palc37)\
**Replies:** 1\
**Last updated:** [February 20, 2019, 5:05pm UTC](https://forum.crosscompute.com/t/new-column-with-coordinates-using-geopy-nominatim/83 "2019-02-20T17:05:32Z")

</div>

Hi mentors and peer, From below table as input, we are trying to add a column from Address using geopy Nominatim, in order to calculate distance with user input coordinate to sample only dataset within certain radius, s…

---

## [Convert address to lonlat error handling](https://forum.crosscompute.com/t/convert-address-to-lonlat-error-handling/82)

<div class="topic-metadata">

**Author:** [@palc37](https://forum.crosscompute.com/u/palc37)\
**Replies:** 1\
**Last updated:** [February 20, 2019, 4:35pm UTC](https://forum.crosscompute.com/t/convert-address-to-lonlat-error-handling/82 "2019-02-20T16:35:59Z")

</div>

Hi mentors/peer, We are designing a tool which requires user input address and calculate distance between user location and a list of training data. We used geopy, geocode to get user lonlat. But after we saved all add…

---

## [How do I geocode addresses?](https://forum.crosscompute.com/t/how-do-i-geocode-addresses/29)

<div class="topic-metadata">

**Author:** [@invisibleroads](https://forum.crosscompute.com/u/invisibleroads)\
**Replies:** 0\
**Last updated:** [February 27, 2018, 10:29pm UTC](https://forum.crosscompute.com/t/how-do-i-geocode-addresses/29 "2018-02-27T22:29:16Z")

</div>

There are many options for converting an address into longitude and latitude coordinates. Here we describe two options. NYC Geoclient API If your address is in New York City, you can use the NYC Geoclient API which, as …

---

## [How do I show an image?](https://forum.crosscompute.com/t/how-do-i-show-an-image/20)

<div class="topic-metadata">

**Author:** [@salah93](https://forum.crosscompute.com/u/salah93)\
**Replies:** 0\
**Last updated:** [February 15, 2018, 12:49pm UTC](https://forum.crosscompute.com/t/how-do-i-show-an-image/20 "2018-02-15T12:49:48Z")

</div>

To display an image as your result, print to standard output the name of the result with the suffix \_image\_path appended to it, followed by = and the location of the image. The result name should not have spaces in betwe…

---

## [How do I merge datasets?](https://forum.crosscompute.com/t/how-do-i-merge-datasets/22)

<div class="topic-metadata">

**Author:** [@salah93](https://forum.crosscompute.com/u/salah93)\
**Replies:** 0\
**Last updated:** [February 15, 2018, 1:07pm UTC](https://forum.crosscompute.com/t/how-do-i-merge-datasets/22 "2018-02-15T13:07:05Z")

</div>

If you have two datasets with common column(s) you can merge the datasets by first loading them into their own pandas.DataFrame, then using the merge method. import pandas as pd dataset1 = pd.read\_csv(d1\_path) dataset2…

---

## [How do I install packages?](https://forum.crosscompute.com/t/how-do-i-install-packages/28)

<div class="topic-metadata">

**Author:** [@invisibleroads](https://forum.crosscompute.com/u/invisibleroads)\
**Replies:** 0\
**Last updated:** [February 27, 2018, 1:39am UTC](https://forum.crosscompute.com/t/how-do-i-install-packages/28 "2018-02-27T01:39:59Z")

</div>

import subprocess subprocess.call('pip install scikit-image'.split())

---

## [How do I show a map of points?](https://forum.crosscompute.com/t/how-do-i-show-a-map-of-points/21)

<div class="topic-metadata">

**Author:** [@salah93](https://forum.crosscompute.com/u/salah93)\
**Replies:** 1\
**Last updated:** [April 28, 2018, 1:32am UTC](https://forum.crosscompute.com/t/how-do-i-show-a-map-of-points/21 "2018-04-28T01:32:12Z")

</div>

You need to create a “csv” file with the following columns description latitude longitude You can add radiusinpixels and fillcolor to change size and color of points respectively. As an alternative to radiusinpixels, …

---

## [How do I make a choropleth map?](https://forum.crosscompute.com/t/how-do-i-make-a-choropleth-map/27)

<div class="topic-metadata">

**Author:** [@invisibleroads](https://forum.crosscompute.com/u/invisibleroads)\
**Replies:** 0\
**Last updated:** [February 26, 2018, 11:26pm UTC](https://forum.crosscompute.com/t/how-do-i-make-a-choropleth-map/27 "2018-02-26T23:26:05Z")

</div>

Steps Define geometries. You can start with an existing shapefile (see code) or you can define each geometry manually using this tool for NYC addresses or this tool for generic addresses. Set colors. You can render nume…

---

## [Why is the notebook kernel restarting or not responding?](https://forum.crosscompute.com/t/why-is-the-notebook-kernel-restarting-or-not-responding/23)

<div class="topic-metadata">

**Author:** [@invisibleroads](https://forum.crosscompute.com/u/invisibleroads)\
**Replies:** 0\
**Last updated:** [February 16, 2018, 1:39pm UTC](https://forum.crosscompute.com/t/why-is-the-notebook-kernel-restarting-or-not-responding/23 "2018-02-16T13:39:23Z")

</div>

You might see the following message during your notebook session if your dataset is larger than 100mb or your code uses lot of memory: The kernel appears to have died. It will restart automatically. Option 1: Choose…
