How to show data from a remote .csv file in react?

im trying to extract data from this .csv link: I'm using React Papaparse and Im able to console.log the Arrays with no problem, The problem is that this branch tracks info since 2020 and I only want to show the LATEST date available (they update this branch every 2-3 days), and I only need the part that says "comuna_residencia" and "paso", I don't need any of the other information. I have tested a variaty of formulas, but can't manage to make it work.

1 answer

  • answered 2021-05-04 13:51 Latuz

    Okey guys, I managed to display the information with useState and useEffect as seen below:

    import { readRemoteFile } from "react-papaparse";
    const App = () => {
      const [data, setData] = useState(null);
      useEffect(() => {
            complete: (results) => {
      }, []);
      return (
          {data ? (
          ) : (
            <div className="loader">Loading...</div>
    export default App;
    My question is, how I can filter to just get the last date available and also just the "comuna_residencia" and "paso"
    Thanks in advance.